Graham,

What is the execution error exactly?! Please, always include the exact text of 
an error, whenever you write the word 'error'.

--
Kind regards,

Mark Schonewille
Economy-x-Talk
Http://economy-x-talk.com

Share the clipboard of your computer over a local network with Clipboard Link 
http://clipboardlink.economy-x-talk.com


Op 5 dec. 2011 om 00:24 heeft Graham Samuel <livf...@mac.com> het volgende 
geschreven:

> Finally, Mike gave me this little script in May - I tried to put it in a 
> field and 'do' it as vbscript. Didn't works so then I put it in a text file, 
> read it and tried do as vbscript again. Both times I got an execution error. 
> Maybe it's just too late at night…
> 
> 'sets the environment
> Set WshShell = WScript.CreateObject ("WScript.Shell")
> 
> 'grabs the full processlist and puts it in a var
> Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from
> Win32_Process")
> 
> 
> 'loops through each looking for a match
> For Each objProcess in colProcessList
> If objProcess.name = "firefox.exe" then
> 
> 'sets a flag if a match is found
> vFound = True
> End if
> 
> 'next loop of course
> Next
> 
> 'if a match was found, activate the app
> If vFound = True then
> WshShell.AppActivate "firefox"
> Else
> 
> ' otherwise, run the app
> WshShell.Run "firefox.exe"
> End If

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to