Analyze Posted November 4, 2009 Share Posted November 4, 2009 Here My Input http://www.google.com/?d=GVOMXHQ2 Output i want to change url to this http://www.google.com/mgr_dl.php?d=GVOMXHQ2 I need to change /?d to /mgr_dl.php?d How i can write it on Autoit ? Link to comment Share on other sites More sharing options...
AlmarM Posted November 4, 2009 Share Posted November 4, 2009 If the string is always the same length, you could use this: $String = InputBox(Default, "Input string.", "http://www.google.com/?d=GVOMXHQ2") $GoogleString = "http://www.google.com/" $myVar = StringRight($String, 8) $Result = $GoogleString & "mgr_dl.php?d=" & $myVar ConsoleWrite($Result & @CRLF) Not a very smart option, but I dont have much time. Good luck~ Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Analyze Posted November 4, 2009 Author Share Posted November 4, 2009 (edited) Big Thx But i dont understand it to 100 % can you help me again ? Anything i make wrong. I want to convert the link when i press "Get it" and then i want thats autoit open it in IE window. #include <IE.au3> $gui = GUICreate("Internet", 800, 600, 195, 127) $String = GUICtrlCreateInput("http://www.google.com/?d=GVOMXHQ2", 5, 355, 440, 21) $GoogleString = "http://www.google.com/" $myVar = StringRight($String, 8) $Result = $GoogleString & "mgr_dl.php?d=" & $myVar $button_url = GUICtrlCreateButton("Get It", 456, 352, 129, 25, 0) $oIE = _IECreateEmbedded() $oIE_ctrl = GUICtrlCreateObj($oIE, 0, 0, 800, 300) GUISetState(@SW_SHOW) _IENavigate($oIE, "http://www.google.com/?") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $String _IENavigate($oIE,$Result) EndSwitch WEnd Edited November 4, 2009 by Analyze Link to comment Share on other sites More sharing options...
AlmarM Posted November 4, 2009 Share Posted November 4, 2009 Big Thx But i dont understand it to 100 % can you help me again ? Anything i make wrong. I want to convert the link when i press "Get it" and then i want thats autoit open it in IE window. Hows this: #include <IE.au3> Global $GoogleString = "http://www.google.com/" $gui = GUICreate("Internet", 800, 600, 195, 127) $String = GUICtrlCreateInput("http://www.google.com/?d=GVOMXHQ2", 5, 355, 440, 21) $button_url = GUICtrlCreateButton("Get It", 456, 352, 129, 25, 0) $oIE = _IECreateEmbedded() $oIE_ctrl = GUICtrlCreateObj($oIE, 0, 0, 800, 300) _IENavigate($oIE, "http://www.google.com/?") GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $button_url $myVar = StringRight(GUICtrlRead($String), 8) $Result = $GoogleString & "mgr_dl.php?d=" & $myVar _IENavigate($oIE, $Result) EndSwitch WEnd ~ Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Analyze Posted November 4, 2009 Author Share Posted November 4, 2009 Big Thx Perfect The Rest i hope i can do by myself you are The Best Thx Thx Thx Thx Link to comment Share on other sites More sharing options...
AlmarM Posted November 5, 2009 Share Posted November 5, 2009 Youre welcome ^^, Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
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