Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Usin Win32::GuiTest to remove printers.

by Albannach (Prior)
on Oct 14, 2004 at 18:26 UTC ( #399291=note: print w/replies, xml ) Need Help??

in reply to Usin Win32::GuiTest to remove printers.

If you mean not good programming as in it looks clumsy and delicate, then I agree, however Windows apps are often built in such a way that this is the only approach. What I do in these cases is make it as robust as possible with what the original app designer gave you.

For instance, to jump to a particular edit box, you can use SendKeys("{ALT}f");. This should put your cursor in the File: edit box, based on the child names you found (listing all the children is always a good starting point in my experience). Similarly you can press a button using the assigned alt-key sequence.

Tabbing is also handy for moving between fields, especially if you can go directly to one field using an alt-key sequence, then count tabs from there. Beware that it is not uncommon for the tab sequences to be nonsensical (where the original designer rearranged his widgets on screen without re-sequencing the tabs), and sometimes edit boxes are not in the tab list at all. When that happens, I've resorted to locating the mouse pointer and then clicking it to move the cursor into the required box. Yes it's messy, but it works... so long as the target application is not upgraded!

Good luck!

I'd like to be able to assign to an luser

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://399291]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2018-06-21 05:05 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.