Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't find popup when running; ok in debugger
#1
My 2nd day using this tool, and it is pretty awesome!

I'm using QM to enter data in an application running on a remote server, so I'm using Remote Desktop Connection to access the application. Connection and startup of app is done manually outside of macro.

In the macro I'm trying to use a Find dialog, and make a decision on whether or not a "not found" popup appears. Here is the fragment of interest:

Code:
Copy      Help
key Af  ;; hit the Find Next button
wait 2
int wPop = win("PortfolioCenter" "" "" 0x008) ;; 8: must be popup
str m
m.format("Popup id %i" wPop)
out m
if wPop != 0
    out "did not find ticker"
    ;; print message and end macro
;; continue with doing work

This works fine if I step through in the debugger. However, if I just Run it, the win command returns 0, even though the popup is present.

Is there some flag that I need to enable to see the popup when running without debugger? Or is there a more reliable way to look for the popup window?
Thanks
#2
Should be the same in debugger or not.
If QM is running on your computer, it will not find windows of programs running on remote computer, because Remote Desktop Connection shows single image, and there are no window objects. Instead try to capture and find image of the window.
#3
When I step through in debugger, it is able to find the popup.

However, I can try the capture/scan method. The Help system mentions a Find Image dialog; do you know where to find that? Or is that a separate Window tool? I'll try to use a Windows image capture program to grab the icon that appears in the "not found" popup.

Thanks!
#4
The dialog is in the floating toolbar, "windows, controls" menu.

Maybe it finds the debugger window Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)