My Applescript works in Editor, but not in Revolution

RGould8 at aol.com RGould8 at aol.com
Sun Oct 20 16:59:01 EDT 2002


Can anyone tell me what I'd need to do to get this script to run in 
Revolution?  It runs fine in Script Editor, but Revolution gives me a 
"compile error" when I paste this into a field and try to run it from the 
field.

The goal of this script is to:

1)  Have the finder locate "Apple System Profiler", so that Applescript 
doesn't pester the user to locate it
2)  Have Apple System Profiler return the "router address"

Note:  This "how to tell Apple System Profiler commands without pestering the 
user to locate it first" problem is a toughie to figure out.  If anyone knows 
of a better way to do this, please let me know.



tell application "Finder"
    set appRef to application file id "prfc"
    set [appPath, appName] to {appRef as string, appRef's name}
    set ASP to appPath
end tell



using terms from application "Apple System Profiler"
    tell application ASP
        activate
        set routerAddress to {TCPIP gateway as text}
        quit
        display dialog routerAddress
    end tell
end using terms from



More information about the use-livecode mailing list