Jump to content
Ranqers

Question

Recommended Posts

Do you want Forms? SCAR supports forms.

 

Now if you wanted to use the script outside of SCAR, I don't believe you could do this. SCAR is the compiler, and has to run the script period. You could find SCAR, or download it if the person does not have it. Then download the includes from repos, and finally send your script from your program to SCAR through command line. Then SCAR will open up and run it......then you can hide SCAR with getself.hide

 

Me and ShadowRecon did this with our Delphi program - http://www.rs2bots.tk

Link to comment
Share on other sites

Can Python use Windows API? I tried some beginner online courses that were excellent for teaching python but it was all online web based stuff.

 

mm i guess this is true... - http://stackoverflow.com/questions/1025029/how-to-use-win32-apis-with-python

 

I guess you don't have to use Windows API. But you need a way to send commands to SCAR through command prompt. - http://forums.scar-divi.com/showthread.php?2-Commandline-Parameters

Edited by LordJashin
Link to comment
Share on other sites

How would you go abouts setting up scar for commandline? When you say commandline, like command prompt's interface?

 

I'm no expert. But this is how I think of "command prompt/line/ w/e". Basically, Command Prompt in Windows (short name CMD) is an application that comes with windows. But it is like a language of its own, and you can use it to do things. Its been improved on, but has been a carry over from all the way back to Win95. Batch commands, there is all sorts of craziness. But that's the general gist of it, and all that comes with windows, its already built in. So whenever you see a command prompt pop up out of no where. Like with SMART, that is because they are utilizing functions that use the command prompt. Some like it to display debug information to users :)

 

http://en.wikipedia.org/wiki/Command_Prompt - Command line interpreter...

 

Anyway here is About.coms implementation. That we used in our program as well. Here it is used to launch the SCAR installer.

 

[scar]

procedure AboutcomsShellExecuteandwait;

var

SEInfo: TShellExecuteInfo;

ExitCode: DWORD;

ExecuteFile, ParamString, StartInString: string;

begin

ExecuteFile := GetCurrentDir + '\Scar Divi Installer.exe';

FillChar(SEInfo, SizeOf(SEInfo), 0) ;

SEInfo.cbSize := SizeOf(TShellExecuteInfo) ;

with SEInfo do begin

fMask := SEE_MASK_NOCLOSEPROCESS;

Wnd := Application.Handle;

lpFile := PChar(ExecuteFile) ;

{

ParamString can contain the

application parameters.

}

// lpParameters := PChar(ParamString) ;

{

StartInString specifies the

name of the working directory.

If ommited, the current directory is used.

}

// lpDirectory := PChar(StartInString) ;

nShow := SW_SHOWNORMAL;

end;

if ShellExecuteEx(@SEInfo) then begin

repeat

Application.ProcessMessages;

GetExitCodeProcess(SEInfo.hProcess, ExitCode) ;

until (ExitCode <> STILL_ACTIVE) or

Application.Terminated;

end;

end;

[/scar]

 

Note in Delphi you would need to include ShellAPI in your uses statement.

 

Now for python I would look this up.http://stackoverflow.com/questions/450285/executing-command-line-programs-from-within-python

 

and google around

Edited by LordJashin
Link to comment
Share on other sites

I remember seeing somebody messing around with this, but I can't remember where. Regardless you cannot do this without using SCAR. You can automate the running of a script somewhat but you still must use SCAR. A "compiled" script is not a standalone program; it still requires SCAR to run.

Edited by Bixby Sayz
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...