Code:
try
set suCALLapp to the result of the application
set APPn to the result of the application
if suCALLapp is "1" then
display dialog "You need to activate Superuser. Activate?" buttons {"OK"} default button 1
tell APPn
do shell script "cd /Applications/Superuser/Needed;mkfile 1b confirmFILE.conf"
activate
end tell
on error the error_message number the error_number
if suCALLapp is "0" then
display dialog "Will you like to activate Superuser?" buttons {"Yes", "No"} default button 2
if the button returned of the result is "" then
do shell script "cd /Applications/Superuser/Needed;mkfile 1b confirmFILE.conf"
else
-- action for 2nd button goes here
end if
end try
The code is supposed to do the following (for people that don't know):
Code:
"try set suCALLapp to the result of the application
set APPn to the result of the application" is trying to get result that is called from app
"if suCALLapp is "1" then
display dialog "You need to activate Superuser. Activate?" buttons {"OK"} default button 1
tell APPn
do shell script "cd /Applications/Superuser/Needed;mkfile 1b confirmFILE.conf"
activate
end tell" checks for result by app & if true prompts for activate
"on error the error_message number the error_number
if suCALLapp is "0" then
display dialog "Will you like to activate Superuser?" buttons {"Yes", "No"} default button 2
if the button returned of the result is "" then
do shell script "cd /Applications/Superuser/Needed;mkfile 1b confirmFILE.conf"
else
-- action for 2nd button goes here
end if
end try"
Help!!!
Garret Stand
download ↓
Attachments
Last edited by a moderator: