Returning Multiple Values From An AppleScript
1. An AppleScript with the following code:
tell application "System Events"
count (every process whose name is "Adium")
if result = 1 then
tell application "Adium" to get my status message
end if
count (every process whose name is "iChat")
if result = 1 then
tell application "iChat" to get status message
end if
count (every process whose name is "Skype")
if result = 1 then
tell application "Skype" to send command "GET PROFILE MOOD_TEXT " script name "test"
end if
end tell
This checks to see if any of those apps are running, and if they are, it fires the command.
What I'd like to do is set each returned string to a different variable, like AdiumStatus, iChatStatus and SkypeStatus -- but I don't know how to code this. I tried using "set AdiumStatus to my status message" (and the like), but that didn't work.
Any ideas? I know this should be simple, but out of practice with AS!
Dual 2.0GHz G5, Mac OS X (10.4)