Jump to content

Recommended Posts

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

if you change the

$msg = 0

at the top of the code to:

$msg = GUIGetMsg()

it works fine...

no. it does not

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

Posted

:P - Ooops, my turn Cam!!

heh, i tried hinting at it a few times to see if he'd figure it out on his own, and others told him to add the line outside of the loop, but when someone said 'bug' i thought i'd be more direct. I don't think it can be considered a bug because he was explicitly giving the variable an erran value before evaluation. I understand that he did it in order to avoid the used but not declared error on his while line, but because the comparison in the while loop is so important, throwing in an arbitrary number is a bad idea.
  • Developers
Posted

no. it does not

@toddie, as a work-arround change:

winmove("Diablo II","",221,104,806,636 )
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()

to

winmove("Diablo II","",221,104,806,636 )
$msg = GUIGetMsg()
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()

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

Posted (edited)

have you tried this code?

changing to $msg = GUIGetMsg() from $msg = 0 at the top of the code DOES NOTHING

does for me with 3.1.1.97

im using 3.1.1.0

also

winmove("Diablo II","",221,104,806,636 )
$msg = GUIGetMsg()
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()

$msg = GUIGetMsg() does not work even if i put it IMMEDIATELY before the while loop

Edited by t0ddie

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

  • Moderators
Posted (edited)

@Jdeb:

Result Per your test script:

@@ Debug(60) : $r1 = 4 ; Unchecked 1st radio

>Error code: 0

@@ Debug(57) : $msg = 4 ; Checked 1st radio :P

@@ Debug(57) : $msg = 4 ; with unchecked first radio

>Error code: 0

@@ Debug(57) : $msg = 5 ; with checked 2nd radio

Edit: Added a 3rd Radio:

@@ Debug(57) : $msg = 6 ; with 3rd radio checked

These are simply the Control ID returns... for radio buttons.

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.

  • Developers
Posted

@Jdeb:

Result Per your test script:

@@ Debug(60) : $r1 = 4 ; Unchecked 1st radio

>Error code: 0

@@ Debug(57) : $msg = 4 ; Checked 1st radio :P

@@ Debug(57) : $msg = 4 ; with unchecked first radio

>Error code: 0

@@ Debug(57) : $msg = 5 ; with checked 2nd radio

Yes correct ... ... so I posted:

This script has the exact same problem !

This behaviour is only shown when BETA is used and doesn't show up when 3.1.1 is used.

It also only shows up when the first Control is a radio button..

Conclusion: Sounds like a BUG to me....

What is wrong with this conclusion ?

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

Posted

whats wrong?

the temp-fix isnt working for me

great its a bug. so i have to use a workaround.

where is one?

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

Posted

have you tried this code?

changing to $msg = GUIGetMsg() from $msg = 0 at the top of the code DOES NOTHING

im using 3.1.1.0

also

winmove("Diablo II","",221,104,806,636 )
$msg = GUIGetMsg()
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()

$msg = GUIGetMsg() does not work even if i put it IMMEDIATELY before the while loop

here. this is the code i'm using with 3.1.1.97 with NO ISSUE. and the only change that i made was the one that i suggested to you.

#include <GuiConstants.au3>
GUICreate("Controls", 217,@DesktopHeight,0,0)

GUICtrlCreateGroup("Runes / Amounts", 2, 0, 213, 235)
$r1 = GUICtrlCreateRadio("Amn  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Amn", "NotFound"), 4, 13, 68)
$r2 = GUICtrlCreateRadio("Ber  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ber", "NotFound"), 74, 13, 68)
$r3 = GUICtrlCreateRadio("Cham  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Cham", "NotFound"), 144, 13, 68)

$r4 = GUICtrlCreateRadio("Dol  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Dol", "NotFound"), 4, 33, 70)
$r5 = GUICtrlCreateRadio("El  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "El", "NotFound"), 74, 33, 70)
$r6 = GUICtrlCreateRadio("Eld  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Eld", "NotFound"), 144, 33, 70)

$r7 = GUICtrlCreateRadio("Eth  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Eth", "NotFound"), 4, 53, 70)
$r8 = GUICtrlCreateRadio("Fal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Fal", "NotFound"), 74, 53, 70)
$r9 = GUICtrlCreateRadio("Gul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Gul", "NotFound"), 144, 53, 70)

