activate
Ken Ray
kray at sonsothunder.com
Mon Mar 13 13:18:38 EST 2006
On 3/13/06 4:45 AM, "sims" <sims at ezpzapps.com> wrote:
> On Windows is there some way to do the same?
Here's a VBS version. NOTE: Pass it the *title* of the window, not the path
to the app... this is how Windows locates running apps.
Watch for line wraps:
on VBS_AppActivate pTitle
put format("set WshShell = WScript.CreateObject(\"WScript.Shell\")") into
tVBS
put tVBS & cr & "WshShell.AppActivate" && quote & pTitle & quote into tVBS
put "C:\vbs_temp.vbs" into tVBSPath
put tVBS into url ("file:" & tVBSPath)
set the hideConsoleWindows to true
get shell("cscript.exe //nologo" && tVBSPath)
put it into tResult
if there is a file tVBSPath then
send "delete file" && quote & tVBSPath & quote to me in 1 second
end if
if tResult <> "" then return "Error: " & tResult
end VBS_AppActivate
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list