Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Applescript to open url in explorer

Applescript to open url in explorer
Thread Tools
ScottHaneda
Guest
Status:
Reply With Quote
Feb 12, 2001, 08:59 PM
 
I wan to take my active selection in Internet Explorer and pass that word to a url and open that url in a new window, I know nothing about applescript, can someone help, here is what I have so far, I need to replace the sddsadsaa with the selected word in INternet explorer, and tell it to pop open a new window

on run
set dictionary to "http://www.dictionary.com/cgi-bin/dict.pl?term=sddsadsaa"

tell application "Internet Explorer"
Activate


OpenURL dictionary
end tell
end run


     
Junior Member
Join Date: Mar 2000
Location: Salem, OR, USA
Status: Offline
Reply With Quote
Feb 22, 2001, 11:29 PM
 
Try this. Copy the word you want to the clipboard first. IE has no way of knowing what word is selected so you have to do it through the clipboard.


on run
set dictionary to "http://www.dictionary.com/cgi-bin/dict.pl?term=" & (the clipboard as string)

tell application "Internet Explorer"
Activate
OpenURL dictionary
end tell

end run
     
ScottHaneda
Guest
Status:
Reply With Quote
Feb 24, 2001, 02:52 AM
 
I actually managed to hack it out

tell application "Internet Explorer"
set theSelection to selected text
set dictionary to "http://www.dictionary.com/cgi-bin/dict.pl?term="
set entireurl to dictionary & theSelection
OpenURL entireurl
end tell

     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:02 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2