$r10 = GUICtrlCreateRadio("Hel  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Hel", "NotFound"), 4, 73, 70)
$r11 = GUICtrlCreateRadio("Io  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Io", "NotFound"), 74, 73, 70)
$r12 = GUICtrlCreateRadio("Ist  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ist", "NotFound"), 144, 73, 70)

$r13 = GUICtrlCreateRadio("Ith  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ith", "NotFound"), 4, 93, 70)
$r14 = GUICtrlCreateRadio("Jah  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Jah", "NotFound"), 74, 93, 70)
$r15 = GUICtrlCreateRadio("Ko  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ko", "NotFound"), 144, 93, 70)

$r16 = GUICtrlCreateRadio("Lem  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lem", "NotFound"), 4, 113, 70)
$r17 = GUICtrlCreateRadio("Lo  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lo", "NotFound"), 74, 113, 70)
$r18 = GUICtrlCreateRadio("Lum  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lum", "NotFound"), 144,113, 70)

$r19 = GUICtrlCreateRadio("Mal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Mal", "NotFound"), 4, 133, 70)
$r20 = GUICtrlCreateRadio("Nef  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Nef", "NotFound"), 74, 133, 70)
$r21 = GUICtrlCreateRadio("Ohm  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ohm", "NotFound"), 144, 133, 70)

$r22 = GUICtrlCreateRadio("Ort  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ort", "NotFound"), 4, 153, 70)
$r23 = GUICtrlCreateRadio("Pul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Pul", "NotFound"), 74, 153, 70)
$r24 = GUICtrlCreateRadio("Ral  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ral", "NotFound"), 144, 153, 70)

$r25 = GUICtrlCreateRadio("Shael  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Shael", "NotFound"), 4, 173, 70)
$r26 = GUICtrlCreateRadio("Sol  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Sol", "NotFound"), 74, 173, 70)
$r27 = GUICtrlCreateRadio("Sur  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Sur", "NotFound"), 144, 173, 70)

$r28 = GUICtrlCreateRadio("Tal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Tal", "NotFound"), 4, 193, 70)
$r29 = GUICtrlCreateRadio("Tir  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Tir", "NotFound"), 74, 193, 70)
$r30 = GUICtrlCreateRadio("Thul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Thul", "NotFound"), 144, 193, 70)

$r31 = GUICtrlCreateRadio("Um  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Um", "NotFound"), 4, 213, 70)
$r32 = GUICtrlCreateRadio("Vex  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Vex", "NotFound"),74, 213, 70)
$r33 = GUICtrlCreateRadio("Zod  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Zod", "NotFound"), 144, 213, 53)
GUICtrlCreateGroup("", -99, -99, 1, 1);close group

GUISetState()

SplashTextOn("Assistant","Ready to Go!",@DesktopWidth - 227,100,221,0)
WinActivate("Diablo II")
winmove("Diablo II","",221,104,806,636 )
$msg = GUIGetMsg()
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
         Select
             
              Case $msg = $r1
         moverune()

         EndSelect
WEnd


Exit

Func moverune()
msgbox(0,"test","why the hell am i executing?")
endfunc
  • Developers
Posted

whats wrong?

the temp-fix isnt working for me

great its a bug. so i have to use a workaround.

where is one?

This works FIne for me in both BETA and Production:

#include <GuiConstants.au3>
$msg = 0
GUICreate("Controls", 217,@DesktopHeight,0,0)

GUICtrlCreateGroup("Runes / Amounts", 2, 0, 213, 235)
$r1 = GUICtrlCreateRadio("Amn  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Amn", "NotFound"), 4, 13, 68)
$r2 = GUICtrlCreateRadio("Ber  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ber", "NotFound"), 74, 13, 68)
$r3 = GUICtrlCreateRadio("Cham  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Cham", "NotFound"), 144, 13, 68)

$r4 = GUICtrlCreateRadio("Dol  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Dol", "NotFound"), 4, 33, 70)
$r5 = GUICtrlCreateRadio("El  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "El", "NotFound"), 74, 33, 70)
$r6 = GUICtrlCreateRadio("Eld  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Eld", "NotFound"), 144, 33, 70)

