Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Open any URL from any app with Butler and AppleScript' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Open any URL from any app with Butler and AppleScript
Authored by: MtnBiker on Thu, Jun 7 2007 at 8:02AM PDT
For some reason when I do this the box to type in (that box must have a name) is not in focus (I have to click in the box to be able to type, otherwise I'm still in the application I was in before I typed the shortcut). I put the script in Butler. Is this my set-up or the way Butler works?

If I make it an AS script and put in my Scripts folder, and I run the script from the Scripts Menu, the text fox comes up in focus.

I'd love to use this because it would save steps and it is fast.

I'm also going to change one of the buttons to Cancel because I have so (too) many shortcuts defined and I get the wrong one once in a while. Or is there another way to activate Cancel? "esc" doesn't work.

Second question: can Safari be changed to "default browser"? I sometimes change my default browser to Webkit or Firefox.

Thanks for posting this.

---
Hermosa Beach, CA USA

[ Reply to This | # ]
Open any URL from any app with Butler and AppleScript
Authored by: jdm on Thu, Jun 7 2007 at 4:03PM PDT
If you wrap the display dialog in a "tell application" then the dialog will be brought to the front.

Here is my modification of the first couple of lines:

tell application "Finder"
display dialog "URL?" default answer "" buttons {"cancel", "open"} default button 2
set {text returned:theURL, button returned:okay} to result
end tell

if theURL is "" or okay is "cancel" then error number -128 -- cancel

[ Reply to This | # ]
Open any URL from any app with Butler and AppleScript
Authored by: dtomasch on Thu, Jun 7 2007 at 8:07PM PDT
Add:
 

Tell Application "Butler"
activate
end tell

to the beginning, and it will bring the dialog box to front. dt

[ Reply to This | # ]