Hi!
I have successfully been running the script below, but with the latest OSX update, 10.9.2, the script hangs on first run when pressing "Yes", the Applescript program freeze but completes it's task... if I force quit the application and rerun the applescript, it quits (works as intended) every time no mather the chooice, I have saved the application as a program.
Sorry, I ain't any good at Applescript, so forgive me if I have done some obvious thing that is messed up, but it has worked flawlessly before..
here's my script:
Thanks for any help!!
I have successfully been running the script below, but with the latest OSX update, 10.9.2, the script hangs on first run when pressing "Yes", the Applescript program freeze but completes it's task... if I force quit the application and rerun the applescript, it quits (works as intended) every time no mather the chooice, I have saved the application as a program.
Sorry, I ain't any good at Applescript, so forgive me if I have done some obvious thing that is messed up, but it has worked flawlessly before..
here's my script:
Code:
[B][I]display dialog "Share internet connection?" buttons {"Yes", "No"}
set the button_pressed to the button returned of the result
if the button_pressed is "Yes" then
do shell script "/Users/Karde/Desktop/Shareinternet.sh" user name "root" password "*****" with administrator privileges
else if the button_pressed is "No" then
do shell script "/Users/Karde/Desktop/Stopshare.sh" user name "root" password "*****" with administrator privileges
end if[/I][/B]
Thanks for any help!!
Last edited by a moderator: