Jump to content

strange behavior with gui


t0ddie
 Share

Recommended Posts

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers

his script? or one of the 2 that i've posted that work in beta or stable? or your example script that doesn't assign the GUICreate() to a variable either?

The script in your (quoted) post.... Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

ok so i have 3.1.1.0 and i am the only person that is getting the error?

the script does not work for me.

you must not be using the exact same version to test this.

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

  • Moderators

Ok, I understand that now... I had asked several times what $msg = $r1 is supposed to return. And as you stated, it only returns a 4 when it is the first control, because I stuck a checkbox in there before hand and both read '0'.

And as I said, I was missing the point of the test :P

@Toddie ; I still feel that the workaround would be GUICtrlRead($r1) = 1, then set the state back to unchecked after it did it's function call, at least till it's fixed I would say.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

@Toddie ; I still feel that the workaround would be GUICtrlRead($r1) = 1, then set the state back to unchecked after it did it's function call, at least till it's fixed I would say.

but the second scrpit i posted works with no workaround

and i dont see what i can change on the first script so that it behaves like the second script

i tried switching from while 1 and making the $gui_event_close a case statement like is in the second script but i dont see any other difference

i hate debugging sometimes

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

  • Developers

but the second scrpit i posted works with no workaround

and i dont see what i can change on the first script so that it behaves like the second script

i tried switching from while 1 and making the $gui_event_close a case statement like is in the second script but i dont see any other difference

i hate debugging sometimes

Do you mean this one ?

#include <GuiConstants.au3>
GUICreate("Assistant", 400, 450)
GUICtrlCreateGroup("Runes / Amounts", 20, 230, 360, 180)


$r1 = GUICtrlCreateRadio("Amn  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Amn", "NotFound"), 25, 245, 70)
$r2 = GUICtrlCreateRadio("Ber  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ber", "NotFound"), 25, 265, 70)
$r3 = GUICtrlCreateRadio("Cham  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Cham", "NotFound"), 25, 285, 70)
$r4 = GUICtrlCreateRadio("Dol  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Dol", "NotFound"), 25, 305, 70)
$r5 = GUICtrlCreateRadio("El  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "El", "NotFound"), 25, 325, 70)
$r6 = GUICtrlCreateRadio("Eld  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Eld", "NotFound"), 25, 345, 70)
$r7 = GUICtrlCreateRadio("Eth  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Eth", "NotFound"), 25, 365, 70)
$r8 = GUICtrlCreateRadio("Fal  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Fal", "NotFound"), 25, 385, 70)


$r9 = GUICtrlCreateRadio("Gul  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Gul", "NotFound"), 100, 245, 70)
$r10 = GUICtrlCreateRadio("Hel  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Hel", "NotFound"), 100, 265, 70)
$r11 = GUICtrlCreateRadio("Io  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Io", "NotFound"), 100, 285, 70)
$r12 = GUICtrlCreateRadio("Ist  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ist", "NotFound"), 100, 305, 70)
$r13 = GUICtrlCreateRadio("Ith  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ith", "NotFound"), 100, 325, 70)
$r14 = GUICtrlCreateRadio("Jah  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Jah", "NotFound"), 100, 345, 70)
$r15 = GUICtrlCreateRadio("Ko  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ko", "NotFound"), 100, 365, 70)
$r16 = GUICtrlCreateRadio("Lem  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Lem", "NotFound"), 100, 385, 70)


$r17 = GUICtrlCreateRadio("Lo  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Lo", "NotFound"), 175, 245, 70)
$r18 = GUICtrlCreateRadio("Lum  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Lum", "NotFound"), 175, 265, 70)
$r19 = GUICtrlCreateRadio("Mal  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Mal", "NotFound"), 175, 285, 70)
$r20 = GUICtrlCreateRadio("Nef  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Nef", "NotFound"), 175, 305, 70)
$r21 = GUICtrlCreateRadio("Ohm  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ohm", "NotFound"), 175, 325, 70)
$r22 = GUICtrlCreateRadio("Ort  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ort", "NotFound"), 175, 345, 70)
$r23 = GUICtrlCreateRadio("Pul  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Pul", "NotFound"), 175, 365, 70)
$r24 = GUICtrlCreateRadio("Ral  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ral", "NotFound"), 175, 385, 70)


