Ranqers Posted November 19, 2012 Share Posted November 19, 2012 I want to make a program that'll execute a script without having to using the SCAR client. possible? Thanks! Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 19, 2012 Share Posted November 19, 2012 You can drag the cross hairs to whatever "client" you want to select it. This Button, drag it: Or you can use the client functions SCAR provides. Quote Link to comment Share on other sites More sharing options...
Ranqers Posted November 19, 2012 Author Share Posted November 19, 2012 You can drag the cross hairs to whatever "client" you want to select it. This Button, drag it: Or you can use the client functions SCAR provides. ..not that new. what i'm saying is taking a script (made in scar) and create a program to use it. i,e: Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 19, 2012 Share Posted November 19, 2012 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 Quote Link to comment Share on other sites More sharing options...
Ranqers Posted November 19, 2012 Author Share Posted November 19, 2012 Thanks! dunno if you have any experience in Python, but could you do this with that language? Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 19, 2012 Share Posted November 19, 2012 (edited) 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 November 19, 2012 by LordJashin Quote Link to comment Share on other sites More sharing options...
Ranqers Posted November 20, 2012 Author Share Posted November 20, 2012 How would you go abouts setting up scar for commandline? When you say commandline, like command prompt's interface? Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 20, 2012 Share Posted November 20, 2012 (edited) 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 November 20, 2012 by LordJashin Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 20, 2012 Share Posted November 20, 2012 (edited) 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 November 20, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...