get the list of open applications and windows ?
Sarah
sarahr at genesearch.com.au
Wed Jul 24 17:25:01 EDT 2002
I had only tested this in the Script Editor but when testing in Rev, I
found that it worked with one minor problem. The AppleScript separates
the names with a "return" which to AppleScript is ascii 13. Rev uses
ascii 10 for an end of line, so the AppleScripts return didn't actually
produce a line break.
Change line 5 to:
set procNames to procNames & the name of p & ascii character 10
and it will produce a correctly separated list, although the first and
last characters will be quotes, so you'll need to remove them in your
Rev script once you have the data.
I did what you did, put the script in a field called "ScriptMac" and
then had a button with the following script:
on mouseUp
do fld "ScriptMac" as AppleScript
answer the result
end mouseUp
This worked perfectly for me under OS X 10.1.5 with the latest update to
AppleScript.
Sarah
On Wednesday, July 24, 2002, at 04:28 PM, Ludovic THEBAULT wrote:
> in <D5DC80BE-9CF8-11D6-AC4D-0003937A97B8 at genesearch.com.au>:
>> Here is an AppleScript to list all running applications:
>>
>> tell application "Finder"
>> set procList to the processes
>> set procNames to ""
>> repeat with p in procList
>> set procNames to procNames & the name of p & return
>> end repeat
>> return procNames
>> end tell
>
> Thanks, but doesn't work with me (on macOS X). But works in the
> applescript editor.
>
> I've put the script in a fld called "Scriptmac"
> In msg box, the script :
> do fld "scriptmac" as applescript
>
> return "Compiler error"
>
> _______________________________________________
> 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