ImageSearch With concatenated Variable

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Noo0B
Posts: 151
Joined: 26 Jan 2018, 19:54

ImageSearch With concatenated Variable

22 Feb 2018, 18:04

Hi there!
I tried all these syntaxes but they didn't seem to work and I ran out of options :angel: :

Code: Select all

MouseClick, , % "HKeyHkS" XTrig2 "X", % "HKeyHkS" XTrig2 "Y"
MouseClick, , % HKeyHkS%Trig2%X, % HKeyHkS%XTrig2%Y
MouseClick, , HKeyHkS%Trig2%X, HKeyHkS%XTrig2%Y
ImageSearch, , , 1575, 1020, 1630, 1075, % "*10 " HKeyHkS1 "-" HKeyHkKey ".png" ; This works but its not the same parameter
; I know the code below would work, but I wouldn't learn anything if I did it: :dance:
HkeyHkSTrig2:=  HKeyHkS%Trig2%
MouseClick, , %HKeyHkSTrig2%X, %HKeyHkSXTrig2%Y
Any Ideas to help me learn how to work with these parameters?
Kind thanks for the attention!
Regards!
gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: ImageSearch With concatenated Variable

22 Feb 2018, 20:47

Without the contents of your variables this doesn't mean anything... What are you actually trying to do?
Why are you using neither output variables with Imagesearch, nor take a look at Errorlevel? This way, Imagesearch is meaningless.
Noo0B
Posts: 151
Joined: 26 Jan 2018, 19:54

Re: ImageSearch With concatenated Variable

25 Feb 2018, 02:38

Thanks for the reply!
I'm not using output variables because they wont be used anywhere, the ImageSearch is a triggerer not a locator.
What I was trying to know was how to use concatenated variables on the click coordinates parameters.
HkeyHkS would be a literal string and HkeyHKKey a single letter. XTrig2 is A_Index correlated.
Looks like it can't be done!
Regards and thanks again!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Exies, Google [Bot], hiahkforum, scriptor2016 and 116 guests