Recently Browsing 0 members
No registered users viewing this page.
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..
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?
I have a weird problem with a ToolTip function.
It seems that I can't reliably remove a tooltip from the screen if I originally created it by setting a tooltip text via variable, not a straight up string.
Here's a simple script that I used for testing:
After I remade the script into this, it started working just fine (stopped working after I fixed the array comparison):
Basic idea of the script:
You press F1 and a tooltip with some useful info shows up by the mouse cursor. It follows the cursor around until you press F1 again, then it copies the info to the clipboard and hides the tooltip.
It almost seems like if I created a tooltip using a variable to set the text, then ToolTip("") most of the times just repeats the previous use of ToolTip function. If you try to add Sleep(1000) before ToolTip("") in the first draft of the script, you'll see what i mean (if it works the same for everyone, that is).
Is this a bug or am I doing something wrong?
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
Hello! Thanks you for looking at my post
**No source code I'm sorry work related can't copy information**
I've been using autoit for about 1 year.
I'm having trouble automating a click on an internet explorer web page and I've tried a lot of examples from help pages and forums already. The object I'm trying to click on isnt always in the same spot so I can't use mouse click or control click, I have tried to use the different get collection options and clickbyname, or index or get object. I'm just struggling.
Description of object I'm trying to click --
HTML Code looks like <a ng-click.. "Click Here" it appears it's just a click able object named "click here" that opens a hidden window by running a script inside the web page. I'm not able to grab the information from the window unless it's open so I have to automate this click somehow.
I understand it's difficult to assist without having something to look at, I apologize for that sincerely and appreciate and assistance and suggestions.