Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,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 whoever 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 Jun 07, '07 08:02:40AM

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 Jun 07, '07 04:03:39PM

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 Jun 07, '07 08:07:37PM
Add:
 

Tell Application "Butler"
activate
end tell

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

[ Reply to This | # ]