GooGooDolls Posted January 27, 2009 Share Posted January 27, 2009 Yeah so basically I am trying to create a little script that will let me insert an address in a box, and then open up Internet Explorer and automatically go to that address. I tried doing it by looking at other scripts but I can't get pass the URL to IE...Is there a way to add the user input as a switch to IE? Like so --> IEXPLORE.EXE http://www.xxx.xxx#include <GUIConstantsEx.au3> #include <IE.au3> Opt("WinTitleMatchMode", 2); Other Option for WinWaitActive GUICreate("URL Opener", 260, 100) GUISetFont(8.5, 800) GUICtrlCreateLabel("URL to open:", 90, 13) GUISetFont(8.5, 400) ;Button $input1 = GUICtrlCreateInput("", 10, 29, 240, 20) $ok = GUICtrlCreateButton("Ok", 90, 60, 100, 25) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select ;------------ OK Button - Finished Case $msg = $ok $sRead = GUICtrlRead($input1) Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE") <--NEED URL HERE AS SWITCH?? WinWait("[CLASS:IEFrame]") //$sRead = GUICtrlRead($input1) //ControlSetText("[CLASS:IEFRAME]", "", "Edit1", $sRead) ;------------ Cross - Finished Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEndHelp needed... Link to comment Share on other sites More sharing options...
billthecreator Posted January 27, 2009 Share Posted January 27, 2009 (edited) i believe you can do this: i could be wrong Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE" & " " & GuiCtrlRead($input))oÝ÷ Ø¥Á¬¬ºÇ¬ée{º×ºÚ"µÍÚ[^XÝ]J ][ÝÚËÝÝÝËÙXÚ]KÛÛI][ÝÊ Edited January 27, 2009 by billthecreator [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
GooGooDolls Posted January 27, 2009 Author Share Posted January 27, 2009 Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE" & " " & GuiCtrlRead($input))That gave me error on line 28Error: Variable used without being declaredHow do I declare it? Link to comment Share on other sites More sharing options...
BrettF Posted January 27, 2009 Share Posted January 27, 2009 make it the same as what you named your input box... You have to read the input box to see the text right? Same principle for AutoIt Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
GooGooDolls Posted January 27, 2009 Author Share Posted January 27, 2009 Ok, I got it working. Apparently there is a difference between writing $input and $input1 One more thing though, how would you insert the input inside an URL?Example:http://www.google.com/search?hl=sv&q=britney&btnG=S%C3%B6k&meta=so in my program I would just write britney......and it would take that input and place it between http://www.google.com/search?hl=sv&q= and ]&btnG=S%C3%B6k&meta=The above is just an example from the top of my head, but you understand what I mean right? Good! Link to comment Share on other sites More sharing options...
BrettF Posted January 27, 2009 Share Posted January 27, 2009 "blah" & $string & "blah" Its called string concatenation. Have a look for it in the helpfile Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
GooGooDolls Posted January 27, 2009 Author Share Posted January 27, 2009 string concatenationWell, now that I know what it's called I might actually find some info about it. (Lucky you already gave me the solution.) So, everything is working as it should now, thx for all the help! Couldn't have done it without you... Link to comment Share on other sites More sharing options...
feedbackForForums Posted June 3, 2009 Share Posted June 3, 2009 In a related matter, how would I actually select the edit control that serves as the address box? I want to select the url edit box, or address bar, and overwrite whatever's there. Right now I am tabbing back and forth to get this to happen, but it is sloppy and the solution goes out the window (erm, figuratively, not literally) as soon as I do something like a mouse click since the focus changes. Judging from other posts and my own searching, it seems like AutoIt is perfectly suited to getting this focus on the address bar by retrieving the Class, Instance, ClassNameNN, and Advanced (Class). How do I actually tell my script "Put the focus on this control which is associated with properties Cass X, Instance Y, ClassNameNN Z, etc."? I am replying to THIS thread in particular because this seemed like the most suitably-titled thread in my searches. If I missed something in the Help that could have answered this, please tell me where I can find it instead of just "look in the Help files". Thank you! 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