I downloaded Marc Liyanage's "Open Terminal Here"[1] droplet and modified it to open TextMate instead. Hence, "Open TextMate Here". I've attached the droplet for anyone who's interested. I keep it in ~Library/Application Support/Finder (renamed to "Mate") and then stuck it in my Finder Toolbar:
j.
On Nov 14, 2006, at 12:36 PM, Jay Soffian wrote:
I downloaded Marc Liyanage's "Open Terminal Here"[1] droplet and modified it to open TextMate instead. Hence, "Open TextMate Here".
Cool idea. For you Quicksilver people, this can also be accomplished with:
⌘⎋ow⇥tm↩
Rob
Le 14 nov. 06 à 18:36, Jay Soffian a écrit :
I downloaded Marc Liyanage's "Open Terminal Here"[1] droplet and modified it to open TextMate instead. Hence, "Open TextMate Here". I've attached the droplet for anyone who's interested. I keep it in ~Library/Application Support/Finder (renamed to "Mate") and then stuck it in my Finder Toolbar:
cool idae but i'd like better to use the smate wrapper to mate because it is aware of file owner and perms, how could i change your script in order to get smate instead of mate ?
best,
Yvon
Le 14 nov. 06 à 18:36, Jay Soffian a écrit :
I downloaded Marc Liyanage's "Open Terminal Here"[1] droplet and modified it to open TextMate instead. Hence, "Open TextMate Here". I've attached the droplet for anyone who's interested. I keep it in ~Library/Application Support/Finder (renamed to "Mate") and then stuck it in my Finder Toolbar:
i've change the "Open TextMate Here" from Jay Soffian in order to open Textmate thru smate (again from Jay Soffian) via mate.
then this script depends of mate which you must have installed and also upon smate which is attached to the mail <9EABCAD5-2225-4C97- B5C8-00850284DF05@soffian.org> posted by Jay Soffian on 8-NOV-2006.
same way to add it in a finder window :
this script will open a Terminal window like that :
after having saved your change and closed the opened TextMAte window you get :
the duplicate is then saved as the original if you've answered y.
any comment appreciated ;-)
Yvon
Hi,
I am trying the "Open Smate Here" Toolbar droplet (or whatever these little smart things have to be called), but I can't really get it to work. My terminal is saying: sudo: /Users/yvon/bin/smate: command not found So something still causes the script to look for the smate command in /Users/yvon/bin/ whereas on my system my ~ (home) obviously has a different path. I looked at the main.scpt in Smate.app/Contents/ Resources, but couldn't find any left references to /Users/yvon/
Any ideas? dirk
On 15-nov-2006, at 11:57, Yvon Thoraval wrote:
<Smate.app.zip>
any comment appreciated ;-)
Le 16 nov. 06 à 13:38, Dirk van Oosterbosch, IR labs a écrit :
sudo: /Users/yvon/bin/smate: command not found So something still causes the script to look for the smate command in /Users/yvon/bin/ whereas on my system my ~ (home) obviously has a different path. I looked at the main.scpt in Smate.app/Contents/ Resources, but couldn't find any left references to /Users/yvon/
yes sure thatt's a bigg mistake i thought i was aware of that ))
because i even wrote a function to retrieve smate :
(* Find full path of smate *) on whichBin(bin) return (quoted form of (do shell script "which " & (quoted form of bin))) end whichBin
yes you're right no reference at all to my $HOME, then that's not a simple mistake of me.
on my box i've another "dummy" account for such test i'll look for that tomorrow moring and let you know...
best,
Yvon
On Nov 16, 2006, at 7:39 AM, Dirk van Oosterbosch, IR labs wrote:
So something still causes the script to look for the smate command in /Users/yvon/bin/ whereas on my system my ~ (home) obviously has a different path. I looked at the main.scpt in Smate.app/Contents/ Resources, but couldn't find any left references to /Users/yvon/
Dirk - open the droplet in Script Editor and re-save it and you should be good.
j.
Le 16 nov. 06 à 19:12, Jay Soffian a écrit :
Dirk - open the droplet in Script Editor and re-save it and you should be good.
jay you think their is some kind of prefs in the dark, some unvisible file as .DS_Store storing this kind of info ?
best,
Yvon
On Nov 16, 2006, at 1:37 PM, Yvon Thoraval wrote:
jay you think their is some kind of prefs in the dark, some unvisible file as .DS_Store storing this kind of info ?
I observed the same problem as Dirk. I opened the script in Script Editor and resaved it. The problem was resolved.
I'm not an Applescript expert so that's all I know, but if I had to guess, it would be that the script bundle includes the script in both compiled and non-compiled form and that for whatever reason the copy of the bundle you distributed only had the changes to the non- compiled script. As to how that would happen, dunno.
j.
On 16 Nov 2006, at 18:49, Jay Soffian wrote:
I'm not an Applescript expert so that's all I know, but if I had to guess, it would be that the script bundle includes the script in both compiled and non-compiled form and that for whatever reason the copy of the bundle you distributed only had the changes to the non-compiled script. As to how that would happen, dunno.
That sounds about right. The compiled version of an AppleScript captures various things about the context in which it was compiled that can stop it from working when relocated.
Applescript is pretty nasty really :)
On 16-nov-2006, at 19:12, Jay Soffian wrote:
Dirk - open the droplet in Script Editor and re-save it and you should be good.
Strange, I did that and it is still not behaving as it should. Now the Terminal is saying "no smate in /usr/bin /bin /usr/sbin /sbin". Don't get it though, since 'which smate' gives '/Users/dirk/bin/smate' (and from my understanding that's what the Applescript should be doing, right?)
thanks, dirk
On 16 Nov 2006, at 20:06, Dirk van Oosterbosch, IR labs wrote:
Dirk - open the droplet in Script Editor and re-save it and you should be good.
Strange, I did that and it is still not behaving as it should. Now the Terminal is saying "no smate in /usr/bin /bin /usr/sbin / sbin". Don't get it though, since 'which smate' gives '/Users/dirk/bin/smate' (and from my understanding that's what the Applescript should be doing, right?)
I guess ~/bin should be added to whatever path it's using to search for the executable.
On Nov 16, 2006, at 3:07 PM, Dirk van Oosterbosch, IR labs wrote:
Now the Terminal is saying "no smate in /usr/bin /bin /usr/sbin / sbin". Don't get it though, since 'which smate' gives '/Users/dirk/bin/smate' (and from my understanding that's what the Applescript should be doing, right?)
The problem is that whichBin function in the script which (no pun) uses "do shell script". Do shell script just invokes /bin/sh w/o sourcing any of the users environment. You'll see this if you open up script editor and run the following script:
do shell script "env | sort"
So you just get the default login environment's PATH.
So you've got two options:
1) Use .MacOSX/environment.plist to modify the PATH that is part of your login environment. Google on "environment.plist" if you need more information...
2) Just edit the script to have a hard-coded path to wherever you chose to install smate.
However, all of this raises the question: how often do you guys go editing privileged files that you need not only a CLI wrapper around mate, but a droplet to boot? What are you people doing? :-)
j.
On 16-nov-2006, at 21:33, Jay Soffian wrote:
The problem is that whichBin function in the script which (no pun) uses "do shell script". Do shell script just invokes /bin/sh w/o sourcing any of the users environment. You'll see this if you open up script editor and run the following script:
do shell script "env | sort"
Ah, I see.
So you've got two options:
- Use .MacOSX/environment.plist to modify the PATH that is part of
your login environment. Google on "environment.plist" if you need more information...
- Just edit the script to have a hard-coded path to wherever you
chose to install smate.
Thanks!
However, all of this raises the question: how often do you guys go editing privileged files that you need not only a CLI wrapper around mate, but a droplet to boot? What are you people doing? :-)
Ehm, ... It sounded kinda nice to be able to do that from a droplet ... sorry? :-)
Le 16 nov. 06 à 13:38, Dirk van Oosterbosch, IR labs a écrit :
I am trying the "Open Smate Here" Toolbar droplet (or whatever these little smart things have to be called), but I can't really get it to work. My terminal is saying: sudo: /Users/yvon/bin/smate: command not found
this is due to the facr the property "smate" in my script is persistent, that's to say after the first time it has been set the value is remainded.
i'll post tomorrow worning a new version.
but the workaround given by Jay is OK.
a more definitive approach would be to the change all the lines in the script "main.scpt" where it is :
if smate is missing value set smate to whichBin("smate")
to :
set smate to whichBin("smate")
in that case the persistent value of smate will be overrided.
best,
Yvon