Search the Community
Showing results for tags 'mouseclick'.
-
I'm writing a script that uses a lot of specific mouse clicks to automate tasks on my browser, server system, and email software for work. Sometimes the system gets updated or someone drags a handle to the left or right and I have to put in new mouse click coordinates. It would be a lot more easy to label them and put them in some sort of ini file, but then i have to load every X and Y (and sometimes mouse speed) into a variable when loading the script. How would you guys go about such a script, any ideas on how to store and load lot's of click coordinates from a file? There are some pixel color checks, sleeps and other code between the mouse clicks too.. Ideas i had so far: - string replace new coordinates in the main script with another autoit script that uses a crosshair to show every mouse position. - manually write an ini file and load every X, Y, Speed into a huge number of variables: $Searchinput_X = iniread...., $Searchinput_Yiniread...., $Searchinput_Speed = iniread.... - split a textfile line by line into an array and ignore labels that begin with ";" for example (a bit like a custom ini file) These all seem somewhat tedious i guess..
-
Hi. I am trying to automate a software called "LabelImg" (https://pypi.org/project/labelImg/). My autoit-script is started once I selected a folder with images within LabelImg. Pressing the button "Next Image" or pressing the shortcut "d" (https://github.com/tzutalin/labelImg#Hotkeys) jumps to the next image in the selected folder. This shall happen once per second. #include <Misc.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Opt("WinTitleMatchMode", 1) Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("1B", $hDLL) Then ExitLoop Else Local $temp = WinActivate("labelImg") ConsoleWrite($temp & @CRLF) If WinActivate("labelImg") Then ConsoleWrite("All Set!" & @CRLF) EndIf ;Send("d") Local $temp = MouseClick($MOUSE_CLICK_RIGHT, 50, 200) If $temp <> 1 Then MsgBox(1, "$temp", $temp) ExitLoop EndIf Sleep(1000) EndIf WEnd DllClose($hDLL) So the Send ("d")-command and the MouseClick are alternative methods to jump to the next image. Both fail. Both ConsoleWrite's deliver proper feedback (I continiously get the handle and "All set" ). Could you tell me what I'm doing wrong? Thank you.
- 13 replies
-
- mouseclick
- send
-
(and 1 more)
Tagged with:
-
Hi, recently i created a GUI for some calculations in AutoIT. The GUI has 2 tabs and on the first tab, it has few inputboxes where i use to click with mouse and start entering the inputs. i recently made some changes in the position of these textboxes. I made this by changing the autoit code file instead of making changes in KODA. Now i cannot click inside these textboxes with mouse. However, i can use TAB key to cycle through/enter input in these input boxes. what could have made the inputboxes not responding to mouseclicks. thanks
- 8 replies
-
- mouseclick
- gui
-
(and 1 more)
Tagged with:
-
Hi All, I am trying to login into our application using AutoIT. When I launch the application a splash screen appears and the login screen goes behind it. At this point the script pauses and I loose control of everything. I have literally tried everything for the past two days but nothing has worked yet. Any suggestions would be appreciated. RunWait("\\mchsv411.siplaceworld.net\splmshare\int00\conf\start_apps\windows\start_nx110.bat en portal_client int00 tc112", "", @SW_MAXIMIZE) AutoItSetOption("SendKeyDelay", 200) Local $hWnd = WinWaitActive("Teamcenter Login") MouseClick("left", @DesktopWidth / 2, @DesktopHeight / 2) The splash screen has title "Teamcenter" and is static. I tried to click on the center to get control of login window. I have tried WinActivate, WinSetState, ControlCommand and a lot of other things.
-
Hi, I have a very strange problem concerning MouseClick function. I need to start Control Panel, navigate it on the Display Section (Adjust screen resolution link), click on it, and from the next Dialog choose Intel Graphic tool tab and navigate into it when it opens. I wasn't using MouseClick() at first when I tried to use Control IDs, but I was fed up with the Autoit Window Info poor and inaccurate info (It flickers and the moment I click on the control the control ID and class disappear) so I ended up choosing the easiest way. The code I'm posting worked OK until two weeks ago, the mouse clicks were accurately performed and the Script reached the end with no errors...and I was happy. All of a sudden, between one try and the other, I noticed the cursor not flying exactly where it was supposed to, namely to the Control Panel ->Display->Adjust screen resolution link but it clicked some 30 pixels below and some 30 pixels to the left, choosing obviously and undesired function and from that point it screwed the whole thing up. And from that moment onward, it seems I can no longer regain the mouse to click on that sequence. Could it be because my Control Panel ->Display form moved slightly from one test to another and therefore I got that small offside? If you believe this is the reason, I should then re position the Control Panel ->Display window to 0,0 and recalculate all the clicks. do you have a suggestion? Thanks a lot Dave RotateDisplays.au3
-
Something simple enough, and I am sure it's an oversight, but I have not been able to track this down. The entire script is attached, but here is the point of failure. Note: I am getting the "Error: subscript used on non-accessible variable" but I thought the initial line of: AutoItSetOption('MouseCoordMode', 0) Should address that issue? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ; Install updates (minimized and updating for many minutes) ; Updates Not Installed Screen ; Wait for updates to complete WinWait("ProSeries Update") ; Wait just over 9 minutes to ensure popup is ready (test alternative to WinWait) Sleep(550000) ; Set focus on Product Licenses window WinActivate("ProSeries Update") ; Send Mouse Click to Install Now button MouseClick ( "left" [, 581, 362 [, clicks = 1 [, speed = 10]]] ) ; end Installing Updates screen >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Thanks for any insights! c1one ProSeries2017_No_Customer_Info.au3
- 8 replies
-
- mouseclick
- autoitsetoption
-
(and 1 more)
Tagged with:
-
Hi! I have a button where I need to close it! I was doing through clicking same position in screen but there are some id's that have different sizes. What are the possible ways to click this closable button? Is there a way to close it through id? Is there a way to get it's position through it's ID? Thanks in advance!
- 6 replies
-
- click
- mouseclick
-
(and 3 more)
Tagged with:
-
Hello I got this script works below and I want to do not move cursor on screen when action is performed. Opt("MouseCoordMode", 1) ; cause it gets whole screen coords Local $x, $y Local $search = _ImageSearch('item.bmp', 0, $x, $y, 0) If $search = 1 Then MouseMove($x, $y,0) MouseClick("right", $x, $y)) MouseMove($xMiddle, $yMiddle,0) MouseClick("left", $xMiddle, $yMiddle) EndIf I changed this above to this below and what happen is. It clicks right button and then left button but not move mouse to $x $y and then to $xMiddle $yMiddle. Opt("MouseCoordMode", 1) ; cause it gets whole screen coords Local $x, $y Local $search = _ImageSearch('item.bmp', 0, $x, $y, 0) If $search = 1 Then ControlClick("","",0,"secondary",1,$x,$y) ControlClick("","",0,"primary",1,$xMiddle,$yMiddle) EndIf If needed I got handle in var $hwnd Please tell me how parameters in ControlClick would like be
- 2 replies
-
- controlclick
- mouseclick
-
(and 1 more)
Tagged with:
-
Hi all, How can i get notified when user clicks on a combo box's edit area ? This is my code so far. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <ComboConstants.au3> #include <ListBoxConstants.au3> Global $btn ; creates a window Global $Window_0 = GUICreate("My Window", 800, 500, -1, -1, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX)) $btn = GUICtrlCreateButton("Click Me", 50, 50, 120, 50) Global $cmb = GUICtrlCreateCombo("Sample", 50, 150, 300, 50) GUICtrlSetFont(-1,12,400) Global $lstbx = GUICtrlCreateList("FirstItem", 400,50, 200, 300) GUICtrlSetFont(-1,12,400) GUIRegisterMsg($WM_COMMAND, "MyEventCallback") GUIRegisterMsg($WM_SIZE, "MyEventCallback") GUIRegisterMsg($WM_NOTIFY, "NotifyManager") GUISetState(@SW_SHOW) GUICtrlSetData($cmb, "Item 2|Item 3", "Item 2") GUICtrlSetData($lstbx, "Apple|Orange|Pineapple|Grape|Lemon") Do $Event = GUIGetMsg( ) Until $Event = $GUI_EVENT_CLOSE Func MyEventCallback($hwnd, $message, $wParam, $lParam) Select Case $message = $WM_COMMAND ;---------------------------------------------------------------- If LoWord($wParam) = $cmb Then ; if control id is combox's Then Local $Notification = HiWord($wParam) Select Case $Notification = $CBN_DROPDOWN ; here we check the notification code. ConsoleWrite("$CBN_DROPDOWN Worked " & @MIN & ":" & @SEC & @CRLF) Case $Notification = $CBN_EDITCHANGE ; here we check the notification code. ConsoleWrite("$CBN_EDITCHANGE Worked " & @MIN & ":" & @SEC & @CRLF) ; **** Here i want add the code for combo box clicking. EndSelect ;--------------------------------------------------------------------- ElseIf LoWord($wParam) = $lstbx Then Local $Notification = HiWord($wParam) Select Case $Notification = $LBN_SELCHANGE ConsoleWrite("$LBN_SELCHANGE" & @CRLF) EndSelect EndIf ;------------------------------------------------------------------ Case $message = $WM_SIZE EndSelect Return $GUI_RUNDEFMSG EndFunc ;==>ProGUI_EventCallback Func NotifyManager($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam ;Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR Local $tagNMHDR, $event, $hwndFrom, $code $tagNMHDR = DllStructCreate("int;int;int", $lParam) If DllStructGetData($tagNMHDR, 3) = $NM_LDOWN Then ConsoleWrite("Notify Worked" & @CRLF) EndIf Return $GUI_RUNDEFMSG EndFunc Func LoWord($Variable) Return BitAND($Variable, 0xFFFF) EndFunc Func HiWord($Variable) Return BitShift($Variable, 16) EndFunc
-
I have a script that has to work on multiple resolutions but each resolution has slightly different co-ordinates due to automatic UI scaling. I have had to make separate files for each but would like to implement them all in one script. I have a similar program written for Java which uses else if statements to use different co-ordinates for each resolution after it has been detected. I'm not good with Java so I would like to implement this on AutoIt before later making a Java version. This is a snippet of the autoit code I have. ToolTip("1 - Search") MouseClick("Left", @DesktopWidth *0.823, @DesktopHeight *0.925, 1, 25) ToolTip("2 - Buy Now") MouseClick("Left", @DesktopWidth *0.83, @DesktopHeight *0.798, 1, 27) ToolTip("3 - OK") MouseClick("Left", @DesktopWidth *0.555, @DesktopHeight *0.596, 1, 15) ToolTip("4 - OK Clear Error") MouseClick("Left", @DesktopWidth *0.49, @DesktopHeight *0.597, 1, 30) ToolTip("5 - Back to Search") MouseClick("Left", @DesktopWidth *0.161, @DesktopHeight *0.108, 1, 15) This is a snippet of a java code I used. Thanks. private static void goToSearch(double maxX, double maxY, Robot bot) throws InterruptedException { int currentX = 0; int currentY = 0; if (maxX == 2650 && maxY == 1440) { currentX = 734; currentY = 1316; } else if (maxX == 1920 && maxY == 1200) { currentX = 551; currentY = 1096; } else if (maxX == 1920 && maxY == 1080) { currentX = 551; currentY = 1042; } else if (maxX == 1680 && maxY == 1050) { currentX = 482; currentY = 959; } else if (maxX == 1440 && maxY == 900) { currentX = 413; currentY = 822; } else if (maxX == 1366 && maxY == 768) { currentX = 392; currentY = 741; } else if (maxX == 1280 && maxY == 800) { currentX = 367; currentY = 731;
- 3 replies
-
- java
- coordinates
-
(and 3 more)
Tagged with:
-
Hello, I am currently trying to automatically click the "Yes" button in the ActiveX prompt/popup message after opening the IE (html). At 1st, I encounter the "Allow Blocked Content". I already resolve it just by changing settings in the IE Options. But after resolving the "Allow Blocked Content", there's a popup message appear. I have attached the ActiveX Prompt. Here is the 1st code that I try to use. #include <IE.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> _IECreate("C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\sampleAWD10.html",0,1,0) Local $oIE = _IEAttach("", "instance", 1) _IELoadWait($oIE) AdlibRegister("_ActiveXRun",250) Local $oLastName = _IEGetObjByName($oIE, "Text4") Local $oGetItem = _IEGetObjByName($oIE, "getitem") _IEAction($oGetItem, "click") MsgBox($MB_SYSTEMMODAL, "Form Element Value", _IEFormElementGetValue($oGetItem)) Func _ActiveXRun() $retWin = WinGetHandle("[Class:Button]","") $winTitle = "[HANDLE:" & $retWin &"]" $ctrlHandle = ControlGetHandle($winTitle,"", "[CLASS:Button; INSTANCE:2]") $ctrlTitle = "HANDLE:" & $ctrlHandle &"]" WinWaitActive($ctrlTitle,"[CLASS:Button; INSTANCE:2]",10) $k = ControlGetPos($winTitle, "","[CLASS:Button; INSTANCE:2]") $x = $k[0] $y = $k[1] WinActivate ($winTitle,"An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?") ControlFocus($winTitle,"An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?","[CLASS:Button; INSTANCE:2]") ControlClick($winTitle, "","[CLASS:Button; INSTANCE:2]","primary",1,$x,$y) ControlSend($winTitle, "", "[CLASS:Button; INSTANCE:2]", "{ENTER}", 0) EndFunc Here is the console output. >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" /UserParams +>12:44:11 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\april\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\april\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3 +>12:44:11 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" (31) : ==> Subscript used on non-accessible variable.: $x = $k[0] $x = $k^ ERROR ->12:44:24 AutoIt3.exe ended.rc:1 +>12:44:24 AutoIt3Wrapper Finished. >Exit code: 1 Time: 13.76 I also tried a simpler code. include <IE.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> _IECreate("C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\sampleAWD10.html",0,1,0) Local $oIE = _IEAttach("", "instance", 1) _IELoadWait($oIE) $k = ControlGetPos("[CLASS:#32770]", "","[CLASS:Button; INSTANCE:2]") $x = $k[0] $y = $k[1] ControlClick("[CLASS:#32770]", "","[CLASS:Button; INSTANCE:2]","primary",1,$x,$y) Local $oLastName = _IEGetObjByName($oIE, "Text4") Local $oGetItem = _IEGetObjByName($oIE, "getitem") _IEAction($oGetItem, "click") MsgBox($MB_SYSTEMMODAL, "Form Element Value", _IEFormElementGetValue($oGetItem)) There's no error in the console output for the 2nd code I have tried. And here is the Window Info for the ActiveX prompt. >>>> Window <<<< Title: Internet Explorer Class: #32770 Position: 580, 338 Size: 376, 146 Style: 0x94C808C4 ExStyle: 0x00010101 Handle: 0x00000000001516FA >>>> Control <<<< Class: Button Instance: 2 ClassnameNN: Button2 Name: Advanced (Class): [CLASS:Button; INSTANCE:2] ID: 1 Text: &Yes Position: 184, 77 Size: 80, 22 ControlClick Coords: 37, 12 Style: 0x50010000 ExStyle: 0x00000004 Handle: 0x00000000001215DE >>>> Mouse <<<< Position: 228, 120 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< &No An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction? &Yes >>>> Hidden Text <<<<
-
Hi there, I did a short script to simulate mouse click when pixel change is detected on a small section of the screen. I recorded the screen many times to see the accuracy of the script and it seems though response time varies widely. Here's the script $checksum = pixelchecksum (400,250, 402,252) While $checksum = pixelchecksum (400,250, 402,252) Sleep (50) Wend Sleep (300) Mouseclick("left", 450,300, 1, 0) Counting from the pixel change to the mouse click, i get response times anywhere between 370ms and 550ms. I've tried running au3 and exe, changed sleep times but never gotten an accurate response time based on the script. Any ideas why?
- 6 replies
-
- pixelchecksum
- mouseclick
-
(and 2 more)
Tagged with:
-
can anyone help me plz how can you put mouseclick in if statement or is it possible example: if Mouseclick = "left" then Tooltip(" you click left mouse") thank you
- 3 replies
-
- mouseclick
- in
-
(and 2 more)
Tagged with:
-
Hey guys! Im new when it comes to scripting and i follow some videos on how to make clicks and such. So i will say i know the basics alrady. However, im having a really big problem When i run the script is works fine with the clicks and all. But if i run it one or two more times it just moves to very inaccurate positions. YES, i have tried mulitple times to change positions and such but no luck. My script is working its just so inaccurate that im unable to use it. Are there any solution for this? I have also set the camera to a specific position. I have also tried other camera angles, no luck there either. Making more smoother macro movements does not seem to work aswell. I have also tried to have clicks away from the minimap, since i know some youtuber had problem with inaccuracy because of this. I came here because i was googling and did not see anyone else having this problem, or mentioning it. So if someone have a solution, i would be happy!! All i have seen are people trying to change the resolution. But it has nothing to do with that. I heard someone mention controlmouseclick. However are there any differences? I have also A window selection in my script so it changes to the window the macro will be running in. Resolution is not changing or anything. I have also tried other macros and same problem there. Also does anyone know or can teach me how pixel search works? I want the macro to be able to click at the correct character instead of waiting for the character to get in the position its searching for.
-
Hey everyone!! I'm trying to make a program in VB.NET that click inside a picturebox of an app without moving the mouse (using ControlClick). My code is this: 1) ControlClick("Form1", "", "[CLASS:PictureBox; INSTANCE:12]", "left", 1, 5, 5) 2) ControlClick("Form1", "", "[CLASS:PictureBox; INSTANCE:1]", "left", 1, 5, 5) The code is correct but the problem is that 1) works perfectly and 2) doesn't work. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Here I leave you the summary of each picturebox: >>>> Window <<<< Title: Form1 Class: Form Position: 168, 0 Size: 1030, 780 Style: 0x16CA0000 ExStyle: 0x00040100 Handle: 0x00000000000B0092 >>>> Control <<<< PICTUREBOX 12 Class: PictureBox Instance: 12 ClassnameNN: PictureBox12 Name: Advanced (Class): [CLASS:PictureBox; INSTANCE:12] ID: 28 Text: Position: 305, 721 Size: 40, 40 Style: 0x56010000 ExStyle: 0x00000004 Handle: 0x0000000000040520 >>>> Control <<<< PICTUREBOX 1 Class: PictureBox Instance: 1 ClassnameNN: PictureBox1 Name: Advanced (Class): [CLASS:PictureBox; INSTANCE:1] ID: 4 Text: Position: 4, 176 Size: 700, 533 Style: 0x56010000 ExStyle: 0x00000004 Handle: 0x00000000000E02BE Thank you for you help!!!
-
Hello there I recently wanted to know how to differentiate between a mouse click and a touch click on controls in your GUI. This can be interesting when using picture controls as buttons in combination with this UDF here. No one could help me, so I tried my best to get it to work. And it works now! Unfortunately only for Windows 8 and above, as I had to use functions which are unavailable for older OS. Additionally this was my first time writing DLLCalls myself. I hope (and think) that there are no mayor mistakes in it, So here's the sample code: #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> OnAutoItExitRegister("_exit") $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Form1 = GUICreate("Form1", 444, 372, -1, -1) $pic1 = GUICtrlCreatePic("", 184, 112, 65, 57) $pic1_dummy = GUICtrlCreateDummy() _GDIPlus_Startup() Global $play1 = _GDIPlus_BitmapCreateFromMemory($play, True) _WinAPI_DeleteObject(GUICtrlSendMsg($pic1, $STM_SETIMAGE, $IMAGE_BITMAP, $play1)) DllCall("User32.dll", "bool", "RegisterTouchHitTestingWindow", "HWND", $Form1, "ULONG", 1) ; register your GUI for recieving commands relatet to WM_TOUCHHITTESTING GUIRegisterMsg(0x024D, "WM_TOUCHHITTESTING") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $pic1_dummy MsgBox(0, 0, "touch-click") Case $Pic1 MsgBox(0, 0, "Mouseclick") EndSwitch WEnd Func WM_TOUCHHITTESTING($hWnd, $iMsg, $wParam, $lParam) Local $send = 1 Local $pic1_pos = _WinAPI_GetWindowRect(GUICtrlGetHandle($pic1)) Local $struct = DllStructCreate("uint;long X;long Y") ; first Parameter gives the accuracy of which this control is meant by a touch - second and third are the x/y points of the touch (not relative to GUI) DllCall("User32.dll", "bool", "EvaluateProximityToRect", "ptr", DllStructGetPtr($pic1_pos), "ptr", $lParam, "ptr", DllStructGetPtr($struct)) If DllStructGetData($struct, 1) < 20 Then ; if the proximity of the touch is near enough to the control (I chose 20, but you can vary yourself) then do something GUICtrlSendToDummy($pic1_dummy) ; you shouldn't do very intensive stuff inside the function itself. Outsource it to your main loop. $send = 0 ; no need to pass the command on to your GUI, as you take action yourself .. EndIf If $send Then _WinAPI_DefWindowProc($hWnd, $iMsg, $wParam, $lParam) EndFunc Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc Func _exit() _WinAPI_DeleteObject($play1) _GDIPlus_Shutdown() EndFunc The magic happens in the WM_TOUCHHITTESTING function. The _WinAPI_Base64Decode is written by @UEZ (as well as the way to use PNG as button (from binary) - thanks for that!) On Windows 7 there is the WM_TOUCH function which should handle touch events, but I couldn't get it to work on controls ..?? If you will get the x/y coordinates of a touch (even when you touch on controls) you could make the "EvaluateProximityToRect" check yourself - as this function is not available in Windows 7. Shouldn't be that hard. Btw.: this here is the MSDN articel related to this topic: https://msdn.microsoft.com/en-us/library/windows/desktop/hh454931(v=vs.85).aspx So thats it. Any questions and comments welcome! greetz, Leo
-
- mouseclick
- touch-click
-
(and 2 more)
Tagged with:
-
I'm currently wondering if there is somehow to actually make autoit click inside a minimized program? & sent keystrokes ? 2nd question, how can i make it do a mouse click at e.g. x200,y200 while the are at like x354,y313 (This is purely an example.) would love to be able to do other shizz on my pc while the script is running if possible. If this ISNT possible can u recommend a language / other scripting program which are able to do this ? willing to start over learning a new coding/scripting language. -Dequality.
-
Hello There! I've encountered a small issue i just cant seem to program my way out of... What im doing is: ;or rather, what im trying to do is Pixelsearch for a color, within a part of my screen, If color is present, i will rightclick it, for a menu to appear, in which i want to Leftclick an option. Simplicity itself. The issue is that because this menu appears in different parts of my screen, its complicated to select the option i want to click. There is no special color to it, and i cannot define the area in which to click, because the menu appears different places. The only thing that is in common for the menu is that the Leftclick needs to be (lets say) 30pixels below the rightclick . What can be done, but seemingly not by me, is to get the coordinates of the rightclick, and use them as the "starting point" from where the coordinates for the leftclick will be. (Not sure if that makes sence, but maybe the code below will help you understand) You guys like example codes, so therefore i will give it my best shot, and hope it proves usefull $pos = Pixelsearch(200, 400, 200, 400, 0xFFFFFF) ;This color is what i need to rightclick to bring up the menu If not @Error then ;If the color is present (Mouseclick("Right", $pos[0], $pos[1], 1, 1) ;Rightclick it, to bring up menu ;Here comes the part i cannot get to work $x = MousegetPos(X) ;To get the Coordinate "X", so we can calculated with it for the position of the leftclick $y = MousegetPos(Y) ; To get the Coordinate "Y", so that can be calculated with for the position of the leftclick MouseClick("Left", $x[0], $y-30[1], 1, 1) ;This was supposed to give me a leftclick that is 30pixels below the rightclick. (The MouseGetPos(X), may seem as a waste of space in this example, but in my script i will need both. Im only using one in the example, mainly so that i wont confuse myself, but also to make it easier to digest for you guys) I have not been able to find any topic that covers this, but my apologies if such a topic already exist in the forums. Maybe while im at it, can i ask, what good does the [0] and [1] do, when using a "$variable" as coordinate? Thanks in advance - DiveHigh
- 5 replies
-
- mouseclick
- mousegetpos
-
(and 3 more)
Tagged with:
-
I’m trying to click the “assign a playlist” url in this application (see info.png) I don’t know if it is flash or not. The control ID changes on every launch. I can’t use mouseclick because it needs to be scheduled at night on a server. So just ControlClick is left as an option. I can find the handle to the window but not to the control, be it through text or classname, clas or advanced mode. The mouse cursor doesn't even move after these commands. $handle = WinGetHandle("[ACTIVE]") ControlClick($handle, "", "[CLASS:TFlickerFreePaintBox.UnicodeClass; INSTANCE:1]",'left', 1, 54, 138) ControlFocus("Q-MATIC Monitor™ 3", "", "[TFlickerFreePaintBox.UnicodeClass1]") Controlclick("Q-MATIC Monitor™ 3", "",", "primary", 1, 54, 55) ControlClick($handle, "", "", "Left", 1, 54, 55) ControlClick("Q-MATIC Monitor™ 3", "", "[TEXT:Assign to playlist]") ControlFocus ( "Q-MATIC Monitor™ 3", "", "TFlickerFreePaintBox.UnicodeClass") What other parameters are possible for this?
-
I've got a simple little script that is trying to step through data in a datagrid. I have written and rewritten this thing to try and keep it running, but it just keeps coming up with values I just don't think it can get. I've played with the timing and it seems to run a little better when slowed down, but setting my $delay higher and higher gets me less and less improvement, but starts to really drag the process to a crawl. Removing the sleeps entirely isn't even that bad. Every time I send a ^C to copy a value, I verify it, and then when I'm done with it, I reset the Clipboard with a known value that will never show in my data and reverify the clipboard. So either my reset/verification is not doing it's job or my mouse double click is not getting the coordinates updated. Neither of these options are great because I'm running out of ideas how to make sure I get what I want. About all I can do at this point is attempt my copy, then validate that the clipboard isn't my reset string, isn't zero length, and THEN match it to a date REGEX to see if it's the data from the correct column. That would be triple checking something that shouldn't need to be checked once. Scrip and output below: $desiredDate = "2/9/2015" $yCoord = 290 $yStep = 15 $recDisplay = 9 ;number of rows to read before starting to scroll $totalRec = 0 $PONList = "" $delay = 250 $dcDelay = 12 $count = 0 $clipReset = "chicken" $oCoastal = WinActivate("Find FOC") WinWaitActive($oCoastal) if @error Then msgBox(1, "winactivate error", @error) Exit endif AutoItSetOption("MouseCoordMode", 0) AutoItSetOption("SendKeyDownDelay", 100) ClipPut("") While 1 ;get date ;MouseMove(284, $yCoord, 1) MouseClick("left", 284, $yCoord, 2, $dcDelay) Sleep($delay) while 1 MouseClick("left", 284, $yCoord, 2, $dcDelay) ;Sleep($delay) Send("^c") ;Sleep($delay) $thisDate = clipGet() if StringCompare($thisDate, $clipReset) <> 0 and StringLen($thisDate) > 0 Then resetClip($clipReset) ExitLoop EndIf WEnd ConsoleWrite($count & ": Date: " & $thisDate) ;check date matches what we want ;if not StringCompare($desiredDate, $thisDate) = 0 Then ;with some date functions, this could be improved to a date range if StringRegExp($thisDate, $desiredDate) = 0 Then ;just check to see if the desired date exists inside what was copied ;we have reached the end of our records MsgBox(1, "Found " & $totalRec & " total records", $PONList) Exit ;or exitloop endif ;get pon ;MouseMove(81, $yCoord, 1) MouseClick("left", 81, $yCoord, 2, $dcDelay) Sleep($delay) While 1 MouseClick("left", 81, $yCoord, 2, $dcDelay) ;Sleep($delay) Send("^c") ;Sleep($delay) $thisPON = clipGet() if StringCompare($thisPON, $clipReset) <> 0 and StringLen($thisPON) > 0 Then resetClip($clipReset) ExitLoop EndIf WEnd ConsoleWrite(" PON:" & $thisPON & @CRLF) ;Check if we want this record if StringCompare(StringMid($thisPON, 10, 1), "D") = 0 Then ;We want this record! $totalRec += 1 $PONList = $PONList & ", " & $thisPon EndIf if $recDisplay >= 1 Then ;still in the first 10 records and need to move the mouseclick position down by a record $yCoord += $yStep $recDisplay -= 1 Else ;reached the bottom of the data grid and need to click the down arrow in the bottom right of the grid to advance one record MouseClick("left", 650, 438,1) ;Sleep($delay) endIf ;consolewrite($recDisplay & @CRLF) $count += 1 Wend func resetClip($val = "") Do ClipPut($val) Until StringCompare(ClipGet(), $val) = 0 EndFunc And here's a sample output. Everything looks great until the last row. This was not the last row in the data and should not have stopped here, but you can see the PON is either still on the clipboard, or the mouse click did not update the coordinates and copied the MouseClick commands didn't move to the coordinates: 0: Date: 2/9/2015 PON:173714357INN0001 1: Date: 2/9/2015 PON:173708683DID0001 2: Date: 2/9/2015 PON:173708683DID0003 3: Date: 2/9/2015 PON:173546121INN0001 4: Date: 2/9/2015 PON:173701848INN0001 5: Date: 2/9/2015 PON:173454114INN0001 6: Date: 2/9/2015 PON:173708683DID0002 7: Date: 2/9/2015 PON:173714373DID0001 8: Date: 2/9/2015 PON:173709684INN0001 9: Date: 2/9/2015 PON:173621964INN0001 10: Date: 2/9/2015 PON:173710242CHC0001 11: Date: 2/9/2015 PON:855440C 12: Date: 2/9/2015 PON:173531625INN0001 13: Date: 2/9/2015 PON:173717963DID0001 14: Date: 2/9/2015 PON:173717560DID0001 15: Date: 2/9/2015 PON:173713978DID0001 16: Date: 2/9/2015 PON:173710221INN0001 17: Date: 2/9/2015 PON:173713002INN0001 18: Date: 2/9/2015 PON:173456352RGN0001 19: Date: 2/9/2015 PON:173712598DID0001 20: Date: 2/9/2015 PON:173709807DID0001 21: Date: 2/9/2015 PON:173616984INN0001 22: Date: 2/9/2015 PON:173646606INN0001 23: Date: 2/9/2015 PON:173649988INN0002 24: Date: 2/9/2015 PON:173712524INR0001 25: Date: 2/9/2015 PON:173710904DID0001 26: Date: 2/9/2015 PON:173717004INN0001 27: Date: 2/9/2015 PON:173712871INN0001 28: Date: 2/9/2015 PON:173426776RGN0001 29: Date: 2/9/2015 PON:173418924RGN0001 30: Date: 2/9/2015 PON:173712465INR0001 31: Date: 2/9/2015 PON:173712465INR0002 32: Date: 2/9/2015 PON:173712524INR0002 33: Date: 2/9/2015 PON:173710788INR0001 34: Date: 2/9/2015 PON:173710788INR0002 35: Date: 2/9/2015 PON:173712737DID0001 36: Date: 2/9/2015 PON:173717129INN0001 37: Date: 2/9/2015 PON:173718061DID0001 38: Date: 2/9/2015 PON:173717663INN0001 39: Date: 2/9/2015 PON:173718181DID0001 40: Date: 2/9/2015 PON:173714071DID0001 41: Date: 2/9/2015 PON:173692375INN0002 42: Date: 173692375INN0002
-
What i have done is set Coordinates in xyBox1, xyBox2 and xyBox5 (with MouseGetPos() - The rest of my code works 100%) And instead of going out every time and entering every single box coordinate i figured i would come up with this "Formula" to calculate all the boxes locations by itself from what i have entered for my 3 Variables Everytime i run, it clicks on box 1, 2, 5, 6 and the crashes, skips box 3 and 4 Any Clue? Func FourxSeven() ; 0 Returns the X1 co-ordinate as an integer. ; 1 Returns the Y1 co-ordinate as an integer. Local $xSD = ($xyBox1[1] - $xyBox2[1]) ; (Box1 y - Box2 y) = xAxis - Sideways difference Local $yDD = ($xyBox1[0] - $xyBox5[0]) ; (Box1 x - Box5 x) = yAxis - Downwards Difference MouseClick("Left", $xyBox1[0], $xyBox1[1]) ;#1 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], $xyBox1[1]) ;#2 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD), $xyBox1[1]) ;#3 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2)), $xyBox1[1]) ;#4 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], $xyBox5[1]) ;#5 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], $xyBox5[1]) ;#6 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], $xyBox5[1]) ;#7 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2))[0], $xyBox5[1]) ;#8 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + $yDD)[1]) ;#9 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + $yDD))[1]) ;#10 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + $yDD)[1]) ;#11 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2))[0], ($xyBox5[1] + $yDD)[1]) ;#12 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + ($yDD * 2))[1]) ;#13 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + ($yDD * 2))[1]) ;#14 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + ($yDD * 2))[1]) ;#15 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2))[0], ($xyBox5[1] + ($yDD * 2))[1]) ;#16 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + ($yDD * 3))[1]) ;#17 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + ($yDD * 3))[1]) ;#18 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + ($yDD * 3))[1]) ;#19 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2)[0], ($xyBox5[1] + ($yDD * 3))[1]) ;#20 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + ($yDD * 4))[1]) ;#21 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + ($yDD * 4))[1]) ;#22 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + ($yDD * 4))[1]) ;#23 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2)[0], ($xyBox5[1] + ($yDD * 4))[1]) ;#24 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + ($yDD * 5))[1]) ;#25 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + ($yDD * 5))[1]) ;#26 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + ($yDD * 5))[1]) ;#27 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2))[0], ($xyBox5[1] + ($yDD * 5))[1]) ;#28 Box Locations Sleep(Random(590,1390,1)) Sleep(Random(990, 1990, 1)) EndFunc
- 5 replies
-
- mouseclick
- formula
-
(and 2 more)
Tagged with:
-
Global $Point = MouseGetPos() Global $Point1 = PixelSearch(599, 499, 735, 567, 0xA95C1D, 5) $Start_Exit_GUI = GUICreate("XXX", 228, 194, 398, 222) ; Opens GUI with start/exit buttons GUISetBkColor(0x0000FF) $Start_Botton = GUICtrlCreateButton("START", 0, 0, 227, 89, $WS_GROUP) ; Start button GUICtrlSetFont(-1, 28, 400, 0, "Absolute Zero") GUICtrlSetColor(-1, 0xFF00FF) GUICtrlSetBkColor(-1, 0x00FF00) $Exit_Button = GUICtrlCreateButton("EXIT", 0, 96, 227, 97, $WS_GROUP) ; Exit button GUICtrlSetFont(-1, 28, 400, 0, "Absolute Zero") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0xFF0000) Func SearchExample() If IsArray($Point1) = Then MouseClick("Left", $Point[0], $Point[1]) EndIf Sleep((Random, 990, 1990, 1)) EndFunci get this error message (88) : ==> Error in expression.: If IsArray($Point1) = Then ; Line 88 If ^ ERROR
-
I have an issue with mouseclick on windows 7 64bit, it simply dosen't work. I'm trying to send mouseclick on a fullscreen window. What have i tried: - Run as admin - Tryed different Opt mouse coords modes and pixel as well - Compile it 32 and 64 bit same result, not working And i ran out of ideas, does anyone know what is going on with windows 7 and mouseclicks!
-
Hello once again! What I have is: A groupcontrol created by GuiCtrlCreateGroup and inside it I have a few icons from GuiCtrlCreateIcon. What I want to do is when I click within the group or on the icons I'll get a notification, or a message retrieveable by GuiGetMsg(). Any suggestions? Best regards, zvvyt
- 1 reply
-
- GuiCtrlCreateGroup
- MouseClick
-
(and 3 more)
Tagged with:
-
How do I make the click delay in maybe 1 second? If I got a position I want the mouse to go (like in MouseClick("left",100,100) how can I make the click be pressed down in maybe 1 second? Is it possible? Thanks in advance!
- 4 replies
-
- Mouseclick
- Mouse
-
(and 2 more)
Tagged with: