Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Now with movable folders :)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Now with movable folders :)
Authored by: DAC on Sep 16, '02 03:56:25PM

After digging at some apple scripts out there on the web, I found a way to make the call to the .term file being launched by this trick in a RELATIVE path to the script itself (in this case, in the same folder. This makes it so you can move the tool you create after you make it (as long as you move the whole folder). So now you can even share this with others.

So now the script (this one calling a pine.term file) looks like:

on run
if the window "Pine" of the application "Terminal" exists then
tell application "Terminal"
activate
set frontmost of window "Pine" to true
end tell

else

set myPath to path to me
repeat with i from (count characters in (myPath as text)) to 0 by -1
if character i of (myPath as text) is ":" then
set myPath to (characters 1 through i of (myPath as text)) as text as alias
exit repeat
end if
end repeat

tell application "Finder"
open alias (myPath & "Pine.term" as text)
end tell
end if
end run

on reopen
run
end reopen



[ Reply to This | # ]