Wednesday, March 28, 2007

testing new get firefox url link script

So i nicked it from Adiumscript (right click, show package contents, then drill down to Contents -> Resources, open .scpt file) and saved it out to Ecto scripts file so i can call it.

The idea behind this one is that when you want to link a word or phrase in Ecto all I could find to do was:

write something in a blog post and decide to link it
Highlight word
Right Click and Search with Google
launches Browser
Click on suitable link
click in Address bar
cmd+c
flick back to Ecto
cmd+shift+u
Href link created

pretty long winded I'd say so I knew that I can paste current URL from Firefox directly in to an Adium chat with either /ffl or clicking on icon (i ALWAYS prefer keyboard) so I figured there has to be a way to highlight word, call script which stores current URL and then cmd+shift+u, perhaps I can get it all in one at some point but baby steps here as I'm just learning.

Oh and this is the post that I want to test it on so here goes, real time, I've copied the script so the word on the next line I will highlight and give it a go

Etech

Hmm, if you click on that link you wont get Etech, it's the last thing I cmd+c even though my new Firefoxcurrentpage shows in the list....thinking

Ok I've been messing about with this for over an hour and i can get Applescript to show results of getting current URL in the bottom window now but when I switch to another app and cmd+v I don't get the same contents..damn i thought this would be easy!!

Duh moment, I removed the return statement immediately before the set clipboard line and it seems to work now, why the hell would a return statement wipe the set command !!!

Etech

but anyway it works now an after all that is it easier, maybe not but I learned something which is always good, next up remove some more steps, for the record it's now at

write something in a blog post and decide to link it
Highlight word
Invoke Quicksilver and type term
launches Browser
Click on suitable link
flick back to Ecto
click on scripts
click on Firefoxcurrentpage
cmd+shift+u
Href link created



hmm, looking at previous list NO steps saved ! However some ideas spring to mind about how to save some of them but need to learn more and since I had a few glasses of Red at the Exhibition open night and I really want to watch final episode of BSG I'll stop for now

ok i was going to stop but then I got a sudden idea to add to the script, let's see if it works

Happy Dayshttp://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://pastie.caboo.se/15553http://about:blankhttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescripthttp://www.google.co.uk/search?hl=en&q=interrupt+applescript


oops that's some verbose output from a cock up !!!!

and there was another section after this but deleted, don't want too much link love to Etech after all !

Etech

Yay it works !!!

ah , maybe I can do a bit more.....

oh maybe not, maybe don't need to more later, BSG now

Technorati Tags: , , ,