|Mar 18, 2008, 12:12 PM||#1|
Apple Script Help, "do shell command"
After moving to Leopard I have noticed that the Finder, and more importantly Spotlight have completely lost their usefulness to me. As a new sys admin I loved being able to type in some obscure plist I needed to edit into Spotlight and have show right up. But that was in Tiger and this is Leopard, now when I type in com.apple. anything I get Safari History items, and really random txt files that I really had no idea existed.
So instead I have been using terminal to do my dirty work. Using the
"find / | grep -i variable" command.
I would like to build a little Applescript that ran that command, but with the variable be something I type into a dialog box. And then just have it spit the results out.
I know this might end up requiring more then just Applescript, possible Xcode, but who knows.
|Mar 18, 2008, 12:30 PM||#2|
I am not in front of my mac, but IIRC you could try something like this:
property theCommand : "" repeat while theCommand is "" display dialog "Enter the value to search for:" default answer theCommand set theCommand to text returned of result end repeat try do shell script "find / | grep -i " & quoted form of theCommand on error errorMsg number errorNum display alert "Error " & errorNum message errorMsg buttons "Cancel" default button 1 end try
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|File renaming apple script help||jelloshotsrule||Mac Programming||0||Jun 11, 2008 10:18 AM|
|Apple Script Help! File Compression||thriftinkid||Mac Programming||0||Mar 24, 2008 12:35 PM|
|Need Basic Apple Script Help||gumby777||Mac Programming||2||Oct 16, 2007 10:00 PM|
|Apple Script Help!!||blackangel||Mac Programming||10||Sep 29, 2007 07:29 PM|
|Apple Script Help!||damson34||General Mac Discussion||0||Oct 5, 2002 04:49 PM|
All times are GMT -5. The time now is 06:46 AM.