0

I'm using AutoIt to try to automate the use of a program called PhotoZoom 4. I'm running into a problem where I need to type text into a box where this is the Class and instance: [CLASS:wxWindowNR; INSTANCE:8]

I've tried the following with no luck (each line is a separate attempt):

ControlSetText($batchWindowTitle2, "", "[CLASS:wxWindowNR; INSTANCE:8]", '800')

ControlCommand($batchWindowTitle2, "", "[CLASS:wxWindowNR; INSTANCE:8]", "AddString", '800')

ControlClick($batchWindowTitle2, "", "[CLASS:wxWindowNR; INSTANCE:8]", "left", 1, 32, 12)
Send("800")

I expected either ControlCommand or ControlSetText to work at least, but they didn't. I googled this problem as well, but I literally couldn't find any references of "wxWindowNR" anywhere on the web. I'll attach a photo of the control.

If you don't know what wxWindowNR is either (I expect you might not since I have not seen it anywhere else on the web), what's the best way to automate clicking and typing in the box? I thought ControlClick would do it...

The control I'm working with

2
  • 2
    Did you try to "Tab-cycle" (e.g. send("{Tab 5}")) through all your controls until you get there in your GUI and then use a simple send()? Your GUI is probably preventing automation and checks for actual HW states whether your mouse or keyboard is actually pressed. This would be hard to manipulate. And does GUICtrlSetState(..., $GUI_FOCUS) work? You need to #include <GUIConstantsEx.au3>.
    – Samoth
    May 31, 2012 at 7:25
  • Excellent, the Tab trick worked! Sometimes you gotta think more simply like that..thanks!
    – Ken
    Jun 1, 2012 at 18:42

1 Answer 1

1

"Tab-cycle" (for example, send("{Tab 5}")) through all your controls until you get there in your GUI and then use a simple send().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.