I've been looking for a way to change cursor colour but not the cursor itself. I've been looking for a couple hours now and can't find anything. I also don't even know where to start, if anyone has any tips or examples please comment them.
I currently have a problem that deals with moving the mouse to a given location + or - a certain distance.
$search1 =_WaitForImageSearch("envelope.bmp", 10, 1, $x, $y, 20)
$search2 =_WaitForImageSearch("envelope2.bmp", 10, 1, $x, $y, 20)
If $search1 = 1 Then
MouseMove($x, $y, 10)
ElseIf $search2 = 1 Then
MouseMove($x, $y2, 10)
MouseMove($x2, $y, 10)
The problem about this is that i defined $x2 = $x - 175 and $y2 = $y + 35
I got these numbers ( 175 and 35) with the autoit helper and just subtracted point where it is to the point its supposed to move but it doesnt work.
is there any proper way to find the distance between 2 points in pixels?
Imgsearch doesnt always work for this picture so i want it to have a backup
edit: could it be that the definition of $x and $y from the previous image search arent there anymore and thats why it moves my mouse to strange places?
is there a way to preserve the $x $y from the previous img search untill the next succesful one?
I'm trying to script an ellipse drawing algorithm in AutoIT for learning purposes.
I use an edit control to "draw" the ellipse with characters.
The code i have works kinda good but i would like to see if others around here know a better algorithm to do it..
I would like to be able to give the x, y and width, height arguments to the function and not have to start at the middle point and draw the ellipse around it.
side note, the ellipse glitches when it has to be 2 pixels high too..
func ellipsePlotPoints ($xc,$yc, $x,$y) pixel ($xc + $x, $yc + $y) pixel ($xc - $x, $yc + $y) pixel ($xc + $x, $yc - $y) pixel ($xc - $x, $yc - $y) endfunc func ellipse($xc,$yc, $a,$b) local $a2 = $a * $a local $b2 = $b * $b local $twoa2 = 2 * $a2 local $twob2 = 2 * $b2 local $p local $x = 0 local $y = $b local $px = 0 local $py = $twoa2 * $y ; Plot the initial point in each quadrant. ellipsePlotPoints ($xc,$yc, $x,$y) ; Region 1 $p = int($b2 - ($a2 * $b) + (0.25 * $a2)) while ($px < $py) $x+=1 $px += $twob2 if ($p < 0) then $p += $b2 + $px else $y-=1 $py -= $twoa2 $p += $b2 + $px - $py endif ellipsePlotPoints ($xc,$yc, $x,$y) wend ; Region 2 $p = int ($b2 * ($x+0.5) * ($x+0.5) + $a2 * ($y-1) * ($y-1) - $a2 * $b2) while ($y > 0) $y-=1 $py -= $twoa2 if ($p > 0) then $p += $a2 - $py else $x+=1 $px += $twob2 $p += $a2 - $py + $px endif ellipsePlotPoints ($xc,$yc, $x,$y) wend endfunc
I have a situation where the desktop is designed in java swings. The nodes JTree is not allowing me to do checkbox selection using "spacebar". I am able to navigate through the nodes using up, down arrow and a tab. When I reach to the desire node selection, mouse left click is not working due a flaw a JTree core. However since it is selected, if mouse cursor auto moved to the position of the selection and send a "click" then it should be solved. Any ideas much appreciated.
the problem with having fixed coordinates are the main windows is divided to 2panels where right panel containing this JTree can be expanded or shrink-ed.
Hello, I have a Logitech MX500 mouse, this has 7 buttons plus a wheel.
I am trying to figure out how to detect clicks on three of the buttons on this mouse but have been unable to do so. I am not running any Logitech software just the standard Windows 7 driver. The buttons are all working fine but when I try to figure out which button was clicked unable to detect three of the buttons.
Using this code snippet I am able to see all the button presses with the exception of these three marked by '?'.
Is there some alternate method for detecting button clicks? I have been searching for example but have yet to find anything.
#include <Misc.au3> Dim $a While 1 For $a = 1 To 100 If _IsPressed($a) Then ConsoleWrite("you pressed " & $a & @CRLF) Next WEnd