Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessible Object Control in Dialog
#1
Supposed that in a dialog exists an edit field with an horizontal scroll bar :
Quote:12 Edit 0x54130884 0x200 74 3 363 23 ""

A button in this dialog is used to scroll this scroll bar to its right edge :
Quote: 15 Button 0x54034040 0x4 439 15 10 10 "Button"
calling sub function tam :
Function tempf10
Code:
Copy      Help
#sub tam
function int'hw int'field

Acc a.Find(hw "PUSHBUTTON" "Column right" F"class=Edit[]id={field}" 0x1025 1)
a.Mouse(2)
0.2
key DY

I wonder why it is only statement :
Quote: case [15 25]
mac "sub.tam" "" hDlg wParam-3

that works.

If calling tam directly as :
Quote: case [15 25]
sub.tam( hDlg wParam-3)

it works up to locating and right clicking the control, but then it does not key.

Any advice is mostly welcome.
#2
try
opt waitmsg 1
opt keysync 1

mac also is good. Functions key, lef etc are designed to automate windows of other applications or threads, not dialogs of same thread.
#3
Many thanks, indeed!


Forum Jump:


Users browsing this thread: 1 Guest(s)