Random Area Around MouseGetPos? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
WhatsThat88
Posts: 2
Joined: 24 Feb 2018, 10:04

Random Area Around MouseGetPos?

24 Feb 2018, 10:10

I'm looking for something to record mouse position and randomize that area into a variable.
I'm not sure if I'm describing that properly, as I couldn't find anything that suited my needs looking for variations of that thought.
Anyway, this code doesn't work but could anyone help me morph that into something that works?

Code: Select all

MouseGetPos, ax, ay

Random, axRandom, (%ax%-5), (%ax%+5)
Random, ayRandom, (%ay%-5), (%ay%+5)

MouseMove, %axRandom%, %ayRandom%, 1
Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: Random Area Around MouseGetPos?  Topic is solved

24 Feb 2018, 10:14

Code: Select all

Random, axRandom, % ax-5, % ax+5
Random, ayRandom, % ay-5, % ay+5
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
WhatsThat88
Posts: 2
Joined: 24 Feb 2018, 10:04

Re: Random Area Around MouseGetPos?

24 Feb 2018, 10:17

That is perfect, thank you.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], mikeyww and 308 guests