MATISZON Posted November 14, 2009 Posted November 14, 2009 Can I open any page in which the default search engine? [size="3"][font="Arial Black"]I'm from the Polish do not as well know how English[/font][/size]
lsakizada Posted November 14, 2009 Posted November 14, 2009 (edited) Can I open any page in which the default search engine? #include <GUIConstants.au3> #include <Misc.au3> Global $clip $TheUrl = "http://www.bing.com/search?q=@WORD@&form=QBLH&filt=all" $TheUrl = StringReplace($TheUrl, "@WORD@", _URIEncode(StringStripWS(StringStripCR($clip),3))) _LaunchBrowser($TheUrl) Func _LaunchBrowser($URL) ShellExecute($URL) EndFunc Func _URIEncode($sData) ; Thanks to Prog@ndy Local $aData = StringSplit(BinaryToString(StringToBinary($sData, 4), 1), "") Local $nChar $sData = "" For $i = 1 To $aData[0] $nChar = Asc($aData[$i]) Switch $nChar Case 45, 46, 48 - 57, 65 To 90, 95, 97 To 122, 126 $sData &= $aData[$i] Case 32 $sData &= "+" Case Else $sData &= "%" & Hex($nChar, 2) EndSwitch Next Return $sData EndFunc ;==>_URIEncode Edited November 17, 2009 by lsakizada Be Green Now or Never (BGNN)!
MATISZON Posted November 15, 2009 Author Posted November 15, 2009 Thanks works [size="3"][font="Arial Black"]I'm from the Polish do not as well know how English[/font][/size]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now