Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


script that will open marked text in a browser

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,61357
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> script that will open marked text in a browser
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 script that will open marked text in a browser - 6/13/2008 11:00:48 AM   
  brillesvin

 

Posts: 1
Score: 0
Joined: 2/26/2008
Status: offline
Hi
 
I have never made scripts before and I am sorry if I am posting in the wrong category. I have tried to find out by searching Google as well as this forum how to solve my problem – with out luck. I hope you can lead me in the right direction.
 
Is it possible to make a small script that will copy whatever text that is marked (in eg iexplorer or word) and string it with a url?
 
If the marked text in a document is “sunshine” – running the script will open the following url in a new browser window:
 
http://www.google.dk/search?hl=eng&q=sunshine
 
where “http://www.google.dk/search?hl=eng&q=” is a fixed string and “sunshine” is the variable (the marked text).
 
 
I have fount this script which will give me a browser with a url – is it possible to ‘feed’ the script with whatever text is marked (by using the clipboard maybe)
 
hope you can help me

BR



Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate "www.google.com" 
objExplorer.ToolBar = 1
objExplorer.StatusBar = 1
objExplorer.Width=1024
objExplorer.Height = 768
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
 
 
Post #: 1
 
 RE: script that will open marked text in a browser - 6/16/2008 12:04:39 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
strOtherStuff = "sunshine"
Set objExplorer = WScript.CreateObject("InternetExplorer.Application")

objExplorer.Navigate "www.google.dk/search?hl=eng&q=" & strOtherStuff
objExplorer.ToolBar = 1
objExplorer.StatusBar = 1
objExplorer.Width=1024
objExplorer.Height = 768
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to brillesvin)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> script that will open marked text in a browser Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts