Make Debugging Easier: Write Your Own "Do Shell Script" Wrapper
Ever since Mac OS got delivered on UNIX, its usefulness expanded exponentially. Even its AppleScript function can now call UNIX shell commands with the "do shell script" calls. If you use the "do shell script" extensively, then you might consider wrapping it in your own "do shell script" handler. By wrapping the "do shell script" command in a handler, you can easily debug your shell command calls without putting output statements everywhere. The following doShellScript handler is an example.
on doShellScript(command, administrator)
When you uncomment out the "display dialog command" statement, you will see exactly what your script is doing, every time it calls the doShellScript handler. You can optionally comment out the if-else block so that your AppleScript application won't actually execute the shell command, but simply show you what commands it would execute.
Did your message disappear? Read the Forums FAQ.
Spam Control | * indicates required field
TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.
No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.
Messages, files, and images copyright by respective owners.
47 Users Online
Copyright © 1996 - 2021. All Rights Reserved.