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
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.)
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?