Sign in to follow this  
Followers 0

V3.0.103 Unstable

114 posts in this topic

#1 ·  Posted (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 :ph34r:

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 control

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.

Please have a play with the spy and autoit to make sure controls still work...I've renabled the GUI code too.

Edited by Jon

"If you can post in the forum, that there is an issue with the forum, then the forum is working spectacularly. All else is cosmetics, and can totally suck it."
- boththose, April 2015.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Even if he was was so rude you acted very nicely. You are the best Jon. :ph34r:

But maybe we already have an other email for the clueless Hate mail section...

Edited by ezzetabi

Share this post


Link to post
Share on other sites

#3 ·  Posted

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...

Share this post


Link to post
Share on other sites

#4 ·  Posted

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.

Share this post


Link to post
Share on other sites

#5 ·  Posted

Ahhh! Now it is all clear. Thanks Valik.

Share this post


Link to post
Share on other sites

#6 ·  Posted

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!

Share this post


Link to post
Share on other sites

#7 ·  Posted

Call me blind, but I don't seem to see any difference in the au3spy or helpfile...


Who else would I be?

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

#9 ·  Posted

Aha! I also posted a message about the debugger. Could you look at it?


Who else would I be?

Share this post


Link to post
Share on other sites

#10 ·  Posted

:ph34r:

I dunno if was maded with any intention... :lol:

But, I found a little thing about 'GUI docs' in the helpfile v3.0.103... :(

In "Appendix" section ---> "GUI Control Styles"

Share this post


Link to post
Share on other sites

#11 ·  Posted (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 :(:ph34r: I guess the answer is "don't do that" :lol: ... 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 :lol:

Edited 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!

Share this post


Link to post
Share on other sites

#12 ·  Posted

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. :ph34r:

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)


"If you can post in the forum, that there is an issue with the forum, then the forum is working spectacularly. All else is cosmetics, and can totally suck it."
- boththose, April 2015.

Share this post


Link to post
Share on other sites

#13 ·  Posted

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.


"If you can post in the forum, that there is an issue with the forum, then the forum is working spectacularly. All else is cosmetics, and can totally suck it."
- boththose, April 2015.

Share this post


Link to post
Share on other sites

#14 ·  Posted

P.S.  Forum upgrade note:  Smilies are now inserted at the cursor position instead of at the very end :ph34r:

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. :(

"If you can post in the forum, that there is an issue with the forum, then the forum is working spectacularly. All else is cosmetics, and can totally suck it."
- boththose, April 2015.

Share this post


Link to post
Share on other sites

#15 ·  Posted

Do you intend to upload the current source? :ph34r:

Share this post


Link to post
Share on other sites

#16 ·  Posted

Do you intend to upload the current source? :ph34r:

Sorry, I was on dialup at the time. Done now.

"If you can post in the forum, that there is an issue with the forum, then the forum is working spectacularly. All else is cosmetics, and can totally suck it."
- boththose, April 2015.

Share this post


Link to post
Share on other sites

#17 ·  Posted

Sorry, I was on dialup at the time.  Done now.

<{POST_SNAPBACK}>

no problem

Share this post


Link to post
Share on other sites

#18 ·  Posted

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


"If you can post in the forum, that there is an issue with the forum, then the forum is working spectacularly. All else is cosmetics, and can totally suck it."
- boththose, April 2015.

Share this post


Link to post
Share on other sites

#19 ·  Posted

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? :ph34r:

Share this post


Link to post
Share on other sites

#20 ·  Posted

Good! (ID support) :lol:

BTW: What about Chr() fixes?  :(

Secret. :ph34r:

Chr("65") didn't work as expected,


"If you can post in the forum, that there is an issue with the forum, then the forum is working spectacularly. All else is cosmetics, and can totally suck it."
- boththose, April 2015.

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  
Followers 0