Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

What modules/units are available in Stealth's Pascal Script?

Ask for help
Post Reply
Chad Joan
Neophyte
Neophyte
Posts: 12
Joined: 17.05.2020 0:11

What modules/units are available in Stealth's Pascal Script?

Post by Chad Joan »

What modules/units are available in Stealth's Pascal Script?

I've been able to put SysUtils without error, ex:
Program MyProgramName;
Uses SysUtils;
But many other things from Pascal examples online are not working. Ex: System.IOUtils, System.Generics.Collections, System.(anything really), IOUtils, Classes, and so on.

Trying to put 'System' or anything within 'System' into my 'Uses' clause causes this error:

Code: Select all

Compiler: [Error] at (3,2): Duplicate identifier 'TComponentStateE'
Trying to put System modules directly into the 'Uses' clause without the 'System' part of the path results in "not found" errors.
For example:

Code: Select all

Program MyProgramName;
Uses IOUtils;
results in
Compiler: [Error] at (3,2): Unit 'IOUtils' not found or contains errors
So I've guessed-and-checked a few of these, but I don't no how to list or enumerate what's available.

Thanks!
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: What modules/units are available in Stealth's Pascal Scr

Post by Vizit0r »

because this units are from delphi, most of this classes can be imported with stronh limitations, and some of them can be imported at all.
Pascal Script can't import overloaded methods, dont know about Pointers, etc. etc.

If you really need to use all this - better to use excternal Delphi scripts.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Chad Joan
Neophyte
Neophyte
Posts: 12
Joined: 17.05.2020 0:11

Re: What modules/units are available in Stealth's Pascal Scr

Post by Chad Joan »

That does make sense as a limitation for sake of security. Thanks for the info!

If I needed to, how would I use external Delphi scripts?

I'm wondering if the stealth_script.pas file in Stealth's root directory would allow me to expose things for my scripts, including .DLLs. Maybe that would be how to use external Delphi scripts, but I am not sure.
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: What modules/units are available in Stealth's Pascal Scr

Post by Vizit0r »

http://stealth.od.ua/forum/viewtopic.php?f=6&t=2569

if some question - find me in Discord, that will be much faster.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Chad Joan
Neophyte
Neophyte
Posts: 12
Joined: 17.05.2020 0:11

Re: What modules/units are available in Stealth's Pascal Scr

Post by Chad Joan »

I think I get it.

I suspected that magic was around here somewhere. That topic / thread looks like very helpful information.

In my other thread, I was contemplating making a daemon or service to use Win32 API if I couldn't do it from Stealth scripts directly. This might be better: just put a .dll and have a script call it and feed it data.

Thanks again!
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: What modules/units are available in Stealth's Pascal Scr

Post by Vizit0r »

make this from external script will be much easier for you
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Post Reply