Monday 15 August 2011

if statement - If EXE opens, then RUN -


I need a script which means that if XE opens, the URL will open and I've created a shortcut for the URL.

I found this script on Stack Overflow, and was going to use it to change the course's arguments, but I thought there would be an easy way

Edit: League Of leagues Exe opens [this is the client], then run: .. \ KSD.url

  option explicit private arm folder string = string = C: \ windows \ system32 \ foldername "personal construction File string = "\\ servername \ folder \ software.exe" sub-run (Byval sFile) Dual shell set shell = CreateObject ("WScript.Shell") shell.Run Chr 34) & amp; SFile & Chr (34) , 1, false set shell = no end, at least set FS fs = CreateObject ("Scripting.FileSystemObject") if not fs.FolderExists (folder) then run RunToRun closing file if    

Try Exec :

  objExec = shell.Exec Chr 34) & amp; SFile & If your file is not open You may need to deal with the error (see above MSDN Document). (34) If objExec.Status = 0 then 'Your program is running' then open your URL end   

. Please code responsibly: -)

No comments:

Post a Comment