|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|
|General: iOS7 command line... Equivalent of "say" command?||RobertoG||Jailbreaks and iOS Hacks||0||Jan 19, 2014 06:05 PM|
|Apple script batch shell script||prramesh||Mac Programming||5||Sep 15, 2013 04:35 AM|
|"Applications" menu command - "item cannot be found" - owner/permissions? (10.6.8)||MacOSExustio||OS X||2||Jul 20, 2013 06:05 AM|
|OS X: CS:GO "command" + "left mouse click" causes "right mouse click" Whats wrong?||oeppel||Mac and PC Games||1||Apr 6, 2013 04:12 AM|
|iTunes Apple script for additional "View Options"?||kumquat||Apple TV and Home Theater||14||Jun 29, 2012 10:02 AM|
All times are GMT -5. The time now is 06:10 PM.