How can I foreground an app?
Brad Allen
BradAllen at mac.com
Mon Apr 1 23:34:01 EST 2002
The problem here is that Applescript's "activate" command only works
on scriptable apps. A Rev standalone doesn't have a scripting
dictionary, and isn't directly Applescriptable. However, if you're
using a Mac, something like this should work:
tell app "Finder"
set the frontmost of application process "My Alarm Clock" to true
end tell
...where "My Alarm Clock" is the name of your Rev standalone.
If you can't use Applescript due to cross-platform consideration, you
might try using Rev's Launch command, as in
Launch "My Alarm Clock"
I'm not sure whether that would work under Windows, but it's worth a try.
>For Macintosh using you store the name of your app in the variable
>"theNameOfMyApp":
>
>Do "tell application " & quote & theNameOfMyApp & quote & " to activate" as
>applescript
>
>I don't think they will be a common solution to all platforms, but I could
>be wrong. I have a revolution program that keeps my FileMaker server in
>the foreground 24/7, well apart from certain hours where it quits it for
>backup and launches it again, I do the same thing with Firstclass servers.
>
>-i-
>
>On 1/4/02 6:56 pm, "Victor Eijkhout" <eijkhout at cs.utk.edu> scribed:
>
>> (With my apologies for that case of verbing in the subject :-)
>>
>> I'm writing an alarm clock. When the alarm goes off it would be nice
>> if the app became foremost, so that the user could hit the Any Key to
>> snooze the alarm.
>>
>> So how do I tell an app that's not foremost, or maybe even hidden to
>> become foremost?
> > --
>> Victor Eijkhout <eijkhout at cs.utk.edu>
>> tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F)
>> http://www.cs.utk.edu/~eijkhout/
>> _______________________________________________
> > use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution
--
More information about the use-livecode
mailing list