saikumar Posted May 27, 2005 Posted May 27, 2005 Hi, I want to send keys a string to a IE find window. I am using concurrent operations . Autoit Control commands are not recognizing the Find window . So only option fo me is to use send cmd to give input. But when Two IE's launched and doing operations paralelly then send keys will go for active window but not for what we desired. AutoIt cannot read text from browser , cannot find text on it dorectly. If u use Autoitx then we should give another HTTP message which doesnt suits the purpose. Can any one tell me how can find text on browser without storing it in a file or giving one more request. Regards sai
DaleHohm Posted May 27, 2005 Posted May 27, 2005 I don't understand all of your questions, but see is this helps with part of it: ControlSetText instead of ControlSendDale 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
Valuater Posted May 27, 2005 Posted May 27, 2005 hope this helps........ #include <GUIConstants.au3> $Window=Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & "XPCleanMenu.HostRocket.com\down.html") ;$Window=Run("notepad.exe"); used for testing Sleep(1000) WinWaitActive("","",20) Sleep(1000) $Input = InputBox("Find", "Type in what you would like to Search for ","* Ver") Sleep(300) Send("{ALT}") Send("{E}") Send("{F}") Sleep(300) Send($Input) sleep(500) Send("{ENTER}") good luck
scriptkitty Posted May 27, 2005 Posted May 27, 2005 (edited) AutoIt cannot read text from browser , cannot find text on it dorectlyThe new beta, and in future versions of AutoIt, has support for COM objects. There are quite a few posts on the boards these days about it. It is only in beta atm, and it is a bit hard to understand.Using the new beta, you can create an Internet explorer object, or connect to an exhisting one.Once you have that object attached, you can do almost anything with it. You can fill in forms, submit them, navigate, or even change any HTML in it. Or simple things like read it.bugs:There are slight problems atm when you navigate to a page, that page is not fully loaded, and you try to work with it. It can crash out the script and return the error that it is not an object. This can be avoided by making sure the page is loaded. example:func donecheck($ObjIE); checks to see if IE object is loaded. Do Sleep(50) Until $ObjIE.ReadyState = 4 EndFuncThis is allowing some incredible things. I have increased the speed of some of my browser scripts by a factor of 10, and they are now almost bulletproof. The main reason is I can check in an instant to see if I got an error in the page, and adjust it, I can fill in forms instantly, and I don't have to rely on copy&paste or send commands. Oh yea, and It can all be done with IE minimised or hidden.Firefox is my browser of choice, but after talking with some of the mozilla developers, it will be a long time, at minimum to ever see support of this in the future. So I am doing what I need to in IE, and using FireFox for everything else. Edited May 27, 2005 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers.
saikumar Posted May 28, 2005 Author Posted May 28, 2005 I don't understand all of your questions, but see is this helps with part of it: ControlSetText instead of ControlSendDale<{POST_SNAPBACK}>It doesnt recognize find window and cannot set the text . I tried this also,
saikumar Posted May 28, 2005 Author Posted May 28, 2005 hope this helps........#include <GUIConstants.au3> $Window=Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & "XPCleanMenu.HostRocket.com\down.html") ;$Window=Run("notepad.exe"); used for testing Sleep(1000) WinWaitActive("","",20) Sleep(1000) $Input = InputBox("Find", "Type in what you would like to Search for ","* Ver") Sleep(300) Send("{ALT}") Send("{E}") Send("{F}") Sleep(300) Send($Input) sleep(500) Send("{ENTER}")This is not the right way. My problem is sending text to find window if i have two windows.EX:I have 2 IE's. In one IE i will launch Find and send some text to verify text on that.parellely in the second IE if there is Find window the keys will go the active one. I want keys to send for a specified.Thank ugood luck<{POST_SNAPBACK}>
DaleHohm Posted May 28, 2005 Posted May 28, 2005 (edited) What do you need to do once you have searched for and found text matches? As I see it you have two options - 1) if completing the Find operation is about as complicated as it gets, you can do some things to insure that the correct Find dialog has focus before using your Send command or 2) if you need to do some complex operations in the browser based upon whether you have a match (or need to do some complex operations ON what you find), then you should invest the time to use the COM interface in the current beta. Dale Edited May 28, 2005 by DaleHohm 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
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