exec |
|
Submitted By Josh Barfield (selcouth) |
DescriptionExecutes shell command in current message. Example: /exec {ping -c 1 google.com} or /exec {cal}. Note that you need to specify correct paths for commands like /exec {touch /Users/selcouth/foo.txt}. If you do not, 'foo.txt' will be created at /. Be careful with this!CommentsYou can reply to individual comments by clicking the "Reply" link next to each. # by astoria on 04/05/05 at 22:20:12Is there any way to set the current dir to home dir instead of / before running the command? Thanks.
# by jofo on 12/06/07 at 16:46:15Do this at your own risk. I'm not responsible....etc
1) Go to ~/Library/Application Support/Adium 2.0/Scripts/ 2) Right-click (or control-click on the exec script package and click "Show package contents" 3) Go into Contents/Resources and open the exec.scpt 4) Change the line to read like this: return do shell script "cd ~;" & the_cmd Basically you're just taking on another command first, then separating them with a colon. # by Teridon on 05/04/05 at 19:11:35Nice. But since I like to complain I'll point out (as a warning) that if the command takes a long time to execute, you can't do anything else in Adium until it is done! (any way to fix this?)
# by zaudragon on 06/23/05 at 21:16:08Teridon: no, there are other AppleScripts like this that stall Adium.
# by Daffy on 04/12/07 at 23:03:19Teridon: actually, you *can* prevent it from stalling. Just open up the script by command-clicking on it and selecting "Show Package Contents", and then go into the applescript and edit it so that it looks like this:
on substitute(the_cmd) with timeout of 15 seconds return do shell script the_cmd end timeout end substitute - and adjust the timeout value to suit your needs. # by nemeru on 09/19/07 at 08:01:34hey, i was trying what Reikon said, to list folder content, and i can't figure it out... i'm not familiar with apple commands, so i was trying what i knew, that be "dir", so /exec {dir /users/.../.../.../} but it ain't workin... can sumone help on this one pls? would appreciate it..
# by nemeru on 09/19/07 at 08:02:23dunno if i'll remember to check on this site for answer, so a mail or msn msg would be nice... thx..
Post a New CommentYou must be logged in to post comments. |
# by zaudragon on 02/06/05 at 03:29:18