Jump to content
Sign in to follow this  
astronomer

Class Type

Recommended Posts

astronomer

Hello everyone. You guys were so helpful last time I asked a question, I hope I can impose again.

Normally I use the AutoIt Window Info tool to see the string I have to 'Send' to simulate a keystroke. It's usually something like '&Scan', '&Close', '&Status' or similar. This time I don't have those options and a Ctrl+Key, Shift+Key or Alt+Key doesn't work either. I have noticed though, that when using the AutoIt Window Info tool, if I hover my mouse cursor over the button I wish to 'Send' a simulated keypress to, the 'Class' and 'Instance' fields in the 'Basic Control Info' section, display:

Class >>> TButton

Instance>> 6

If I hover my mouse cursor over another button in the same window, the 'TButton' entry remains the same but the 'Instance' entry changes (to 5 for example).

Is there a way to use those 'Class' and 'Instance' entries to simulate the keypress?

Share this post


Link to post
Share on other sites
Shevilie

Have a look in the help manual for all the ControlClick ControlSend etc, it will help you a lot (did to me)


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites
astronomer

ControlClick("Window Title","Window text","Button6")oÝ÷ Ûú®¢×ú+¶éÚµéreçgjØZµØmÂäën²)àJ¯XßÛvøx!yÉv­
í®B'${axw¥¤X¥zÈ­ß۪笶*'¡ù'£§Z¶Ú%¢¢¸¬mÙh©Ýq©º"¶aÆ®¶­sd6öçG&öÄ6Æ6²gV÷CµvæF÷rFFÆRgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¥66ã²å5Dä4S£eÒgV÷C²

It works a treat. :)

Many thanks to both of you for your help. I appreciate you guys taking the time to help a newbie out again.

Share this post


Link to post
Share on other sites
Shevilie

Unfortunately, Zedna, that didn't work. But using Shevilie's advice, I checked out ControlClick in the Help Files (it's a question of knowing what to look for, isn't it, lol?) and came up with this:

ControlClick("Window Title", "", "[CLASS:Button; TEXT:Scan; INSTANCE:6]")

It works a treat. :)

Many thanks to both of you for your help. I appreciate you guys taking the time to help a newbie out again.

Well Zedna's didn't work because a typo :)

ControlClick("Window Title", "", "TButton6")


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×