Jump to content

Search the Community

Showing results for tags 'subtraction'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. Hello, 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 Sleep(100) MouseMove($x, $y, 10) sleep(99) MouseClick("left") Sleep(99) ElseIf $search2 = 1 Then Sleep(100) MouseMove($x, $y2, 10) sleep(99) MouseClick("left") Sleep(100) Else Sleep(150) MouseMove($x2, $y, 10) Sleep(150) MouseClick("left") Sleep(150) EndIf 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?
×
×
  • Create New...