Here's what will run:
Note the line: tell application "GrowlHelperApp" of machine "eppc://user
ass@address"
I want this to be: tell application "GrowlHelperApp" of machine machine_chosen
But when I do this, I get the error: Expected end of line, etc. but found “"”.
I realize most of this is very kluj'd together and there's a lot I could improve upon, but this is just a little toy I'm making for myself, girlfriend, and two sisters all living in the same house and I JUST CANNOT FIGURE OUT THAT ERROR!
Thanks for your time and patience!
Code:
set beth to "eppc://user:pass@address"
set brian to "eppc://user:pass@address"
set molly to "eppc://user:pass@address"
set sarah to "eppc://user:pass@address"
set theList to choose from list {"brian", "beth", "molly", "sarah"} with title "Messaging Service" with multiple selections allowed
repeat with i in theList
if (i as text) is equal to "brian" then
set machine_chosen to brian
set user to (i as text)
else if (i as text) is equal to "beth" then
set machine_chosen to beth
set user to (i as text)
else if (i as text) is equal to "molly" then
set machine_chosen to molly
set user to (i as text)
else if (i as text) is equal to "sarah" then
set machine_chosen to sarah
set user to (i as text)
end if
display dialog ("Messaging " & user) default answer "How are you doing" buttons ¬
{"Cancel", "Send"} default button 2
copy the result as list to {text_returned, button_pressed}
try
[B]tell application "GrowlHelperApp" of machine "eppc://user:pass@address"[/B]
set the allNotificationsList to {"Test Notification", "Another Test Notification"}
set the enabledNotificationsList to ¬
{"Test Notification"}
register as application ¬
"Growl AppleScript Sample" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Script Editor"
notify with name ¬
"Test Notification" title ¬
"Test Notification" description ¬
"This is a test AppleScript notification." application name "Growl AppleScript Sample"
notify with name ¬
"Another Test Notification" title ¬
"Another Test Notification :) " description ¬
"Alas — you won't see me until you enable me..." application name "Growl AppleScript Sample"
end tell
tell application "Finder" of machine machine_chosen
activate
do shell script (say text_returned) password "" with administrator privileges
#do shell script (say "They're always in the last place you look, you know.")
end tell
end try
set theList to rest of theList
end repeat
Note the line: tell application "GrowlHelperApp" of machine "eppc://user
I want this to be: tell application "GrowlHelperApp" of machine machine_chosen
But when I do this, I get the error: Expected end of line, etc. but found “"”.
I realize most of this is very kluj'd together and there's a lot I could improve upon, but this is just a little toy I'm making for myself, girlfriend, and two sisters all living in the same house and I JUST CANNOT FIGURE OUT THAT ERROR!
Thanks for your time and patience!