$r7 = GUICtrlCreateRadio("Eth  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Eth", "NotFound"), 4, 53, 70)
$r8 = GUICtrlCreateRadio("Fal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Fal", "NotFound"), 74, 53, 70)
$r9 = GUICtrlCreateRadio("Gul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Gul", "NotFound"), 144, 53, 70)

$r10 = GUICtrlCreateRadio("Hel  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Hel", "NotFound"), 4, 73, 70)
$r11 = GUICtrlCreateRadio("Io  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Io", "NotFound"), 74, 73, 70)
$r12 = GUICtrlCreateRadio("Ist  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ist", "NotFound"), 144, 73, 70)

$r13 = GUICtrlCreateRadio("Ith  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ith", "NotFound"), 4, 93, 70)
$r14 = GUICtrlCreateRadio("Jah  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Jah", "NotFound"), 74, 93, 70)
$r15 = GUICtrlCreateRadio("Ko  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ko", "NotFound"), 144, 93, 70)

$r16 = GUICtrlCreateRadio("Lem  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lem", "NotFound"), 4, 113, 70)
$r17 = GUICtrlCreateRadio("Lo  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lo", "NotFound"), 74, 113, 70)
$r18 = GUICtrlCreateRadio("Lum  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lum", "NotFound"), 144,113, 70)

$r19 = GUICtrlCreateRadio("Mal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Mal", "NotFound"), 4, 133, 70)
$r20 = GUICtrlCreateRadio("Nef  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Nef", "NotFound"), 74, 133, 70)
$r21 = GUICtrlCreateRadio("Ohm  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ohm", "NotFound"), 144, 133, 70)

$r22 = GUICtrlCreateRadio("Ort  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ort", "NotFound"), 4, 153, 70)
$r23 = GUICtrlCreateRadio("Pul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Pul", "NotFound"), 74, 153, 70)
$r24 = GUICtrlCreateRadio("Ral  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ral", "NotFound"), 144, 153, 70)

$r25 = GUICtrlCreateRadio("Shael  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Shael", "NotFound"), 4, 173, 70)
$r26 = GUICtrlCreateRadio("Sol  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Sol", "NotFound"), 74, 173, 70)
$r27 = GUICtrlCreateRadio("Sur  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Sur", "NotFound"), 144, 173, 70)

$r28 = GUICtrlCreateRadio("Tal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Tal", "NotFound"), 4, 193, 70)
$r29 = GUICtrlCreateRadio("Tir  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Tir", "NotFound"), 74, 193, 70)
$r30 = GUICtrlCreateRadio("Thul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Thul", "NotFound"), 144, 193, 70)

$r31 = GUICtrlCreateRadio("Um  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Um", "NotFound"), 4, 213, 70)
$r32 = GUICtrlCreateRadio("Vex  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Vex", "NotFound"),74, 213, 70)
$r33 = GUICtrlCreateRadio("Zod  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Zod", "NotFound"), 144, 213, 53)
GUICtrlCreateGroup("", -99, -99, 1, 1);close group

GUISetState()

SplashTextOn("Assistant","Ready to Go!",@DesktopWidth - 227,100,221,0)
WinActivate("Diablo II")
winmove("Diablo II","",221,104,806,636 )
$msg = GUIGetMsg()
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
         Select
             
              Case $msg = $r1
         moverune()

         EndSelect
WEnd


Exit

Func moverune()
msgbox(0,"test","why the hell am i executing?")
endfunc

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

  • Moderators
Posted (edited)

#include <GuiConstants.au3>
GUICreate("Controls", 217, @DesktopHeight/2, 500, 0)
GUICtrlCreateGroup("Runes / Amounts", 2, 0, 213, 235)
$r1 = GUICtrlCreateRadio("Amn  ", 4, 13, 68)
$r2 = GUICtrlCreateRadio("Ber  ", 74, 13, 68)
$r3 = GUICtrlCreateRadio("Ahm  ", 144, 13, 68)
GUICtrlCreateGroup("", -99, -99, 1, 1);close group
GUISetState()
ConsoleWrite('@@ Debug(60) : $r1 = ' & GUICtrlRead($r1) & @lf & '>Error code: ' & @error & @lf);### Debug Console
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
    If GUICtrlRead($r1) = 1 Then ConsoleWrite('@@ Debug(57) : $msg = ' & GUICtrlRead($r1) & @lf & '>Error code: ' & @error & @lf);### Debug Console
    If GUICtrlRead($r2) = 1 Then ConsoleWrite('@@ Debug(58) : $msg = ' & GUICtrlRead($r2) & @lf & '>Error code: ' & @error & @lf);### Debug Console
    If GUICtrlRead($r3) = 1 Then ConsoleWrite('@@ Debug(59) : $msg = ' & GUICtrlRead($r3) & @lf & '>Error code: ' & @error & @lf);### Debug Console
