it run my if (statement)
for example
Code: Select all
if (Var = 1)
do somthing
if (var = 5)
...
Code: Select all
if (Var = 1)
do somthing
if (var = 5)
...
Code: Select all
Gui, Font, s10
Gui, Add, Edit, w230 vnum Number gGo
Gui, Show,, Number
Return
Go:
Gui, Submit
Switch num {
Case 0: MsgBox, 0
Case 1: MsgBox, 1
Case 2: MsgBox, 2
Case 3: MsgBox, 3
Case 4: MsgBox, 4
Case 5: MsgBox, 5
Case 6: MsgBox, 6
Case 7: MsgBox, 7
Case 8: MsgBox, 8
Case 9: MsgBox, 9
}
Return
oh thanks a lot but when i want to run again that i got this errormikeyww wrote: ↑16 Aug 2022, 18:30Code: Select all
Gui, Font, s10 Gui, Add, Edit, w230 vnum Number gGo Gui, Show,, Number Return Go: Gui, Submit Switch num { Case 0: MsgBox, 0 Case 1: MsgBox, 1 Case 2: MsgBox, 2 Case 3: MsgBox, 3 Case 4: MsgBox, 4 Case 5: MsgBox, 5 Case 6: MsgBox, 6 Case 7: MsgBox, 7 Case 8: MsgBox, 8 Case 9: MsgBox, 9 } Return
Code: Select all
--------------------------
Keyboard Assignments.ahk
---------------------------
The same variable cannot be used for more than one control.
Specifically: vnum Number gGo
Line#
364: Gui,Font,s10
---> 365: Gui,Add,Edit,w230 vnum Number gGo
366: Gui,Show,,Number
367: Return
369: Gui,Submit
370: Switch num
370: {
371: Case 0:
371: MsgBox,0
The current thread will exit.
---------------------------
OK
---------------------------
Code: Select all
Gui, Font, s10
Gui, Add, Edit, w230 vnum Number gGo
Gui, Show,, Number
Return
Go:
Gui, Submit
Gui, Destroy
Switch num {
Case 0: MsgBox, 0
Case 1: MsgBox, 1
Case 2: MsgBox, 2
Case 3: MsgBox, 3
Case 4: MsgBox, 4
Case 5: MsgBox, 5
Case 6: MsgBox, 6
Case 7: MsgBox, 7
Case 8: MsgBox, 8
Case 9: MsgBox, 9
}
Return
Thnks a lot bro It workedRohwedder wrote: ↑17 Aug 2022, 07:25Hallo,
try:Code: Select all
Gui, Font, s10 Gui, Add, Edit, w230 vnum Number gGo Gui, Show,, Number Return Go: Gui, Submit Gui, Destroy Switch num { Case 0: MsgBox, 0 Case 1: MsgBox, 1 Case 2: MsgBox, 2 Case 3: MsgBox, 3 Case 4: MsgBox, 4 Case 5: MsgBox, 5 Case 6: MsgBox, 6 Case 7: MsgBox, 7 Case 8: MsgBox, 8 Case 9: MsgBox, 9 } Return
but bro when i put in my function code and my scripts i got this errorRohwedder wrote: ↑17 Aug 2022, 07:25Hallo,
try:Code: Select all
Gui, Font, s10 Gui, Add, Edit, w230 vnum Number gGo Gui, Show,, Number Return Go: Gui, Submit Gui, Destroy Switch num { Case 0: MsgBox, 0 Case 1: MsgBox, 1 Case 2: MsgBox, 2 Case 3: MsgBox, 3 Case 4: MsgBox, 4 Case 5: MsgBox, 5 Case 6: MsgBox, 6 Case 7: MsgBox, 7 Case 8: MsgBox, 8 Case 9: MsgBox, 9 } Return
Code: Select all
---------------------------
Keyboard Assignments.ahk
---------------------------
Error in #include file "T:\AHK\Premier Functions.Ahk":
A "return" must be encountered prior to this "}".
Line#
418: Case 6:
418: Send,^6
419: Case 7:
419: Send,^7
420: }
467: Send,{Mbutton}
468: Send,^/
---> 469: }
471: if InStr(putType,"insertt")
472: {
473: Send,!{NumpadEnter}
474: Send,^+/
475: }
477: }
482: MouseMove,xPosCursor,yPosCursor,0
The current thread will exit.
---------------------------
OK
---------------------------