4 ms·
This example is pretty bad AppleScript. A much better way of writing this exact behavior is: tell the first window of the application "Safari" close the
by larkost 3y ago
This example is pretty bad AppleScript. A much better way of writing this exact behavior is:
tell the first window of the application "Safari"
close the first tab
end tell
Of course a real script would do things like make sure there is such a window, or be more specific than "the one on top", which is implicit in both these scripts.
I am not enamored with AppleScript for a number of reasons, but this example is just bad, and does not really show any of the actual problems with AppleScript/
- krackers 3y agoI've long since thought that applescript might be the world's only _read only_ langauge. Turns out that C2 thought so too: https://wiki.c2.com/?ReadOnlyLanguage https://wiki.c2.com/?ReadOnlyLanguage