Jump to content

Recommended Posts

Posted

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

Posted

I don't understand all of your questions, but see is this helps with part of it:

ControlSetText instead of ControlSend

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

Posted

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

NEWHeader1.png

Posted (edited)

AutoIt cannot read text from browser , cannot find text on it dorectly

The 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
EndFunc

This 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 by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Posted

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 u

good luck

<{POST_SNAPBACK}>

Posted (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 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...