| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Thread Closed |
|
|
Thread Tools |
![]() Member Since: Jan 30, 2009
Posts: 48
![]() |
I have a Terminal command and associated password to execute the command (a command and a password) I must run dozens of times a day. Bored of doing it hand 1 by 1.
So, I started writing an Applescript (that I will turn into an Application so I can just click it to execute all in 1 click) that opens terminal, enters the command BUT the command is only executed if I enter the necessary password. but, that is where I am stuck. I can open terminal, have it enter the command, but I am not sure how to then follow-up with the password to execute the command when prompted. Here is what I have and it works perfect tell application "Terminal" activate do script "blahblahblahblahblah" in front window end tell I have tried these variations, but no luck do script "blahblahblahblahblah" password "passwordhere" in front window - as a means of entering script and the password in 1 shot do script "passwordhere" in front window - as a means of then entering the password after first script runs so, not sure how to get it to follow up the command at the password prompt that comes up and enter the password. Yes, I will keep working on it.. but if you can see the fix, please advise. |
| Thread Closed |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Hello World app takes 45s to start from the terminal, gcc, gdb and dtrace problems | Ethan asdf | OS X - Development and Darwin | 5 | 02-12-2009 05:03 PM |
| copy command from terminal | sgribber | OS X - Operating System | 0 | 06-08-2008 09:25 PM |
| Applescript vs Automator vs Unix Command | Thyamine | OS X - Development and Darwin | 3 | 02-25-2008 10:23 PM |
| Terminal command question | MACGIRL34 | OS X - Operating System | 1 | 12-12-2007 04:26 PM |
| looking for a terminal emulator and command shell in Mac OSX | CandiMarie | OS X - Operating System | 9 | 03-05-2004 03:53 PM |
All times are GMT -4. The time now is 09:53 PM.
Powered by vBulletin