Jump to content
Sign in to follow this  

How to simulate a mouse click on a invisible window with a certain handle?

Recommended Posts


PixelSearch ( left, top, right, bottom, color [, shade-variation = 0 [, step = 1 [, hwnd]]] )

Searches a rectangle of pixels for the pixel color provided  depending on a specified window handle.

MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] ) makes a click on a specified position.

How can I simulate a MouseClick on a window depending on a specified handle, which is invisibel, and without moving the mouse really?

Is this possible? How is the syntax?

Thanks in advance


Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

Share this post

Link to post
Share on other sites

You can't.

You can simulate the click, but the pixel part is not possible...


Why would you want to look for pixels?

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post

Link to post
Share on other sites

Hi jdelaney,

it's just for a browser game (=collecting  items ). I wanna do other things on my browser during that time .... There are no controls, only items...

Edited by jlorenz1

Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

Share this post

Link to post
Share on other sites


You have been a member since '03 - I would have expected you to keep abreast of changes to the Forum rules (there is also a link at bottom right of each page). :(

Please read them before you post again - thread locked. :naughty:


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  

  • Similar Content

    • By Clouds
      I'm writing a script that interacts with a webpage.
      The contents of the webpage depend on the size of the browser window.
      To get the (for me) correct contents from the page, the browser window must be maximized.
      However, I also don't need or want to see the browser window when the script creates it, so it should be invisible.
      At first I created the browser window with simply this: 
      $oIE = _IECreate ($url ,0 ,0 ,1 ,0) However, from the results I can see that the invisible browser window isn't maximized.
      So I changed the code to maximize the window, but then it becomes visible.
      Now I have this:
      $oIE = _IECreate ($url ,0 ,0 ,1 ,0) $hIE = _IEPropertyGet($oIE, "hwnd") WinSetState($hIE, "", @SW_MAXIMIZE) WinSetState($hIE, "", @SW_HIDE) ...but then I do see the browser window shortly when it is maximized.
      I could live with that if it were just a single browser window. But the script is opening (and closing) quite a few browser windows, and I don't wait to see them flicker, nor do I want to (be able to accidentally) interact with these windows.
      Any ideas on how to create and invisible yet maximized IE windows?
    • By irfan666
      Hi, how to make autoit "monitoring" program, Basically i want autoit to autoclick "start" button only  when the program is "stop" ? thanks

    • By timmy2
      I'm considering using a program called Frameless to display various graphic files -- including some animated gifs. Each graphic will have a button in it for the user to click on to move to the next graphic. (like a "Next" button).

      Frameless can display each graphic at a specific screen location so I can predict the coordinates of any element in the graphic, including this button.

      Frameless can force the graphic to be on top of all other windows, which I need.

      The problem with simply waiting for any mouse click is that my graphics tell the user how and where to click within programs that are visible behind each graphic. So the user will be clicking or or typing into those programs. All I can likely be sure of is that the user won't unintentionally click on the "Next" button in the graphic itself, thus my goal of limiting where this "hotspot" is.

      Can AutoIt be running in the background and detect when the user clicks on the button in each graphic?

      Bonus question: could AutoIt display the actual clickable button atop the graphic displayed by Frameless? No wait... I assume that's impossible if I set Frameless to always display "on top". Nevermind.

      Please don't recommend that I display the graphics using AutoIt because my experience with the hack to display animated gifs yields very slow-to-open graphics, and for me it's difficult to implement. Using Frameless to display the graphics seems to be a more efficient delegation of tasks.

  • Create New...