WEnd

Edit:

I must be missing the point here... what is $msg = $r1 supposed to return???

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.

  • Developers
Posted

I don't see a bug at all.

Don't you think it is strange that in BETA the first GUIGetMsg() returns a 4 as if the First radio control is clicked and with 3.1.1 the first GUIGetMsg() returns a 0 ?

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

  • Moderators
Posted

Don't you think it is strange that in BETA the first GUIGetMsg() returns a 4 as if the First radio control is clicked and with 3.1.1 the first GUIGetMsg() returns a 0 ?

Well the 4 is the control ID, I would say if there were a bug it would be in the 3.1.1 wouldn't you? I mean if 3.1.1 is returning 0 that is.

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.

  • Developers
Posted

Well the 4 is the control ID, I would say if there were a bug it would be in the 3.1.1 wouldn't you? I mean if 3.1.1 is returning 0 that is.

Don't understand that logic.

I only want it to return a 4 when the Radio is actually clicked.

I don't see any reason why the first GUIGetMsg() should return a 4 without it being clicked.

So my vote at this moment goes to the BETA being wrong.

:P

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

  • Moderators
Posted

Don't understand that logic.

I only want it to return a 4 when the Radio is actually clicked.

I don't see any reason why the first GUIGetMsg() should return a 4 without it being clicked.

So my vote at this moment goes to the BETA being wrong.

:lmao:

Return Value

Success: Returns the identifier (controlID) of the new control.

Then if you want it to return a 4 when 'not' (is what i thing you mean) checked you need to use GUICtrlRead($r1), I used your debug above to show everyone what I meant. I could confuse a table :P

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.

Posted

Don't you think it is strange that in BETA the first GUIGetMsg() returns a 4 as if the First radio control is clicked and with 3.1.1 the first GUIGetMsg() returns a 0 ?

it doesn't if you assign the GUICreate()...

because THIS works in either beta or stable just like the last code that i posted. and this time i left the $msg = 0 and just added the $gui = to the GuiCreate(). I don't think this is a bug, but if it is, it's one that's easily avoidable with consistent coding practices.

#include <GuiConstants.au3>
$gui = GUICreate("Controls", 217,@DesktopHeight,0,0)

GUICtrlCreateGroup("Runes / Amounts", 2, 0, 213, 235)
$r1 = GUICtrlCreateRadio("Amn  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Amn", "NotFound"), 4, 13, 68)
$r2 = GUICtrlCreateRadio("Ber  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ber", "NotFound"), 74, 13, 68)
$r3 = GUICtrlCreateRadio("Cham  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Cham", "NotFound"), 144, 13, 68)

$r4 = GUICtrlCreateRadio("Dol  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Dol", "NotFound"), 4, 33, 70)
$r5 = GUICtrlCreateRadio("El  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "El", "NotFound"), 74, 33, 70)
$r6 = GUICtrlCreateRadio("Eld  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Eld", "NotFound"), 144, 33, 70)

$r7 = GUICtrlCreateRadio("Eth  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Eth", "NotFound"), 4, 53, 70)
$r8 = GUICtrlCreateRadio("Fal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Fal", "NotFound"), 74, 53, 70)
$r9 = GUICtrlCreateRadio("Gul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Gul", "NotFound"), 144, 53, 70)

$r10 = GUICtrlCreateRadio("Hel  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Hel", "NotFound"), 4, 73, 70)
$r11 = GUICtrlCreateRadio("Io  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Io", "NotFound"), 74, 73, 70)
$r12 = GUICtrlCreateRadio("Ist  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ist", "NotFound"), 144, 73, 70)

$r13 = GUICtrlCreateRadio("Ith  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ith", "NotFound"), 4, 93, 70)
$r14 = GUICtrlCreateRadio("Jah  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Jah", "NotFound"), 74, 93, 70)
$r15 = GUICtrlCreateRadio("Ko  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ko", "NotFound"), 144, 93, 70)

