I am using AppleScript Studio to create a GUI based menu launcher for unix shell scripts.
I thought that I could use “do shell script”, etc., but there are always errors.
Is anyone launching a shell script in the script.command format with applescript?
How are you doing it and can you get consistant results?
examples:
on clicked theObject
set theResult to do shell script (contents of text field “input” of window “main”) as string
set the contents of text view “output” of scroll view “output” of window “main” to theResult
set needs display of text view “output” of scroll view “output” of window “main” to true
end clicked
info-
gets input from a text field, outputs result to window
works for ls, data, etc.
on clicked theObject
set theResult to (do shell script “cp /Users/admin/test.plist /Users/admin/Library/Preferences/test.plist” password “xxxx” with administrator privileges) as string
set the contents of text view “output” of scroll view “output” of window “main” to theResult
set needs display of text view “output” of scroll view “output” of window “main” to true
I need to be able to run full unix shell scripts inside AS studio.
Apple shell interface seems buggy and unfinished.
???