| Article: |
Using Python and AppleScript Together | |
| Subject: | Shorter alias | |
| Date: | 2007-05-10 08:48:18 | |
| From: | ulrichp | |
|
Instead of
|
||
Showing messages 1 through 3 of 3.
-
Shorter alias
2007-05-10 09:57:22 Noah Gift |
[View]
-
the zen of python...
2007-05-11 06:50:44 airdrummer [View]
also requires the reduction of redundancy: instead of repeating
app(u'/Applications/DiskWarrior.app')...
u should declare a variable:
dw=app('DiskWarrior')
dw.activate(timeout=3600)
dw.disk['main'].rebuild(replacing=k.yes_,
timeout=3600)
dw.quit(timeout=3600)



I personally like to be explicit as much as possible, but I also like the short cut way too.