D.M. Posted February 4, 2010 Share Posted February 4, 2010 Hi all, What i'm trying to do is to send a mouse click to a minimized window. The program in this case is called "WinWap" (www.winwap.com), i want to gathering some informations from a WAP page while using the computer. Here is the "Autoit Window Info" of it: expandcollapse popup>>>> Window <<<< Title: Winwap Portal - Home - WinWAP for Windows Class: TMainForm Position: -8, -8 Size: 1280, 786 Style: 0x16CF0000 ExStyle: 0x00010110 Handle: 0x002F0564 >>>> Control <<<< Class: Instance: ClassnameNN: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: 0x0001008C >>>> Mouse <<<< Position: 303, 10 Cursor ID: 0 Color: 0xC2CFDD >>>> StatusBar <<<< >>>> Visible Text <<<< Winwap Portal - Home http://portal.winwap.com/ http://portal.winwap.com/ ToolBar1 >>>> Hidden Text <<<< For some reason, the _MouseClickPlus() don't work here. I tried the follow code on paint, just for test purpose, got no results: For $f = 200 to 600 $handle = ControlGetHandle(WinGetHandle("Sem título - Paint"), '', '[CLASS:Afx:1000000:8;INSTANCE:1]') _MouseClickPlus($handle, "Left", $f, $f,1) Next *the _MouseClickPlus function was already attached to the script. I tried to use ControlClick() istead of _MouseClickPlus(), like this: For $i = 200 to 600 ControlClick("Sem título - Paint", "", "[CLASS:Afx:1000000:8; INSTANCE:1]", "Left", 1, $i, $i) Next I also tried the both codes with #RequireAdmin, didn't work too. I use Windows Vista. Can anybody help me? Thanks in advance. Link to comment Share on other sites More sharing options...
D.M. Posted February 5, 2010 Author Share Posted February 5, 2010 Anyone? Link to comment Share on other sites More sharing options...
Minikori Posted February 5, 2010 Share Posted February 5, 2010 Check your _MouseClickPlus() parameters. First is title, not handle. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
D.M. Posted February 7, 2010 Author Share Posted February 7, 2010 Check your _MouseClickPlus() parameters. First is title, not handle.Doesn't work either... Link to comment Share on other sites More sharing options...
DeathRow Posted March 30, 2012 Share Posted March 30, 2012 C'mon ,I need this too,any help? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 30, 2012 Moderators Share Posted March 30, 2012 (edited) DeathRow, it is considered general forum etiquette not to resurrect threads after about a year or so. The AutoIt language advances at such a pace that what was suggested in 2010 may not work for you today. I would suggest opening a new thread, clearly explaining what you would like to accomplish, as well as what you have already tried on your own, and showing a small piece of reproducer code. This way, we can do our best to assist you Edit: grammar Edited March 30, 2012 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
BrewManNH Posted March 30, 2012 Share Posted March 30, 2012 Not to mention, that was an extremely rude way of asking for help. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Rogue5099 Posted March 30, 2012 Share Posted March 30, 2012 Don't know if this will work but you can try it: expandcollapse popup;################################################# ;~ AutoIt Version: 3.3.6.1 ;~ Author: Insolence ;~ Credits: -||- ;~ Modified: Shaggi ;~ Feautures: Ability to click and send keys to a minimized window. ;################################################# #include-once Func _MouseClickMinimized($Handle, $Button = "left", $X = "", $Y = "", $Clicks = 1) Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 Local $MK_RBUTTON = 0x0002 Local $WM_RBUTTONDOWN = 0x0204 Local $WM_RBUTTONUP = 0x0205 Local $WM_MOUSEMOVE = 0x0200 Local $ButtonDown, $ButtonUp Local $i = 0 Select Case $Button = "right" $Button = $MK_RBUTTON $ButtonDown = $WM_RBUTTONDOWN $ButtonUp = $WM_RBUTTONUP Case $Button = "left" $Button = $MK_LBUTTON $ButtonDown = $WM_LBUTTONDOWN $ButtonUp = $WM_LBUTTONUP Case Else Exit EndSelect If $X = "" Or $Y = "" Then Exit EndIf For $i = 1 To $Clicks DllCall("user32.dll", "int", "SendMessage", _ "hwnd", $Handle, _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", $Handle, _ "int", $ButtonDown, _ "int", $Button, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", $Handle, _ "int", $ButtonUp, _ "int", $Button, _ "long", _MakeLong($X, $Y)) Next EndFunc ;==>_MouseClickMinimized Func _MouseMoveMinimized($Handle, $X = "", $Y = "") Local $WM_MOUSEMOVE = 0x0200 Local $i = 0 If $X = "" Or $Y = "" Then Exit EndIf DllCall("user32.dll", "int", "SendMessage", _ "hwnd", $Handle, _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X, $Y)) EndFunc ;==>_MouseMoveMinimized Func _SendMinimized($Handle, $keys) ControlSend($Handle, "", "", $keys) EndFunc ;==>_SendMinimized Func _MakeLong($LoWord, $HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc ;==>_MakeLong My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
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