Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait button clickable
#1
Hello everyone, I am in the process of recording, the button can not be directly clicked, I need to wait for a while to click,

 I think the setting waiting time is not reliable, so I tried a lot of function dialogs, for example: waiting for the window, waiting for accessible objects, but No success, 

I hope someone can provide some suggestions, thank you in advance
#2
try using wait for window enabled
here is a basic example using a qm dialog


Function Dialog3
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x5C032000 0x0 88 56 48 14 "My Button"
;4 Button 0x54032000 0x0 8 56 60 14 "Enable MyButton"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,mac "sub.WaitforButtonEnabled" "" hDlg
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 4 ;;Enable MyButton
,EnableWindow id(3 hDlg) 1 
ret 1

#sub WaitforButtonEnabled
function hwnd
int w1=wait(0 WE id(3 hwnd))
out "button enabled"

read here for how to use accessible objects  to wait for enabled button

http://www.quickmacros.com/forum/showthr...5#pid23045

You  should  probably  use accessible  objects since it appears  the button is a menu  or possibly a toolbar   button
#3
Thanks for your help, now it can run successfully, I found the parameters of the configuration. Smile

State=0x0 0x1

int w=wait(-1 WV win("AIDA64" "TForm_Report"))
Acc a.Find(w "PUSHBUTTON" "Save TO File" "class=TToolBar[]state=0x0 0x1" 0x1005 -1)
a.Mouse(1)

I have another problem, using a text file exported by aida64, the file is large, it consists of several parts

1.[ Summary ]

2.[CPU]

3.[ Motherboard ]

4.etc.

I want to know how to use the QM code and keep the required parts. For example, I want to keep [Summary] and [Motherboard], and delete the rest.

My current level of programming, no ideas, I don’t know where to start,


Attached Files
.zip   config.txt.zip (Size: 12.51 KB / Downloads: 224)


Forum Jump:


Users browsing this thread: 1 Guest(s)