Why script doesn't compilies?

I’d like to start Skype. OK. This does work:

launch application "Skype"

But status appears as Offline. So i need to change status. But editor do not compile the code below.


tell application "Skype"
	send command "SET USERSTATUS ONLINE" script name "AppleScript status setter"
end tell

After pressing Compile word “command” is highlighted and editor says: “expected end of line but found identifier”.
Maybe i also do need to have a some script “AppleScript status setter”?

You’re probably doing something wrong here. The reason “command” is highlighted is because AppleScript doesn’t recognize what you’re trying to get it to do. It expects a new line, but what it found was “command.”

I tried a similar script with Finder, but when I ended the line, it said “The variable ‘send’ is not defined,” which means the basic concept of your script is flawed.

I can’t help you write a working script to do what you want, however, because A) I don’t have Skype, and B) I have no idea what (if any) scripting syntax it has.

The best help I can offer is to, in Script Editor, go to File → Open Dictionary, then scroll down until you find Skype. If Skype is scriptable (which I have no idea if it is), then a window will pop up containing all the AppleScript commands you can send to Skype.

(BTW All “Compile” does is check the syntax of your script. You should use “Run” to run the script. The syntax of your script is automatically checked before you run the script, so, therefore, “Compile” is really unneccesary.)

Hope this helps.

-DevEd :wink:

EDIT: Just out of curiosity, what version of OS X are you using? (To get it, open the Apple menu, and click About This Mac. It should be displayed under the Apple logo and the text that reads Mac OS X.)

You’re doing it wrong, yes.

AS Editor show single command for Skype library:

And BTW my code was copied from other topic (where it did work, as i guess))).

As the command name is “send”, not “send command”, I guess that you must drop the word “command” between “send” and “SET USERSTATUS ONLINE” .

I guess also that the string “script name” must not be include in the command.

My understanding is that the code would be :


tell application "Skype"
   send  "SET USERSTATUS ONLINE" 
end tell

At least, it compiles flawlessly.

KOENIG Yvan (VALLAURIS, France) vendredi 31 mai 2013 15:02:35

AS editor says (unfortunately):
Skype got a message. Some parameters is missing for send.

Thanks, anyway.

I’ve just downloaded Skype to have a look. Your script looks perfectly in accordance with its dictionary and compiles on my machine with no problem. Do you perhaps have an OSAX installed with, say, a ‘send’ keyword? Or is your ‘tell’ statement nested inside one for another application?

Version OS - MAC OS X 10.7.5, Intel Core i5

Yes! Thanks, Nigel Garvey

Now this does work


tell application "Finder"
	launch application "Skype"
	tell application "Skype"
		send command "SET USERSTATUS ONLINE" script name "AppleScript status setter"
	end tell
end tell

I was suggesting the nested ‘tell’ statement as something not to have if there was one! :slight_smile: The script should compile without the “Finder” stuff round it.

tell application "Skype"
	launch
	send command "SET USERSTATUS ONLINE" script name "AppleScript status setter"
end tell

Since I don’t have a Skype account, I can’t tell if the script actually works once it’s compiled. :wink:

OK, it’s even shorter and also does work. Thanks for nests hint!