Jump to content

ControlSend


Mamba
 Share

Recommended Posts

I tried this to make sure and it works fine...

ControlSend("Title here", "" , "" ,"{F5}")

You use the autoit window info to get the title and text etc you need to interact with

You may have been using a control ID from a button IN the page therefore trying to send F5 to that instead of the page itself. Also its important to note that if you only use the above command should the title of the IE page change the script won't work. (if you entered google as the title, then go to yahoo and run the script it probably won't work.

EDIT - added a little more info... also welcome to the forum

Edited by someone
While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

Welcome to the forum.

There is one thing to note about Internet Explorer, it doesn't display pages in a format that ControlSend will work with.

You may want to look into using the IE.au3 Library of functions. It is documented in the help file.

I hope that helps,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Welcome to the forum.

There is one thing to note about Internet Explorer, it doesn't display pages in a format that ControlSend will work with.

You may want to look into using the IE.au3 Library of functions. It is documented in the help file.

I hope that helps,

JS

Thanks JS I forgot about that... Dale would kill me if he saw that....its too early in the morning @Mamba... the reason my code worked at all was it just chose the most recent window and sent F5... sorry for the confusion

Edited by someone
While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

Thanks JS I forgot about that... Dale would kill me if he saw that.... @Mamba... the reason my code worked at all was it just chose the most recent window and sent F5... sorry for the confusion

lol No problem. I hope that Mamba gets his problems solved.

@Mamba

If you are trying to send something to the browser vs to the page then ControlClick may work as follows.

ControlClick("Microsoft Internet Explorer", "Done", 40960) ;I assume you want to refresh the page after it has been displayed. ("Done") 40960 is the ControlID of the Refresh Button in IE.

herewasplato has an excellent example using the IE.au3 library of functions.

I hope this helps,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

...herewasplato has an excellent example using the IE.au3 library of functions...

Thanks ... and being my second "IE.au3" script, I hope that it is close to correct.

:-)

40960 is the ControlID of the Refresh Button in IE6

:-)

40960 is the ControlID of the Home Button in IE7

Edit: Actually, it does not appear to be unique to just those buttons. JS, did it work for you?

@Mamba,

Welcome to the forum....

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Thanks ... and being my second "IE.au3" script, I hope that it is close to correct.

:-)

40960 is the ControlID of the Refresh Button in IE6

:-)

40960 is the ControlID of the Home Button in IE7

Edit: Actually, it does not appear to be unique to just those buttons. JS, did it work for you?

@Mamba,

Welcome to the forum....

I didn't actually test. I will see how that comes out.

Edit: I had forgotten as I had written above. IE isn't windows compliant controls. ;)

Thanks,

JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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