Moving a rev stack to the foreground
Trevor DeVore
lists at mangomultimedia.com
Mon Nov 24 11:58:19 EST 2008
On Nov 23, 2008, at 4:13 PM, Ken Ray wrote:
> 1) We *can't* use the new "do <script> as `VBScript`" for activating
> an
> application because it requires WScript, and WScript doesn't exist
> inside
> Revolution (see the online docs), so you *do* have to create a file
> and
> execute it, AFAIK.
Ken,
I was able to modify your script slightly and get Windows to bring a
Window forward using do as vbscript. Here is what I did:
1) Create a field and put this into it:
On Error Resume Next
Set Shell = CreateObject("WScript.Shell")
Shell.AppActivate $theTitle
if Err.Number <> 0 then
result = Err.Description & "(" & Err.Source & ")"
end if
2) Created a second field where I could enter the window name.
3) Created a button with the following script:
on mouseUp
put the text of field 1 into theScript
put the text of field 2 into theWindowNameOrID
if theWindowNameOrID is not a number then
put quote & theWindowNameOrID & quote into theWindowNameOrID
end if
replace "$theTitle" with theWindowNameOrID in theScript
do theScript as "vbscript"
put the result
end mouseUp
Clicking the button would bring the window to the front.
Regards,
--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com
More information about the use-livecode
mailing list