Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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


Comment on Re: Usin Win32::GuiTest to remove printers.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-12-28 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls