Hi guys
Im still having issues with the radio buttons, the above code (which was a good insight on how gLabels and radios work) didnt work for my script.
So Ive cut this code out of my script and posted here.
the issue im getting is it misses out %Time2% and just carries on into code straight after the message box?
Am I missing a command to return it back to the code?
I also know it is incomplete code, thought if I got the sleep, %Time2% sorted out i would carry on coding.
Code:
Time1 = 10
Time2 = 12
Time3 = 14
Time4 = 16
Time5 = 18
Time6 = 20
Time7 = 22
Time8 = 24
Time9 = 26
Time1 := Time1 * 1000
Time2 := Time2 * 1000
Time3 := Time3 * 1000
Time4 := Time4 * 1000
Time5 := Time5 * 1000
Time6 := Time6 * 1000
Time7 := Time7 * 1000
Time8 := Time8 * 1000
Time9 := Time9 * 1000
Gui, Add, Edit, x22 y20 w50 h20 R1 vTime1, seconds
Gui, Add, Radio, x22 y40 w50 h20 vCH1PRO1, Pro 1
Gui, Add, Radio, x22 y60 w50 h20 vCH1PRO2, Pro 2
Gui, Add, Radio, x22 y80 w50 h20 vCH1PRO3, Pro 3
Gui, Add, Radio, x22 y100 w50 h20 vCH1PRO4, Pro 4
Gui, Add, Edit, x82 y20 w50 h20 R1 vTime2, seconds
Gui, Add, Radio, x82 y40 w50 h20 vCH2PRO1, Pro 1
Gui, Add, Radio, x82 y60 w50 h20 vCH2PRO2, Pro 2
Gui, Add, Radio, x82 y80 w50 h20 vCH2PRO3, Pro 3
Gui, Add, Radio, x82 y100 w50 h20 vCH2PRO4, Pro 4
Gui, Add, Edit, x142 y20 w50 h20 R1 vTime3, seconds
Gui, Add, Radio, x142 y40 w50 h20 vCH3PRO1, Pro 1
Gui, Add, Radio, x142 y60 w50 h20 vCH3PRO2, Pro 2
Gui, Add, Radio, x142 y80 w50 h20 vCH3PRO3, Pro 3
Gui, Add, Radio, x142 y100 w50 h20 vCH3PRO4, Pro 4
Gui, Add, Edit, x202 y20 w50 h20 R1 vTime4, seconds
Gui, Add, Radio, x202 y40 w50 h20 vCH4PRO1, Pro 1
Gui, Add, Radio, x202 y60 w50 h20 vCH4PRO2, Pro 2
Gui, Add, Radio, x202 y80 w50 h20 vCH4PRO3, Pro 3
Gui, Add, Radio, x202 y100 w50 h20 vCH4PRO4, Pro 4
Gui, Add, Edit, x262 y20 w50 h20 R1 vTime5, seconds
Gui, Add, Radio, x262 y40 w50 h20 vCH5PRO1, Pro 1
Gui, Add, Radio, x262 y60 w50 h20 vCH5PRO2, Pro 2
Gui, Add, Radio, x262 y80 w50 h20 vCH5PRO3, Pro 3
Gui, Add, Radio, x262 y100 w50 h20 vCH5PRO4, Pro 4
Gui, Add, Edit, x322 y20 w50 h20 R1 vTime6, seconds
Gui, Add, Radio, x322 y40 w50 h20 vCH6PRO1, Pro 1
Gui, Add, Radio, x322 y60 w50 h20 vCH6PRO2, Pro 2
Gui, Add, Radio, x322 y80 w50 h20 vCH6PRO3, Pro 3
Gui, Add, Radio, x322 y100 w50 h20 vCH6PRO4, Pro 4
Gui, Add, Edit, x382 y20 w50 h20 R1 vTime7, seconds
Gui, Add, Radio, x382 y40 w50 h20 vCH7PRO1, Pro 1
Gui, Add, Radio, x382 y60 w50 h20 vCH7PRO2, Pro 2
Gui, Add, Radio, x382 y80 w50 h20 vCH7PRO3, Pro 3
Gui, Add, Radio, x382 y100 w50 h20 vCH7PRO4, Pro 4
Gui, Add, Edit, x442 y20 w50 h20 R1 vTime8, seconds
Gui, Add, Radio, x442 y40 w50 h20 vCH8PRO1, Pro 1
Gui, Add, Radio, x442 y60 w50 h20 vCH8PRO2, Pro 2
Gui, Add, Radio, x442 y80 w50 h20 vCH8PRO3, Pro 3
Gui, Add, Radio, x442 y100 w50 h20 vCH8PRO4, Pro 4
Gui, Add, Edit, x502 y20 w50 h20 R1 vTime9, seconds
Gui, Add, Radio, x502 y40 w50 h20 vCH9PRO1, Pro 1
Gui, Add, Radio, x502 y60 w50 h20 vCH9PRO2, Pro 2
Gui, Add, Radio, x502 y80 w50 h20 vCH9PRO3, Pro 3
Gui, Add, Radio, x502 y100 w50 h20 vCH9PRO4, Pro 4
Gui, Add, Text, x22 y130 w530 h20 ,
>------>------>------>------>------>------>------>------> TIME LINE >------>------>------>------>------>------>------>------>
Gui, Add, Button, x122 y160 w100 h20 , Exit
Gui, Add, Button, x342 y160 w100 h20 gStart, Start Test
Gui, Show, w582 h195, Untitled GUI
return
Start:
Sleep, %Time1%
Gui Submit, NoHide
If (CH1PRO1==1)
{
MsgBox Radio 1 was selected after %Time1% seconds
}Else if (CH1PRO2==1)
{
MsgBox Radio 2 was selected after %Time1% seconds
}Else if (CH1PRO3==1)
{
MsgBox Radio 3 was selected after %Time1% seconds
}Else if (CH1PRO4==1)
{
MsgBox Radio 4 was selected after %Time1% seconds
}
Sleep, %Time2%
Gui Submit, NoHide
If (CH2PRO1==1)
{
MsgBox Radio 1 was selected after %Time2% seconds
}Else if (CH2PRO2==1)
{
MsgBox Radio 2 was selected after %Time2% seconds
}Else if (CH2PRO3==1)
{
MsgBox Radio 3 was selected after %Time2% seconds
}Else if (CH2PRO4==1)
{
MsgBox Radio 4 was selected after %Time2% seconds
}
return
ButtonExit:
ExitApp
GuiClose:
ExitApp
Thanks again guys in advance.