$r16 = GUICtrlCreateRadio("Lem  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lem", "NotFound"), 4, 113, 70)
$r17 = GUICtrlCreateRadio("Lo  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lo", "NotFound"), 74, 113, 70)
$r18 = GUICtrlCreateRadio("Lum  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lum", "NotFound"), 144,113, 70)

$r19 = GUICtrlCreateRadio("Mal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Mal", "NotFound"), 4, 133, 70)
$r20 = GUICtrlCreateRadio("Nef  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Nef", "NotFound"), 74, 133, 70)
$r21 = GUICtrlCreateRadio("Ohm  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ohm", "NotFound"), 144, 133, 70)

$r22 = GUICtrlCreateRadio("Ort  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ort", "NotFound"), 4, 153, 70)
$r23 = GUICtrlCreateRadio("Pul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Pul", "NotFound"), 74, 153, 70)
$r24 = GUICtrlCreateRadio("Ral  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ral", "NotFound"), 144, 153, 70)

$r25 = GUICtrlCreateRadio("Shael  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Shael", "NotFound"), 4, 173, 70)
$r26 = GUICtrlCreateRadio("Sol  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Sol", "NotFound"), 74, 173, 70)
$r27 = GUICtrlCreateRadio("Sur  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Sur", "NotFound"), 144, 173, 70)

$r28 = GUICtrlCreateRadio("Tal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Tal", "NotFound"), 4, 193, 70)
$r29 = GUICtrlCreateRadio("Tir  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Tir", "NotFound"), 74, 193, 70)
$r30 = GUICtrlCreateRadio("Thul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Thul", "NotFound"), 144, 193, 70)

$r31 = GUICtrlCreateRadio("Um  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Um", "NotFound"), 4, 213, 70)
$r32 = GUICtrlCreateRadio("Vex  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Vex", "NotFound"),74, 213, 70)
$r33 = GUICtrlCreateRadio("Zod  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Zod", "NotFound"), 144, 213, 53)
GUICtrlCreateGroup("", -99, -99, 1, 1);close group

GUISetState()

SplashTextOn("Assistant","Ready to Go!",@DesktopWidth - 227,100,221,0)
WinActivate("Diablo II")
winmove("Diablo II","",221,104,806,636 )
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
         Select
             
              Case $msg = $r1
         moverune()

         EndSelect
WEnd


Exit

Func moverune()
msgbox(0,"test","why the hell am i executing?")
endfunc
  • Developers
Posted

Then if you want it to return a 4 when 'not' (is what i thing you mean) checked you need to use GUICtrlRead($r1), I used your debug above to show everyone what I meant. I could confuse a table :P

@SmOke_N, You are really missing the issue I am trying to explain.

We are not reading the state of the control but are asking the GUI which control has any messages in the message QUEUE.

Run this script in both Beta and Production. It will return a 4 in Beta without you having done anything.

#include <GuiConstants.au3>
GUICreate("Controls", 217, @DesktopHeight, 500, 0)
GUICtrlCreateGroup("Runes / Amounts", 2, 0, 213, 235)
$r1 = GUICtrlCreateRadio("Amn  ", 4, 13, 68)
$r2 = GUICtrlCreateRadio("Ber  ", 74, 13, 68)
GUICtrlCreateGroup("", -99, -99, 1, 1);close group
GUISetState()
$msg = GUIGetMsg()
ConsoleWrite('@@ Debug(57) : $msg = ' & $msg & @lf & '>Error code: ' & @error & @lf);### Debug Console

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

Posted

I must be missing the point here... what is $msg = $r1 supposed to return???

it triggers whatever case statement i have

case $msg = $r1

;hey! someone clicked the first radio!

and i dont know about you guys.... but with my version one script behaves oddly and the second does not

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

  • Developers
Posted

it doesn't if you assign the GUICreate()...

because THIS works in either beta or stable just like the last code that i posted. and this time i left the $msg = 0 and just added the $gui = to the GuiCreate(). I don't think this is a bug, but if it is, it's one that's easily avoidable with consistent coding practices.

This script also goes wrong with 3.1.1.98..

:P

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

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
  • Recently Browsing   0 members

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