Showing posts with label AppleScript. Show all posts
Showing posts with label AppleScript. Show all posts
Saturday, June 5, 2010
AppleScript. Automator.
Two nice articles on Mac.AppStorm:
1. Automator: The Ultimate Automation Assistant
2. Advanced AppleScript Techniques
Friday, June 4, 2010
AppleScript. Hello, World!
You can find AppleScript Editor in the folder Utilities of Applications:
Type "Hello":
Press Compile and then Run - see "Hello" in the result window:
Let's "complicate" the script. Type:
display alert "Hello"
Press Compile and Run. You see a simple alert with one Ok button on the screen:
Let's make an application from it. In the File menu select "Save as". You will see this save dialog:
Select "Application" in the File Format combo box. Set a name, for example Hello. Set a path - I set the desktop:
Now on the desktop I see my Hello application. When I click on it, I see my alert:
In the end of this post I'd like to show a less useless and a bit funny example. You can use AppleScript editor as a calculator. Simply type something you need to calculate, compile and run it:
Of course you can arrange it as a script:
This book below contains a nice section about AppleScript:
Type "Hello":
Press Compile and then Run - see "Hello" in the result window:
Let's "complicate" the script. Type:
display alert "Hello"
Press Compile and Run. You see a simple alert with one Ok button on the screen:
Let's make an application from it. In the File menu select "Save as". You will see this save dialog:
Select "Application" in the File Format combo box. Set a name, for example Hello. Set a path - I set the desktop:
Now on the desktop I see my Hello application. When I click on it, I see my alert:
In the end of this post I'd like to show a less useless and a bit funny example. You can use AppleScript editor as a calculator. Simply type something you need to calculate, compile and run it:
Of course you can arrange it as a script:
display alert 45 + 16 * 2 / 3
This book below contains a nice section about AppleScript:
Subscribe to:
Posts (Atom)