Jump to content

Class Type


Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...