$r25 = GUICtrlCreateRadio("Shael  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Shael", "NotFound"), 250, 245, 70)
$r26 = GUICtrlCreateRadio("Sol  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Sol", "NotFound"), 250, 265, 70)
$r27 = GUICtrlCreateRadio("Sur  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Sur", "NotFound"), 250, 285, 70)
$r28 = GUICtrlCreateRadio("Tal  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Tal", "NotFound"), 250, 305, 70)
$r29 = GUICtrlCreateRadio("Tir  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Tir", "NotFound"), 250, 325, 70)
$r30 = GUICtrlCreateRadio("Thul  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Thul", "NotFound"), 250, 345, 70)
$r31 = GUICtrlCreateRadio("Um  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Um", "NotFound"), 250, 365, 70)
$r32 = GUICtrlCreateRadio("Vex  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Vex", "NotFound"), 250, 385, 70)


$r33 = GUICtrlCreateRadio("Zod  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Zod", "NotFound"), 325, 245, 53)



GUICtrlCreateGroup("", -99, -99, 1, 1);close group

GUISetState()
$msg = GUIGetMsg()

While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $GUI_EVENT_CLOSE
         Exit
         

         
     Case $msg = $r1
msgbox(0,"test","1")
    Case $msg = $r2
msgbox(0,"test","2")
     Case $msg = $r3
         msgbox(0,"test","3")
     EndSelect
WEnd

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

no. i mean this one

#include <GuiConstants.au3>
GUICreate("Assistant", 400, 450)
GUICtrlCreateGroup("Runes / Amounts", 20, 230, 360, 180)


$r1 = GUICtrlCreateRadio("Amn  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Amn", "NotFound"), 25, 245, 70)
$r2 = GUICtrlCreateRadio("Ber  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ber", "NotFound"), 25, 265, 70)
$r3 = GUICtrlCreateRadio("Cham  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Cham", "NotFound"), 25, 285, 70)
$r4 = GUICtrlCreateRadio("Dol  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Dol", "NotFound"), 25, 305, 70)
$r5 = GUICtrlCreateRadio("El  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "El", "NotFound"), 25, 325, 70)
$r6 = GUICtrlCreateRadio("Eld  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Eld", "NotFound"), 25, 345, 70)
$r7 = GUICtrlCreateRadio("Eth  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Eth", "NotFound"), 25, 365, 70)
$r8 = GUICtrlCreateRadio("Fal  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Fal", "NotFound"), 25, 385, 70)


$r9 = GUICtrlCreateRadio("Gul  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Gul", "NotFound"), 100, 245, 70)
$r10 = GUICtrlCreateRadio("Hel  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Hel", "NotFound"), 100, 265, 70)
$r11 = GUICtrlCreateRadio("Io  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Io", "NotFound"), 100, 285, 70)
$r12 = GUICtrlCreateRadio("Ist  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ist", "NotFound"), 100, 305, 70)
$r13 = GUICtrlCreateRadio("Ith  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ith", "NotFound"), 100, 325, 70)
$r14 = GUICtrlCreateRadio("Jah  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Jah", "NotFound"), 100, 345, 70)
$r15 = GUICtrlCreateRadio("Ko  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ko", "NotFound"), 100, 365, 70)
$r16 = GUICtrlCreateRadio("Lem  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Lem", "NotFound"), 100, 385, 70)


$r17 = GUICtrlCreateRadio("Lo  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Lo", "NotFound"), 175, 245, 70)
$r18 = GUICtrlCreateRadio("Lum  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Lum", "NotFound"), 175, 265, 70)
$r19 = GUICtrlCreateRadio("Mal  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Mal", "NotFound"), 175, 285, 70)
$r20 = GUICtrlCreateRadio("Nef  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Nef", "NotFound"), 175, 305, 70)
$r21 = GUICtrlCreateRadio("Ohm  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ohm", "NotFound"), 175, 325, 70)
$r22 = GUICtrlCreateRadio("Ort  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ort", "NotFound"), 175, 345, 70)
$r23 = GUICtrlCreateRadio("Pul  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Pul", "NotFound"), 175, 365, 70)
$r24 = GUICtrlCreateRadio("Ral  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Ral", "NotFound"), 175, 385, 70)


