Did you know that iAway can run Apple Script?

Yes, it can!
Via Apple Script you can make your Mac do all sort of things when you step away and when you return.

Below an example script from our library that sets your Skype status to “Away” and activates your Screen Saver when you are away from your Mac. When you return, it sets your Skype status back to “Online”.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- Set Skype Status to Away
try
	tell application "Skype"
		send command "GET USERSTATUS" script name "iAway"
		set outcome to the result
		if outcome is "USERSTATUS ONLINE" then
			send command "SET USERSTATUS AWAY" script name "iAway"
		end if
	end tell
on error errString number errorNumber
	log (errString)
end try
--Start Screen Saver
try
	tell application "ScreenSaverEngine"
		activate
	end tell
end try
--All Done :-)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- Set Skype Status to back to Online
try
	tell application "Skype"
		send command "GET USERSTATUS" script name "iAway"
		set outcome to the result
		if outcome is "USERSTATUS AWAY" then
			send command "SET USERSTATUS ONLINE" script name "iAway"
		end if
	end tell
on error errString number errorNumber
	log (errString)
end try
--All Done :-)

All you have to do next is to copy the script files to a specific folder and let iAway execute them when you are away and when you return. If you don’t copy one of the script files then iAway simply ignores it, if not found.

It’s that easy!
Have fun scripting! 🙂

Do you have any other useful Apple Scripts that you use?
If so, let us know and we will add them to our example library.

Pin It on Pinterest

Share This