Page 1 of 1

Newbie questions

Posted: 27 Jan 2014, 07:49
by tobi_fx
Dear AutoHotkey experts,

this is the first time I'm using AutoHotkey. I don't have any programming experiences.
I was able to create the following code that, in general does what it should do:

Code: Select all

#NoEnv
SetWorkingDir %A_ScriptDir%
SendMode Input

F3::
Macro1:
Send, {F10}
WinActivate, Chart Studies for:
Sleep, 333
Click, 400, 260
Sleep, 10
Click, 725, 200
Sleep, 10
Click, 60, 430
Sleep, 10
Return
What it does is open a window with F10 (s. attached screenshot), clicks on item 13 (piv d), clicks the Hide button/checkmark and then clicks OK.

Here are my questions:
- the piv d study is not always at the place of item 13. It can also be further up or down. So, is there a way to "search for" and mark piv d instead of using the coordinates of the click command? If yes, how can this be done?
- is it possible to have the "actions" run in the background, meaning the window and marking of the items not being shown?

Thanks in advance for your help,
tobi

Re: Newbie questions

Posted: 27 Jan 2014, 12:12
by LazyMan

Re: Newbie questions

Posted: 27 Jan 2014, 12:14
by kon
The second part of this video gives a nice explanation of selecting certain items from a control.
Autohotkey: a beginner's video guide
(So that should explain how to use window spy)

And for "Having actions run in the background" you can probably use the Control-type commands:
ControlClick
ControlFocus
ControlGet
etc. See: Alphabetical Command and Function Index

Re: Newbie questions

Posted: 28 Jan 2014, 04:06
by tobi_fx
LazyMan and kon, thanks for your help!