 |
 |
Execute Shell Script in Finder Without Opening Terminal
|
 |
|
 |
|
Registered User
Join Date: Nov 2002
Location: Far from the internet.
Status:
Offline
|
|
I know I can execute a shell script from within the finder by appending .command, but this opens the terminal. Is there any way to execute a shell script without opening the terminal? Or if not, how would I do this in AppleScript?
Code:
#!/bin/sh
cp -f /Volumes/Music/iTunes/iTunes\ 4\ Music\ Library ~/Music/iTunes/
cp -f /Volumes/Music/iTunes/iTunes\ Music\ Library.xml ~/Music/iTunes/
open -a /Applications/iTunes.app
Thanks!
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
I'd try Platypus. It will turn any shell script into a stand-alone double-clickable OS X application. 
|
|
•
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Location: London
Status:
Offline
|
|
probably the easiest thing for you is to use the Script Menu (/Applications/AppleScript/Install Script Menu)
It runs shell scripts as well as applescripts - just drop the scripts into ~/Library/Scripts
If you do want to use applescript then there is a command "run shell script"
so, you could do something like this:
Code:
set myScript to "cp -f /Volumes/Music/iTunes/iTunes\ 4\ Music\ Library ~/Music/iTunes/
cp -f /Volumes/Music/iTunes/iTunes\ Music\ Library.xml ~/Music/iTunes/"
do shell script myScript
tell app "itunes" to activate
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Nov 2002
Location: Far from the internet.
Status:
Offline
|
|
Originally posted by Simon:
I'd try Platypus. It will turn any shell script into a stand-alone double-clickable OS X application.
Thanks, worked like a charm!
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally posted by benb:
Thanks, worked like a charm!
Anytime. 
|
|
•
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
There's also a filename extension that you can give the script, but I forget what it is. Does anyone else here remember? .termcmd or something like that?
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally posted by Millennium:
There's also a filename extension that you can give the script, but I forget what it is. Does anyone else here remember? .termcmd or something like that?
Read the thread, it's in the first post.
.command
|
|
•
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |