cloferba Posted September 29, 2011 Share Posted September 29, 2011 Because too many people has chrome, others have IE and others have Firefox as default browser, i made an app to load a webpage, after it has been load, it opens another, and then it press a key to insert a text after the page loads.. the problem is that first, I dont know why the program exitsand second, i dont know why the name and email field are not completed with the values i set to Send #include <GUIConstants.au3> #include <IE.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> HotKeySet("{ESC}", "ExitApp") Func ExitApp() Exit EndFunc ; http://www.rsforums.org/forums/programming/10337-autoit-simple-web-browser.html $GUI = GUICreate("Browser", 1024, 700, -1, -1, $WS_MAXIMIZE) $object = ObjCreate("Shell.Explorer.2") $object_ctrl = GUICtrlCreateObj($object, 1, 1, 1024, 700) $back_button = GUICtrlCreateButton("Atras", 16, 710, 50, 25, 0) ; Creats Back GUI $forward_button = GUICtrlCreateButton("Adelante", 66, 710, 50, 25, 0) ; Creates Forward GUI $refresh_button = GUICtrlCreateButton("Refresh", 116, 710, 50, 25, 0) ; Creates Refresh GUI GUISetState() ;$oIE = _IECreate ("http://www.puntk.com") _IENavigate ($Object, "http://wprocks.com/demo/") _IENavigate ($Object, "http://wprocks.com/demo/contact") _IELoadWait($Object) Send("{TAB 9}") Send("This is my name") Send("{TAB}") Send("This is my email") I appreciate any help PD: i made the browser using this browser base at this url: http://www.rsforums.org/forums/programming/10337-autoit-simple-web-browser.html Link to comment Share on other sites More sharing options...
Ramzes Posted September 29, 2011 Share Posted September 29, 2011 1/First question has very funny answer: your program exits because it's end of your script.You should use some loop, e.g.While 1 Sleep(10) WEndor time delay to exit:Sleep(5000) 2/ You should use _IEFormElementSetValue. It's better than Send. Sorry for my bad English but nobody is perfect. [font=arial, helvetica, sans-serif]Ramzes[/font] Link to comment Share on other sites More sharing options...
cloferba Posted September 29, 2011 Author Share Posted September 29, 2011 _IEFormElementSetValue. It's better than Send. but in some cases it doesnt work...i dont want only to fill a form, also navigate on menues and more so Link to comment Share on other sites More sharing options...
cloferba Posted September 29, 2011 Author Share Posted September 29, 2011 You should use _IEFormElementSetValue. It's better than Send.but im not going to navigate only through contact forms...i want also to open menus and insert texts in other text boxes Link to comment Share on other sites More sharing options...
Ramzes Posted September 29, 2011 Share Posted September 29, 2011 Read help files for other _IE functions and search for examples. I think you should read some tutorials before you posting. Sorry for my bad English but nobody is perfect. [font=arial, helvetica, sans-serif]Ramzes[/font] Link to comment Share on other sites More sharing options...
cloferba Posted September 29, 2011 Author Share Posted September 29, 2011 Read help files for other _IE functions and search for examples. I think you should read some tutorials before you posting.too many examples are old and they doesnt work also the help is no so easy to understand Link to comment Share on other sites More sharing options...
Ramzes Posted September 29, 2011 Share Posted September 29, 2011 too many examples are old and they doesnt work also the help is no so easy to understand Everything is easy but you need time and ambitions. If you have problem I can fix some doesn't working script from help file or explain you something. Sorry for my bad English but nobody is perfect. [font=arial, helvetica, sans-serif]Ramzes[/font] 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