Plea for help

Get help with using AutoHotkey and its commands and hotkeys
miga
Posts: 1
Joined: 02 Oct 2018, 18:46

Plea for help

02 Oct 2018, 18:53

I want to make a simple macro to roll dice on my screen
https://www.random.org/dice/?num=1
i made it click but it don't loop
i am using pulover's macro creator 5.0

Code: Select all

Click, 337, 474 Left, 1
Sleep, 500
Loop
{
    CoordMode, Pixel, Window
    ImageSearch, FoundX, FoundY, 294, 369, 336, 415, C:\Program Files\MacroCreator\Screenshots\Screen_20181003014042.png
    If ErrorLevel = 0
    	Return
    Sleep, 3000
}
Until ErrorLevel = 0
}
Else
{
If ErrorLevel = 0
{
}
trust_me
Posts: 81
Joined: 29 Jul 2017, 10:46

Re: Plea for help

03 Oct 2018, 07:08

Can you explain what you are trying to do ? Trying to read the dice value ? What is the image you are searching for looks like ?
ThewarII
Posts: 38
Joined: 01 Oct 2014, 09:33
Facebook: [email protected]

Re: Plea for help

03 Oct 2018, 13:14

Too much error so I guess you want loop permanently like that:

Code: Select all

Loop,
{
Click, 337, 474 ; can't use "Left, 1", it's automatic use left click.
Sleep, 500
Loop
{
    CoordMode, Pixel, Window
    ImageSearch, FoundX, FoundY, 294, 369, 336, 415, C:\Program Files\MacroCreator\Screenshots\Screen_20181003014042.png
    If ErrorLevel = 0 ;I never use that like you, I use !ErrorLevel or ErrorLevel
    	Return
    Sleep, 3000
}
;Until ErrorLevel = 0 ; I don't understand this, I think must be remove.
;}
;Else ;What for else ? I can't understand, so I remove it too.
;{
;If ErrorLevel = 0
;{
}
Return
I :superhappy: when I know about AHK.
I have been using AHK for do anything in microsoft window.
The first time I know it in around year 2013.

Return to “Ask For Help”

Who is online

Users browsing this forum: flyingDman, Sefer, theholyscripture and 63 guests