|
|
Force Preview to reload a document
Please excuse my stupidity but where do you need to put scripts like this so that they can be run from anywhere from the terminal? I found that the script worked, and is just what I need, but only when the script was in the same directory as I was in when running it.
Force Preview to reload a document
Please excuse my stupidity but where do you need to put scripts like this so that they can be run from anywhere from the terminal? You should be able to put them anywhere as long as you reference them correctly (e.g., quoting the directory if it contains spaces). For instance, here's what I do on the command line: osascript "/Users/trevor/Development/AppleScript/Reload Preview Document.scpt" document.pdf
Force Preview to reload a document
The environment variable PATH consists of a colon seperated list of directories that are searched for commands. Hence you can proceed as follows:
1) create a directory ~/bin with
2) put your private scripts therein
3) add this directory to your search path with
The commands under 3) should go into a file that is loaded whenever the Terminal is started. I think $HOME/.profile should work (at least on my system it works because I do not use Terminal.app but "xterm -l"). As I have noticed getting the profile actually read can be a bit tricky and it will be ignored when you start applications from the Aqua GUI.
Force Preview to reload a document
Thanks but I know about *nix paths already. I don't think osascript does though so you need to put the full path. I've done something similar to Doc Drang below and written a shell script to make it easier. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|