Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'To prevent timeout errors' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
To prevent timeout errors
Authored by: bostmass on Jan 20, '03 12:47:41PM

Because AppleScripts can time out after a certain period of what it considers inactivity, a better approach would be:

with timeout of 1000000 seconds
try
do shell script ¬
"sudo diskutil repairPermissions /" password "adminPassword" with administrator privileges
on error errormsg
display dialog errormsg --in case anything goes wrong
end try
end timeout

activate me
display dialog "Finished!" --so you'll know the script is through running



[ Reply to This | # ]
Terminal Applescript question
Authored by: photoboy on Feb 14, '03 11:09:59AM

Question, couldn't you have Applescript ask for a password then enter that string into the text? Then it could have the "sudo -K" command mentioned in another string so this not expose your password and would also not leave sudo open.



[ Reply to This | # ]
To prevent timeout errors
Authored by: jstaudte on May 11, '03 09:06:07PM

I'm not sure what I'm doing wrong here, but I am new to but Terminal and Applescript.

If I cut and paste the code listed into Script Editor (with my own password) I get and error: Expected "given", "in", "of", expression, "with", "without", other parameter name, etc. but found unknown token. And the token highlighted is the first backslash (\)

So I tried doing in in Terminal to see if my Script was the problem, but I always get prompted for my password, even thout I've included in the sudo command.

Thanks if you can help.



[ Reply to This | # ]