Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Usin Win32::GuiTest to remove printers.

by Albannach (Monsignor)
on Oct 14, 2004 at 18:26 UTC ( [id://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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://399291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-23 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found