$r25 = GUICtrlCreateRadio("Shael  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Shael", "NotFound"), 250, 245, 70)
$r26 = GUICtrlCreateRadio("Sol  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Sol", "NotFound"), 250, 265, 70)
$r27 = GUICtrlCreateRadio("Sur  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Sur", "NotFound"), 250, 285, 70)
$r28 = GUICtrlCreateRadio("Tal  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Tal", "NotFound"), 250, 305, 70)
$r29 = GUICtrlCreateRadio("Tir  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Tir", "NotFound"), 250, 325, 70)
$r30 = GUICtrlCreateRadio("Thul  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Thul", "NotFound"), 250, 345, 70)
$r31 = GUICtrlCreateRadio("Um  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Um", "NotFound"), 250, 365, 70)
$r32 = GUICtrlCreateRadio("Vex  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Vex", "NotFound"), 250, 385, 70)


$r33 = GUICtrlCreateRadio("Zod  " & IniRead(@ScriptDir & "/Scam.ini", "RuneAmounts", "Zod", "NotFound"), 325, 245, 53)



GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

GUISetState()
While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $GUI_EVENT_CLOSE
         Exit
         

         
     Case $msg = $r1
msgbox(0,"test","1")
    Case $msg = $r2
msgbox(0,"test","2")
     Case $msg = $r3
         msgbox(0,"test","3")
     EndSelect
 WEnd

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

  • Developers

no. i mean this one

Did you actually look at my post ?

What is the difference with the one I posted other than the include fix ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

the difference is that i didnt post that

mine doesnt have that added $msg = guigetmsg()

my code works for me.

yours probably does too

but the FIRST CODE i put in this thread behaves oddly for me. EVEN IF I ADD your workaround.

im just saying that with the same version of autoit my first script shows the odd behavior and the second one does not.

i will be back to waste more time arguing.

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

how stupid do you have to be to plan on arguing with people trying to help you?

lol

i dont plan on arguing, i just have a feeling it will happen when comments like this are made

and when i post an answer to code that doesnt work 4 times.. and you are still trying to convince me that i should use your workaround that DOES NOT WORK FOR ME.. it makes me post comments like that.

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

lol

i dont plan on arguing, i just have a feeling it will happen when comments like this are made

and when i post an answer to code that doesnt work 4 times.. and you are still trying to convince me that i should use your workaround that DOES NOT WORK FOR ME.. it makes me post comments like that.

i'm not "still" doing anything. i've already given up on you. good luck to ya though.
Link to comment
Share on other sites

i can see you havent given up on making comments though

and as for my problem, i doubt you ever really started trying.

i said i would be back to waste more time arguing.. and because of your comments thats exactly what is happening. im not stupid, its just that with assholes like you i can predict the future.

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

  • Moderators

its just that with assholes like you i can predict the future.

With comments like that you, you're not 'predicting' your creating.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

yeah i juggled the idea around whether to add the word "asshole" or not

but the damage was already done. the scene was created already i just added to it

and by arguing the first time i mean that i feel like its arguing when i mention over and over it doesnt work and you treat me like an idiot ... saying it works... as if im not paying attention.

lets get back on topic.... i was talking about code... and then topic changed to a question of how stupid i am

excuse me for taking slight offense

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

  • Moderators

As Jdeb has pointed out, there is no 'Current Fix' for your code, your chasing your tail a bit. To find out why one works or the other does, is rather a moot point at the moment. Again, about the 5th time now I've said it I think, just use the Work Around (GUICtrlRead()) until the issue is resolved within AuotIt itself. Then you won't have to endure any of the anymosity that seems to be building.

Edit:

I think I fixed a misspelled word, but then again, I may have made it worse :P

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

This topic is now in the Bug Reports: Larry seems to have a workaround that may work, with WinWaitDelay / WinSetState().

http://www.autoitscript.com/forum/index.ph...ndpost&p=135036

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

thanks.

ill find my own workaround by changing the code little by little until it looks like the gui from the first code and behaves like the gui from the second code.

thats all i wanted but i guess im going to have to troubleshoot this myself.

guess nobody could answer why because they arent using the same version as i am.

sorry about dragging this thread out i guess... oh and

no offense cameronsdad.

edit: ooh so it has something to do with the window i activate?

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

  • Moderators

Larry explains that is something to do with GUISetState(). A bit over my head, but when testing his method it in fact does work.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Developers

Larry explains that is something to do with GUISetState(). A bit over my head, but when testing his method it in fact does work.

Not fully...

When the GUI looses the Focus and gets it again the GUIGetMsg() will return the CtrlID of the first Radio control.....

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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