Help with "do shell script" in Applescript
This is my script:
do shell script "chmod +x /System/Library/CoreServices/Dock.app.DISABLED/Contents/MacOS/Dock" password "adminpass" with administrator privileges
do shell script "open /System/Library/CoreServices/Dock.app.DISABLED"
delay 4
do shell script "chmod -x /System/Library/CoreServices/Dock.app.DISABLED/Contents/MacOS/Dock" password "adminpass" with administrator privileges
do shell script "/usr/bin/quitdock"
In the last line I originally put:
do shell script "killall "Dock""
But the double quotes didn't work.
Any help? Maybe a way to define the process number and then do a "kill process_number"?
Thanks,
Dale Mox
Code:
do shell script "chmod +x /System/Library/CoreServices/Dock.app.DISABLED/Contents/MacOS/Dock" password "adminpass" with administrator privileges
do shell script "open /System/Library/CoreServices/Dock.app.DISABLED"
delay 4
do shell script "chmod -x /System/Library/CoreServices/Dock.app.DISABLED/Contents/MacOS/Dock" password "adminpass" with administrator privileges
do shell script "/usr/bin/quitdock"
In the last line I originally put:
Code:
do shell script "killall "Dock""
But the double quotes didn't work.
Any help? Maybe a way to define the process number and then do a "kill process_number"?
Thanks,
Dale Mox
Comments
do shell script "/usr/bin/killall Dock"
but, i suggest you throw everything into one shell script, then execute that.
#!/bin/sh
/bin/chmod +x /System/Library/CoreServices/Dock.app.DISABLED/Contents/MacOS/Dock;
/usr/bin/open /System/Library/CoreServices/Dock.app.DISABLED;
/bin/sleep 4;
/bin/chmod -x /System/Library/CoreServices/Dock.app.DISABLED/Contents/MacOS/Dock;
/usr/bin/killall Dock;
Originally posted by thuh Freak
the extra quotes aren't necessary for killall.
Code:
do shell script "/usr/bin/killall Dock"
but, i suggest you throw everything into one shell script, then execute that.
#!/bin/sh
/bin/chmod +x /System/Library/CoreServices/Dock.app.DISABLED/Contents/MacOS/Dock;
/usr/bin/open /System/Library/CoreServices/Dock.app.DISABLED;
/bin/sleep 4;
/bin/chmod -x /System/Library/CoreServices/Dock.app.DISABLED/Contents/MacOS/Dock;
/usr/bin/killall Dock;
Thanks,
The point is I want to make this an App that people can easily run to make a hack of mine work well.
Dale Mox