Administrators Jon Posted August 5, 2004 Administrators Share Posted August 5, 2004 (edited) http://www.autoitscript.com/autoit3/files/unstable/autoit/I got a really rude email from some blind guy who ranted at me for the ClassNN parameter in the Control...() functions. Saying that it was badly thought out, programmer's don't give a shit about blind people and whenever he makes a suggestion they ignore him, etc.I replied that maybe he should look at the way makes suggestions and to not be so rude...that really set him off After the ranting there was a valid suggestion in there that his screenreader software can speak the Control ID number of a control (actually the same ID that is used in the GUI) so I modified AutoIt spy and AutoIt to work with these numbers. The Control ID is probably the best method to use anyway except when working with static text controls (which often have the same ID).The supported methods for working with controls are now:- Control ID- ClassnameNN- Text on the controlThe control functions choose the method based on the parameter you pass. For example if you pass them a number (or a string that is a number) then the control ID method is used, otherwise the parameter is assumed to be a classname/text.Please have a play with the spy and autoit to make sure controls still work...I've renabled the GUI code too. Edited August 5, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
ezzetabi Posted August 5, 2004 Share Posted August 5, 2004 (edited) Even if he was was so rude you acted very nicely. You are the best Jon. But maybe we already have an other email for the clueless Hate mail section... Edited August 5, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
ezzetabi Posted August 5, 2004 Share Posted August 5, 2004 I tried this new funcion of Autoitspy, but I can't understand what advantages it have over the old ControlNN... the control id is unique at the same way... Link to comment Share on other sites More sharing options...
Valik Posted August 5, 2004 Share Posted August 5, 2004 If the controls are ever re-ordered for some reason by the application developer (I have experienced this), the ID of the control is very unlikely to change, but the classNN very likely will. Link to comment Share on other sites More sharing options...
ezzetabi Posted August 5, 2004 Share Posted August 5, 2004 Ahhh! Now it is all clear. Thanks Valik. Link to comment Share on other sites More sharing options...
CyberSlug Posted August 5, 2004 Share Posted August 5, 2004 If the controls are ever re-ordered for some reason by the application developer (I have experienced this), the ID of the control is very unlikely to change, but the classNN very likely will. <{POST_SNAPBACK}>Also if you've ResHacked a program for some reason.... Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
this-is-me Posted August 5, 2004 Share Posted August 5, 2004 Call me blind, but I don't seem to see any difference in the au3spy or helpfile... Who else would I be? Link to comment Share on other sites More sharing options...
pekster Posted August 5, 2004 Share Posted August 5, 2004 (edited) Call me blind, but I don't seem to see any difference in the au3spy or helpfile... <{POST_SNAPBACK}>http://www.autoitscript.com/fileman/users/public/_pekster_resource/au3_spy-classes.gif Note the addition of the ControlID and name. It appears in the 3.0.103 beta as of Aug 5th. Typo in the date Edited August 5, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
this-is-me Posted August 5, 2004 Share Posted August 5, 2004 Aha! I also posted a message about the debugger. Could you look at it? Who else would I be? Link to comment Share on other sites More sharing options...
Josbe Posted August 5, 2004 Share Posted August 5, 2004 I dunno if was maded with any intention... But, I found a little thing about 'GUI docs' in the helpfile v3.0.103... In "Appendix" section ---> "GUI Control Styles" AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
CyberSlug Posted August 6, 2004 Share Posted August 6, 2004 (edited) The control functions choose the method based on the parameter you pass. For example if you pass them a number (or a string that is a number) then the control ID method is used, otherwise the parameter is assumed to be a classname/text. <{POST_SNAPBACK}>The "string that is a number" is not strictly true if a button's text is a number..... What are you supposed to do if you have a button with no text? An empy string is treated like a zero control ID I guess the answer is "don't do that" ... but it should probably be documented Opt("GUINotifyMode", 1) GuiCreate("MyGUI") $BUTTON_TEXT = "" ;;;$BUTTON_TEXT = "fooText" ;;;$BUTTON_TEXT = "42" $button_1 = GUISetControl("button", $BUTTON_TEXT, 50, 20, 100, 40) GuiShow() While 1 sleep(100) $msg = GuiMsg(0) Select Case $msg = -3 Exit Case $msg = $button_1 $x = ControlGetPos("MyGUI","",$BUTTON_TEXT) MsgBox(4096,"Coords", "x=" & $x[0] & " y=" & $x[1]) EndSelect WEnd Exit P.S. Forum upgrade note: Smilies are now inserted at the cursor position instead of at the very end Edited August 6, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 6, 2004 Author Administrators Share Posted August 6, 2004 I've got changed documentation at this end, just not uploaded yet as the helpfile is more difficult to convert from GUI mode to non-GUI mode. In Opera smilies are still inserted right at the end, grr. Maybe I'll bug report it. Control ID 0 is classed as invalid and never checked as the code converts the string to a number and checks if it is 0, if >0 it checks for the control ID. If that fails it moves onto the classname and if that fails it moves onto the text. I may change it today to check the variant type is a number to decide what to do (although the string only approach may have to be used in AutoItX because of lack of variants) Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 6, 2004 Author Administrators Share Posted August 6, 2004 I've changed it now. If the controlID/Class parameter is a number (not just a string that looks like a number) then the control ID is used, otherwise the classnameNN/text method is used. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 7, 2004 Author Administrators Share Posted August 7, 2004 P.S. Forum upgrade note: Smilies are now inserted at the cursor position instead of at the very end Bah, this doesn't work in Opera (what I'm using). I reported it as a bug and apparrently it's a bug in Opera's javascript parsing that Opera won't fix due to it not being W3C (or something) compliant. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jpm Posted August 7, 2004 Share Posted August 7, 2004 Do you intend to upload the current source? Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 7, 2004 Author Administrators Share Posted August 7, 2004 Do you intend to upload the current source? Sorry, I was on dialup at the time. Done now. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jpm Posted August 7, 2004 Share Posted August 7, 2004 Sorry, I was on dialup at the time. Done now. <{POST_SNAPBACK}>no problem Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 14, 2004 Author Administrators Share Posted August 14, 2004 Updated:The variant rewrite seems to be OK, but keep an eye on any "odd" math results.http://www.autoitscript.com/autoit3/files/unstable/autoit/- Added: Control ID is now shown in the AutoIt Window Spy- Changed: (Internal) Variant rewrite- Changed: Control...() functions now accept the Control ID as an extra way to identify a control- Fixed: Chr()- Fixed: StatusBarGetText() failed when used with no "Text" parameter- Fixed: InputBox() returns focus to the previously active window Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Josbe Posted August 14, 2004 Share Posted August 14, 2004 Updated: The variant rewrite seems to be OK, but keep an eye on any "odd" math results. http://www.autoitscript.com/autoit3/files/unstable/autoit/ - Added: Control ID is now shown in the AutoIt Window Spy - Changed: (Internal) Variant rewrite - Changed: Control...() functions now accept the Control ID as an extra way to identify a control - Fixed: Chr() - Fixed: StatusBarGetText() failed when used with no "Text" parameter - Fixed: InputBox() returns focus to the previously active window <{POST_SNAPBACK}>Good! (ID support) BTW: What about Chr() fixes? AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 15, 2004 Author Administrators Share Posted August 15, 2004 Good! (ID support) BTW: What about Chr() fixes? Secret. Chr("65") didn't work as expected, Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now