silvercover Posted September 25, 2005 Share Posted September 25, 2005 Hi folks? Is there any way to send keystrokes to a form which reside in a loaded HTML page or generally webpage? For example : I want to send a sentence to one filed of a webpage from autoit? How can I do that? Thanx in advance The more I learn the less I know! Link to comment Share on other sites More sharing options...
DaleHohm Posted September 25, 2005 Share Posted September 25, 2005 You could try the IE Automation UDF Library. You'll need the beta version of AutoIt to use it. See Post 3 in the IE Automation thread for some examples and quite a few others scattered throughout the forums.DaleHi folks?Is there any way to send keystrokes to a form which reside in a loaded HTML page or generally webpage?For example : I want to send a sentence to one filed of a webpage from autoit? How can I do that?Thanx in advance Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
silvercover Posted September 27, 2005 Author Share Posted September 27, 2005 Thanks! As you said it is still in beta, how stable is that? The more I learn the less I know! Link to comment Share on other sites More sharing options...
DaleHohm Posted September 27, 2005 Share Posted September 27, 2005 I use the beta exclusively. When there is trouble with the beta versions (which is rare) it is typically with the newest functionality that is available only in the beta. The COM support has been in the beta for months now and is pretty solid. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
silvercover Posted October 13, 2005 Author Share Posted October 13, 2005 Hi Dale, I found Internet Explorer Automation UDF Library very useful, but I couldn't manage to do automation tasks on an already opened browser window. Imagine there is opened browser window containg some forms, so how can I force AutoIt to type in forms. Every IE Automation UDFs needs an object to be created and those are useful when we want to start from first. What is the solution for this situation? Thanks in advance. The more I learn the less I know! Link to comment Share on other sites More sharing options...
layer Posted October 13, 2005 Share Posted October 13, 2005 What's the webpage ? Or is there a webpage like it, we could show you the steps, and others can watch and learn too. FootbaG Link to comment Share on other sites More sharing options...
silvercover Posted October 14, 2005 Author Share Posted October 14, 2005 Hi I know how to do that. My question is how can I do automation on a page which is not opened by autoit and opened by User. As you know every automation examples provided here at the forum first Open browser or navigate to somewhere first, I want to skip this steps and directly send keystrokes or commands to an already opened webpage. thanks. The more I learn the less I know! Link to comment Share on other sites More sharing options...
LxP Posted October 14, 2005 Share Posted October 14, 2005 Well, how might you go about filling out this form if you're not able to click items based on what they look like? Obviously AutoIt can't read a webpage in the same way that a human does, so a different approach is needed.Generally when you load a page, it will take a certain number of Tab presses to reach the desired element of the page. Although it's not an ideal solution, you could send this number of Tabs to the browser and then assume that the cursor has reached the first element of the form. You could then Send() a series of keystrokes to fill out the field, Send() another tab and then repeat until all of the fields are completed and the Submit button has the focus. Link to comment Share on other sites More sharing options...
silvercover Posted October 14, 2005 Author Share Posted October 14, 2005 (edited) Thank you Lxp. So it means there is no possibilty in current version to get elements of an opened documet to return an array...Is there any chance to implement it by AutoIt developers in future versions? Edited October 14, 2005 by silvercover The more I learn the less I know! Link to comment Share on other sites More sharing options...
DaleHohm Posted October 14, 2005 Share Posted October 14, 2005 Take a look at the _IEAttach function -- it gives you a reference to an existing IE brwser window and then you can do anything you could have done with _IECreateDaleHi Dale,I found Internet Explorer Automation UDF Library very useful, but I couldn't manage to do automation tasks on an already opened browser window. Imagine there is opened browser window containg some forms, so how can I force AutoIt to type in forms. Every IE Automation UDFs needs an object to be created and those are useful when we want to start from first. What is the solution for this situation?Thanks in advance. Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
silvercover Posted October 15, 2005 Author Share Posted October 15, 2005 Thanks Dale. AutoIt Rocks. The more I learn the less I know! Link to comment Share on other sites More sharing options...
silvercover Posted October 15, 2005 Author Share Posted October 15, 2005 Hi dale, Could you please give an example on how to use _IEAttach function for yahoo login page : www.mail.yahoo.com Thanks. The more I learn the less I know! Link to comment Share on other sites More sharing options...
DaleHohm Posted October 15, 2005 Share Posted October 15, 2005 OK,$oIE = _IEAttach("www.mail.yahoo.com", "url")Take a look at the function header to see the parameter description and the func statement to see that Title is the default.;=================== ; ; Function Name: _IEAttach() ; Description: Attach to the first existing instance of Internet Explorer where the search string sub-string matches ; based on the mode selected. ; Parameter(s): $s_string - String to search for ; $s_mode - Search Mode, match substring in Title, URL, body Text or body HTML ; Requirement(s): AutoIt3 Beta with COM support (post 3.1.1) ; Return Value(s): On Success - Returns an object variable pointing to the IE Window Object ; On Failure - 0 and sets @ERROR = 1 on no match and @ERROR = 99 on invalid Mode ; Author(s): Dale Hohm ; ;=================== ; Func _IEAttach($s_string, $s_mode = "Title")DaleHi dale,Could you please give an example on how to use _IEAttach function for yahoo login page :www.mail.yahoo.comThanks. Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
silvercover Posted October 15, 2005 Author Share Posted October 15, 2005 (edited) That's ok, butwhen I want to use _IEFormElementGetObjByName or _IEFormGetObjByName after _IEAttach AutoIt gives me an error saying: Error: Variable must be of type "Object". Thanks anyway. Edited October 15, 2005 by silvercover The more I learn the less I know! Link to comment Share on other sites More sharing options...
DaleHohm Posted October 15, 2005 Share Posted October 15, 2005 I just looked at the page and you are likely having trouble because www.mail.yahoo.com is not the real URL -- it redirects to http://mail.yahoo.com (so the www.mail.yahoo.com url will not match). Instead use:$oIE = _IEAttach("mail.yahoo.com", "url")You could also match on title like this:$oIE = _IEAttach("Sign in to Yahoo!")DaleThat's ok, butwhen I want to use _IEFormElementGetObjByName or _IEFormGetObjByName after _IEAttach AutoIt gives me an error saying:Error: Variable must be of type "Object".Thanks anyway. Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
silvercover Posted October 22, 2005 Author Share Posted October 22, 2005 Thanks Dale. It works now. Is there any chance to have these kinds of automation for other browsers such as Opera, Netscape and FireFox? The more I learn the less I know! Link to comment Share on other sites More sharing options...
DaleHohm Posted October 22, 2005 Share Posted October 22, 2005 Sorry - they don't expose a COM object model. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
seandisanti Posted April 12, 2006 Share Posted April 12, 2006 Sorry - they don't expose a COM object model.Daledale, a while ago you posted a link to some documentation on all of the objects etc, and i'm not finding it with search. still have it handy? Link to comment Share on other sites More sharing options...
seandisanti Posted April 12, 2006 Share Posted April 12, 2006 dale, a while ago you posted a link to some documentation on all of the objects etc, and i'm not finding it with search. still have it handy?disregard, i found it 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