Jump to content
blackrainbow

GUICtrlRead - Case problem

Recommended Posts

blackrainbow

Hello, I post this because I was coding and I see a big bug in the GUICtrlRead function, here is my code (the interface part almost):

<snip>

Don't worry about comments, it's in french :P

So, the $REG variable contain a GUICtrlCreateInput, to get it value, I use 

$reg = GUICtrlRead($REG)

And there is the bug, the $reg value is doing wired things with the $REG value, I mean that when I run  $reg = GUICtrlRead($REG) for the first time, $reg is equal to the string that I entered in the input field, but if I retry to execute  $reg = GUICtrlRead($REG) a scnd time, the value is equal to 0. I havn't this bug with the 

$summoner = GUICtrlRead($SUMM)

So I think it mean that if you've got two value with the same name but not the same case (A, a), it can mix value and do some weird things. I thinks it's a big bug, that's why I report it. And my code is not bugging because of a programmation error, the $SUMM  and the $summoner have differents names but are used in exactly the same way as $REG and $reg.

My fix:

Call your variables differently (ex: $REG and $region is working for me)

Thanks to fix this bug :) 

Edited by Melba23
Removed code and amended title

Share this post


Link to post
Share on other sites
iamtheky

umm no, case means nothing.

First Loop, $reg is a control, and then you set the string that is read from $reg to $reg.

Second Loop, $reg is now a string (because case has no effect), and when you guictrlread a string it returns 0, which means failure.

$reg = "string I entered"
msgbox(0, '' , guictrlread($reg))

 

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites
blackrainbow

CASE HAZ NO EFECT ??! :lmao:

Ha ok, so ... hum.. feel a kinda stupid >w<

I was coding in C right after so I didn't notice that AutoIt wasn't case-sensitive :S

Sry for post

Share this post


Link to post
Share on other sites
Melba23

blackrainbow,

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

M23

Edit:

JohnOne,

I remembered to lock this one.

 

Edited by Melba23
  • Like 1

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.