Jump to content
rronnyv

excecute external file and passing parameters

Recommended Posts

Is there a way to do that in scar, would be perfect if I could run an exe, pass some parameters and recieve the output to scar, if that is not possible then opening a batch script will do too.

 

Ok finally got it after a few hours of googling, it's hard when you're a noob :(. If anyone else is interested then here it is:

 

program New;
var
hwnd:Longint;
function ShellExecute(hwnd:integer; lpOperation:string; lpFile:string; lpParameters:string; lpDirectory:string; nShowCmd:integer):Longint;external'ShellExecuteA@C:\WINDOWS\system32\shell32.dll stdcall';
begin
ShellExecute(hwnd,'open','C:\WINDOWS\notepad.exe','','',5) ;
end.

api calls must be enabled

Edited by rronnyv
  • Like 1
Link to comment
Share on other sites

Another way would be to create yourself a plugin (that contains ShellExecute built-in), then put it in same path/folder with your script and simply load that plugin from there, so that you can use em with SCAR.. :)

 

Yeah, it would be really great to have ShellExecute() built-in to SCAR by default, but I doubt that will ever happen, simply because its a huge security risk, sadly. :\

There's always those sad idiots looking to do just anything to steal some stupid pixels from other people.

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...