Hello, in many cases, using the Acc, I will encounter an operation that cannot perform the default operation and cannot perform a mouse click (The mouse will hover over the button and won't automatically click). Below is a sample code
In addition, when the waiting time is set to 0, no time parameter will be added to the code. I can only set it to -1 to always waiting it.
Using the code that waits and activates the window, I can successfully click the button, the code looks like this, (it's a bit strange,Need to activate it separately and set the delay) but the work is unstable, and sometimes there will be errors.
int w=wait(0 WA win(" - " "#32770"))
act w
0.5
but id(4427 w)
The above questions have common characteristics. I hope developers can provide some solutions. Thanks in advance.
Macro Acc not click
In addition, when the waiting time is set to 0, no time parameter will be added to the code. I can only set it to -1 to always waiting it.
Using the code that waits and activates the window, I can successfully click the button, the code looks like this, (it's a bit strange,Need to activate it separately and set the delay) but the work is unstable, and sometimes there will be errors.
int w=wait(0 WA win(" - " "#32770"))
act w
0.5
but id(4427 w)
The above questions have common characteristics. I hope developers can provide some solutions. Thanks in advance.
Macro Acc not click
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 364 206 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 364 206 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040801 "*" "" "" ""
str controls = "3"
str ax3SHD
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,mac "sub.WaitForLoaded" "" hDlg
ret
#sub WaitForLoaded
function hDlg
SHDocVw.WebBrowser we3
we3._getcontrol(id(3 hDlg))
we3.Navigate("http://www.quickmacros.com/download.html")
opt waitmsg 1
rep() 0.01; if(!we3.Busy) break
30 WV hDlg
Htm e=htm("B" "Download" "" hDlg "0" 1 0x1 30)
e.Click
int w1=wait(-1 WV win(" - " "#32770"))
Acc a1.Find(w1 "PUSHBUTTON" "" "class=Button[]id=4427" 0x1004 -1)
a1.Mouse(1)
;a1.DoDefaultAction