Tanpn

How to sendkeys + sendclick to minimize browser (chrome, IE, ...)

10 posts in this topic

Hi all!

I want to sendkeys + sendclick to a minimize browser. 

I trys to search on google.com, I see a way is using controlsend and controlclick.

But I used it not send to minimize windows, windows active it work.

 

Please help me!

Thanks!

Share this post


Link to post
Share on other sites



If you want to minimize a window, check 

WinSetState ( "title", "text", flag )

 

Share this post


Link to post
Share on other sites
33 minutes ago, Anoop said:

If you want to minimize a window, check 

WinSetState ( "title", "text", flag )

 

Hi Anoop!

Thanks for your help

I don't want to minimize windows.

I want to send key and click to minimized windows.

 

Share this post


Link to post
Share on other sites

ControlSend and Control Click do not need an Active window to work.

Please show us what you have so far on code and a better explanation of what you are trying to accomplish.

Using send or mouseclick to minimize a window is like cutting your toenails with your socks on... 

Share this post


Link to post
Share on other sites
2 hours ago, Tanpn said:

Hi Anoop!

Thanks for your help

I don't want to minimize windows.

I want to send key and click to minimized windows.

 

If it is IE browser, you can use IE functions automate these. In the below example, IE opens and navigates to google, minimize browser and searches for autoit.

 

#include <IE.au3>

Local $oIE = _IECreate("www.google.com")
WinSetState("Google - Windows Internet Explorer","",@SW_MINIMIZE )

$oTxtSearch = _IEGetObjByName($oIE, "q")
$oForm = _IEGetObjByName($oIE,"f")

_IEFormElementSetValue($oTxtSearch,"autoit")
_IEFormSubmit($oForm)
;_IEQuit($oIE)

 

Share this post


Link to post
Share on other sites

I think he wants to know how to send commands to a minimized Window, not how to actually minimize one.

Anyway, ControlSend is the way to go.

Share this post


Link to post
Share on other sites

More information will result in more help.

You are trying to send keys and mouse clicks to a window that is minimized, correct?
What kind of window are you trying to send to? Is it IE? Chrome? Which program?
What actions are you trying to do on <program> while it is minimized?

It's important to know what program it is because depending on the program it might be difficult / impossible to controlSend to it, or it might have an easier way to do what you want to accomplish directly (like through OLE/COM)


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites
4 hours ago, corgano said:

More information will result in more help.

You are trying to send keys and mouse clicks to a window that is minimized, correct?
What kind of window are you trying to send to? Is it IE? Chrome? Which program?
What actions are you trying to do on <program> while it is minimized?

It's important to know what program it is because depending on the program it might be difficult / impossible to controlSend to it, or it might have an easier way to do what you want to accomplish directly (like through OLE/COM)

Hi Corgano!

 wants to know how to send keys and mouse to a minimized or hide any browser as IE, Chrome, Firefox, Opera, Safari, .....

 

12 hours ago, r3dbullo88 said:

I think he wants to know how to send commands to a minimized Window, not how to actually minimize one.

Anyway, ControlSend is the way to go.

Hi r3dbull088!

I tried using ControlSend and ControlClick, but it not send to minimized or hide browser, browser active it work.

Share this post


Link to post
Share on other sites

Show the code you're using.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

14 hours ago, Tanpn said:

Hi Corgano!

 wants to know how to send keys and mouse to a minimized or hide any browser as IE, Chrome, Firefox, Opera, Safari, .....

Ok so you don't have a specific browser in mind, just a general all-browser solution....

I'm rather sure such a general, all-browser solution does not exist. The most obvious answer is ControlSend(), which will work for basic controls - try it with notepad, calculator, or an installer, and it "should" work. However ControlSend() doesn't work well with browsers because the content is rendered and not standard windows controls.

Save yourself all of the headache, and pick one browser you want to work with. Focus on that.

This brings me to the second question, do you know what you want to do on the browser? What is your end goal, what do you want to actually do. Or is the goal simply to click a minimized browser and nothing more?

Edited by corgano

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
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