JavaScript_Freek Posted August 11, 2006 Posted August 11, 2006 Case $msg = $zs14\ Run(@ComSpec & ' /c start http://invisionfreeskins.com/index.php?act=UserCP&CODE=02', '', @SW_HIDE)When I go to the menu it links me to: http://invisionfreeskins.com/index.php?act=UserCPbut leaves the &CODE=02 behind. Why is that? [center]Cookyx.com :: Simple LAN Chat[/center]
GaryFrost Posted August 11, 2006 Posted August 11, 2006 Run (@ComSpec & ' /c start "http://invisionfreeskins.com/index.php?act=UserCP&CODE=02"', '', @SW_HIDE) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
BigDod Posted August 11, 2006 Posted August 11, 2006 (edited) Use Beta #include <IE.au3> $oIE = _IECreate ("http://invisionfreeskins.com/index.php?act...CP&CODE=02") Edit - @GaFrost, your does not work for me. Edited August 11, 2006 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Moderators SmOke_N Posted August 11, 2006 Moderators Posted August 11, 2006 Personally I like using their default browser, and use this 99% of the time:$Url = "http://invisionfreeskins.com/index.php?act...CP&CODE=02" DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", 'open', "string", $Url, "string", '', "string", @ScriptDir, "long", @SW_SHOWNORMAL) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
GaryFrost Posted August 11, 2006 Posted August 11, 2006 Use Beta #include <IE.au3> $oIE = _IECreate ("http://invisionfreeskins.com/index.php?act...CP&CODE=02") Edit - @GaFrost, your does not work for me. You might have the same problem I have, just using the command I posted or even Smokes don't work for me either. But the following does work for me. Run (@ComSpec & ' /c start explorer "http://invisionfreeskins.com/index.php?act=UserCP&CODE=02"', '', @SW_HIDE) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Moderators SmOke_N Posted August 11, 2006 Moderators Posted August 11, 2006 that explorer works well... Mine don't work? SP2 XP right? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
GaryFrost Posted August 11, 2006 Posted August 11, 2006 that explorer works well... Mine don't work? SP2 XP right?Yep SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Klaatu Posted August 11, 2006 Posted August 11, 2006 The start method doesn't work because of the command syntax of start: if given a quoted string as it's first parameter, it takes that as the title of the window to open. Try this instead and see if it works any better: Run (@ComSpec & ' /c start "anything here" "http://invisionfreeskins.com/index.php?act=UserCP&CODE=02"', '', @SW_HIDE) My Projects:DebugIt - Debug your AutoIt scripts with DebugIt!
GaryFrost Posted August 11, 2006 Posted August 11, 2006 The start method doesn't work because of the command syntax of start: if given a quoted string as it's first parameter, it takes that as the title of the window to open. Try this instead and see if it works any better: Run (@ComSpec & ' /c start "anything here" "http://invisionfreeskins.com/index.php?act=UserCP&CODE=02"', '', @SW_HIDE)oÝ÷ Ûú®¢×©ä²ØZ· +Çè®g¢y«¢+Ø)IÕ¸¡ ½µMÁµÀìÌäì½ÍÑÉÐÅÕ½ÐìÅÕ½ÐìÅÕ½Ðí¡ÑÑÀè¼½¥¹Ù¥Í¥½¹ÉÍ¥¹Ì¹½´½¥¹à¹Á¡ÀýÐõUÍÉ @µÀí =ôÀÈÅÕ½ÐìÌäì°ÌäìÌäì°M]}!%¤( SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
JavaScript_Freek Posted August 11, 2006 Author Posted August 11, 2006 (edited) yay thanks Klaatu and everyone else Edited August 11, 2006 by JavaScript_Freek [center]Cookyx.com :: Simple LAN Chat[/center]
Moderators SmOke_N Posted August 11, 2006 Moderators Posted August 11, 2006 Hmm, everything I tried worked on mine (FireFox XP Pro SP2)... But w0uter made a nice little UDF that I just remembered, and all these worked as well:$Url = "http://invisionfreeskins.com/index.php?act...CP&CODE=02" For $i = 0 To 3 If _INetBrowse($URL, $i) Then ExitLoop Next MsgBox(64, 'Info', 'Option ' & $i & ' worked') Func _INetBrowse($s_URL, $i_OPT = 2) Switch $i_OPT Case 0 ;drawback: doesnt work on urls with "&" RunWait(@ComSpec & ' /c start ' & $s_URL, @WorkingDir, @SW_HIDE) Return 1 Case 1 ;thx to sykes <--------------------------------------------- RunWait("rundll32.exe url.dll,FileProtocolHandler " & $s_URL, @WorkingDir) Return 1 Case 2 ;prefered 1 DllCall("Shell32.dll", "int", "ShellExecute", "hwnd", 0, "str", 'open', "str", $s_URL, "str", '', "str", @WorkingDir, "int", 10) Return 1 Case 3 ;prefered 2 $o_SA = ObjCreate('Shell.Application') $o_SA.Open($s_URL) Return 1 EndSwitch Return 0 EndFunc ;==>_INetBrowseJust for some more options. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
GaryFrost Posted August 11, 2006 Posted August 11, 2006 @Smoke, option 0 should now work with "&" $Url = "http://invisionfreeskins.com/index.php?act=UserCP&CODE=02" For $i = 0 To 3 If _INetBrowse($Url, $i) Then ExitLoop Next MsgBox(64, 'Info', 'Option ' & $i & ' worked') Func _INetBrowse($s_URL, $i_OPT = 2) Switch $i_OPT Case 0 ;drawback: doesnt work on urls with "&"/ now should work with "&" RunWait(@ComSpec & ' /c start " " "' & $s_URL & '"', @WorkingDir, @SW_HIDE) Return 1 Case 1 ;thx to sykes <--------------------------------------------- RunWait("rundll32.exe url.dll,FileProtocolHandler " & $s_URL, @WorkingDir) Return 1 Case 2 ;prefered 1 DllCall("Shell32.dll", "int", "ShellExecute", "hwnd", 0, "str", 'open', "str", $s_URL, "str", '', "str", @WorkingDir, "int", 10) Return 1 Case 3 ;prefered 2 $o_SA = ObjCreate('Shell.Application') $o_SA.Open ($s_URL) Return 1 EndSwitch Return 0 EndFunc ;==>_INetBrowse SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Moderators SmOke_N Posted August 11, 2006 Moderators Posted August 11, 2006 That's a gooden ... I meant to add that in there before I posted, but didn't bother ... thank god your there to catch me when I'm falling (more like kick me when I'm down ) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
MHz Posted August 11, 2006 Posted August 11, 2006 The start method doesn't work because of the command syntax of start: if given a quoted string as it's first parameter, it takes that as the title of the window to open. Try this instead and see if it works any better: Run (@ComSpec & ' /c start "anything here" "http://invisionfreeskins.com/index.php?act=UserCP&CODE=02"', '', @SW_HIDE)Never seen a Url have spaces so use Start command without quotes. You are dead right about the title, silly M$ for that add on or can you give me a good reason to add the title junk because I cannot understand why.
Klaatu Posted August 14, 2006 Posted August 14, 2006 Never seen a Url have spaces so use Start command without quotes. You are dead right about the title, silly M$ for that add on or can you give me a good reason to add the title junk because I cannot understand why.For this instance there is no good reason specifically. A good reason is to have a method that works regardless of the special case. My Projects:DebugIt - Debug your AutoIt scripts with DebugIt!
Skruge Posted August 15, 2006 Posted August 15, 2006 Actually, there is a reason... Without quotes, you would need to escape the ampersand.Run (@ComSpec & ' /c start http://invisionfreeskins.com/index.php?act=UserCP^&CODE=02', '', @SW_HIDE)(But it's much easier to use quotes) [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
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