Can be used "wait for image" or "wait for caret".
Macro Macro3031
Macro Macro3031
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 686 376 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 686 376 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
str controls = "3"
str ax3SHD
ax3SHD="Q:\Downloads\Quiz\quiz.html"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,int-- t_flash
,t_flash=child("" "MacromediaFlashPlayerActiveX" hDlg)
,SetFocus t_flash
,SetTimer hDlg 1 50 0 ;;use timer to wait for text cursor (caret) in the flash control
,
,case WM_TIMER
,sel wParam
,,case 1
,,int wCaret=GetCaretXY(_i _i)
,,if wCaret=t_flash
,,,KillTimer hDlg wParam
,,,opt keysync 1
,,,key "123" Y
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,ifk(Y) ret 0
,case IDCANCEL
,ifk(Z) ret 0
ret 1