Saturday, December 16, 2017

#1 2005-10-12 02:54:08 pm

julifos
Administrator
From:: Malasaña, Madrid
Registered: 2002-11-20
Posts: 2014

What can't I do with AppleScript? Where there's a will, there's a way!

Thanks to the built-in power of AppleScript, and the extended power of scripting additions and third party extensions, there's almost nothing you can't do with AppleScript! Most applications you use have the built-in ability to be scripted, and those that aren't can almost always be controlled by a script in some form or another.

As an almost frivolous example, consider this: last Spring my basement flooded for the first time ever and I bought a wetvac to suck up all the water. I found the source of the flooding, a puddle that filled quickly and spilled over into the basement. After vacuuming it out a dozen times I got bored so I plugged an X-10 device (X-10 is a simple technology that allows you to control electrical devices in your home... and it understands AppleScript commands!) into an outlet, plugged the vacuum into it, and wedged the vacuum hose into the puddle. I quickly wrote a stay open script that turned on the X-10 outlet (and hence the vacuum) every ten minutes and let it run for one minute. The result: every ten minutes AppleScript activated the wetvac and oversaw the draining of my basement!

Also, OSX's Standard Additions includes a command called "do shell script", which allows you to run any command-line utility, which means unlimited power: image manipulation, full control over nearly every communication service available in the Internet (ftp, http, ssh, telnet, mail...), open doors to languages such as perl, audio and video manipulation...

Like all computer languages, AppleScript has a frustrating learning curve. But with a bit of patience, some reading, and studying others' scripts you'll soon start thinking in AppleScript. Suddenly Photoshop actions seem weak and FileMaker's ScriptMaker seems claustrophobic! Better yet...FileMaker and Photoshop can even be made to work together. Everything they can do can be done more intuitively (although, admittedly, sometimes a bit slower) with AppleScript.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)