Keavon wrote:
Hmmm, the example you gave me had some kind of error.
Can you be more specific ?
The steps in your Sat Oct 10 post make complete sense to me.
Solar's post seems right on, as well.
I'm trying to write a script that allows you to mark the needed points
Code:
tt_list = ImageTopLeft,ImageBottomRight,Check1,Check2,Check3,Continue
And then automate the image and answer gathering.
Here is what I have so far:
Code:
#singleinstance force
;================================================================
; auto execute section & emergency exit hotkey
;================================================================
settitlematchmode 2
CoordMode, ToolTip, screen
CoordMode, Mouse, screen
CoordMode, Pixel, screen
inifile = mark.ini ; where to write the coordinates
max_questions = 27 ; the total number of questions to look for
image_filename= C:\My Images\question_
tt_list = ImageTopLeft,ImageBottomRight,Check1,Check2,Check3,Continue
Loop, parse, tt_list, `,
{
; MsgBox, ToolTip number %A_Index% is %A_LoopField%.
tt_txt%A_Index%:=A_LoopField
tt_cnt:=A_Index
}
;listvars
;msgbox %tt_cnt%
a=1
return
esc:: ; in case of emergency, hit escape to exit script
exitapp
;================================================================
;
;================================================================
#q:: ; hit win-q to start the process
if (a > tt_cnt)
return
;msgbox %tt_cnt%
;msgbox timerset
a=1
SetTimer, WatchCursor, 100
Hotkey, ~lbutton, mark_points
return
mark_points:
MouseGetPos, xpos, ypos
ToolTip, % tt_txt%A% , xpos , ypos, a
x%a%:=xpos
y%a%:=ypos
;msgbox % x%a% "!" y%a%
a++
if (a > tt_cnt)
{
SetTimer, WatchCursor, off
ToolTip, , , , 20 ; erase the markers
msgbox that's all the points to mark`n press ok save to ini file
Hotkey, ~lbutton, off
loop, %tt_cnt%
{
iniwrite, % tt_txt%A_Index% , %inifile%, none, tt_txt%A_Index%
iniwrite, % x%A_Index% , %inifile%, none, x%A_Index%
iniwrite, % y%A_Index% , %inifile%, none, y%A_Index%
ToolTip, , , , a_index ; erase the markers
}
ToolTip, , , , 20 ; erase the markers
iniwrite, %max_questions% , %inifile%, none, max_questions
iniwrite, 0 , %inifile%, none, saved_questions
}
else
{
SetTimer, WatchCursor, 100
ToolTip, , , , 20 ; erase the markers
}
return
WatchCursor:
MouseGetPos, xpos, ypos
ToolTip, % tt_txt%A%, xpos, ypos, 20
return