Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Existing Acc a=acc code fails after upgrade to
After upgrading from QM v2.3.2.8 one of my functions that was working in QM fails.
The function triggers when the Word 2010 "Enter Password to open file" dialog window opens.
The code is below.
The error occurs on the Acc a=acc... line:
Error (RT) in WordDocPassword: object not found.
Is this expected?

Function WordDocPassword
Trigger !ca"Password" "bosa_sdm_msword"     Help - how to add the trigger to the macro
Select All      Help
int hwnd=val(_command)
act hwnd

wait 0.5

if GetMod <>0; ret ;; If any modifier key down
;msg GetMod
if win <> hwnd; ret ;; If dialog no longer active

;Get the filename from the Password dialog
Acc a=acc("" "STATICTEXT" win("Password" "bosa_sdm_msword") "bosa_sdm_msword" "" 0x1001)
Works on my PC. Tested with QM with Office 2010 on Windows 7.
Try this:
Acc a=acc("" "STATICTEXT" hwnd "" "" 0x1001)
Hi Gintaras,
I reverted to QM and the problem was still there.
When I tried to find an accessible object from the QM editor, it would find the window and only the TEXT fields within the window, not the STATICTEXT fields I had previously been accessing.
The problem went away after a batch of Windows updates.
Thanks for you help,

Forum Jump:

Users browsing this thread: 1 Guest(s)