|
|
sending password via applescript
I have wrote an apple script to boot me back to 9 in the week mornings after a night of network rendering on X.
The only problem is getting the do shell script to send the password after the sudo command, does anyone know how to do this or append it to the sudo command ?
Here is the script so far
try repeat set the date_stamp to ((the current date) as string) set current_name to date_stamp set check_weekend to date_stamp set character_countPre to the number of characters of check_weekend as integer set character_count1 to character_countPre - 3 set the check_weekendNew to (characters 1 thru -(the character_count1 + 1) of the check_weekend) as string if check_weekendNew does not contain "Sat" then try if check_weekendNew does not contain "Sun" then try set character_count2 to the number of characters of current_name as integer set character_count3 to ((character_count2 - 11) as integer) set the new_name2 to (characters (the character_count3 + 1) thru -1 of the current_name) as string set new_Date_Stamp to ((new_name2) as string) if new_Date_Stamp = " 9:00:00 am" then try do shell script " sudo nvram boot-device='mac-io/ata-4@1f000/@0:10,:tbxi'" do shell script "sudo reboot" on error beep exit repeat end try end try end try end repeat end try
sending password via applescript
You can send your password in this format:
sending password via applescript
I came up with this (considerably simpler) script to boot back to OS 9:
sending password via applescript
Don't know if I am way to late for this but I have written an entire program that does this in Java it can be found at |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.19 seconds |
|