What I have so far:
Code: Select all
Gui, Add, Edit
Gui, Add, UpDown, vNumOfConditions Range1-4, 1
Gui, Add, Button, Default w80, OK
Gui, Show
Thanks!
Code: Select all
Gui, Add, Edit
Gui, Add, UpDown, vNumOfConditions Range1-4, 1
Gui, Add, Button, Default w80, OK
Gui, Show
Code: Select all
Gui, Add, Edit
Gui, Add, UpDown, vNumOfConditions Range1-4, 1
Gui, Add, Button, Default w80, OK
Gui, Add, Button, x+m w80, Cancel
Gui, Show
Return
ButtonOK:
Gui, Submit
Msgbox % NumOfConditions
ButtonCancel:
ExitApp
Code: Select all
Gui, Add, Edit, vEd1
Gui, Add, UpDown, vNumOfConditions Range1-4, 1
Gui, Add, Button, Default w80 gA1, OK
Gui, Show
return
Guiclose:
exitapp
A1:
Gui,submit,nohide
msgbox,%NumOfConditions%
Guicontrol,1:,ed1,1 ;- set to 1
return
Code: Select all
Display GUI 1 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Display GUI 2 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Begin Loop
Do some stuff
Display GUI 3 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Display GUI 4 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Display GUI 5 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Do some more stuff
End Loop
Code: Select all
;GUI TO ASK THE NUMBER OF RULES WE NEED TO LOOP THROUGH.
Gui, Num_of_Rules: New, -Resize -MaximizeBox -MinimizeBox -Border ;NEW GUI THAT PREVENTS RESIZING, REMOVES THE MAXIMIZE AND MINIMIZE BUTTONS, AND REMOVES THE WINDOWS FRAME
Gui, Num_of_Rules: Margin, 5, 5 ;PLACES A MARGIN AROUND ALL THE CONTROLS OF 5 PIXELS.
Gui, Num_of_Rules: Font, S12 CDefault Bold, Arial ;CHANGES THE FONT ON THE GUI TO ARIAL SIZE 12 BOLD UNTIL CHANGED.
Gui, Num_of_Rules: Add, Text,, How many rules do you want to import? ;ADDS THE MAIN TEXT OF THE GUI.
Gui, Num_of_Rules: Add, Edit, vNumOfRules ;BUDDY CONTROL FOR THE FOLLOWING UPDOWN CONTROL.
Gui, Num_of_Rules: Add, UpDown, Range1-2500, 1 ;UPDOWN CONTROL WITH A RANGE OF 1 TO 2500 AND A DEFAULT VALUE OF 1.
NumOfRules_TT := "Use your arrow keys on your keyboard to scroll much faster or key in your answer."
Gui, Num_of_Rules: Add, Button, Default w80 gNORButtonOK, OK ;OK BUTTON THAT IS THE DEFAULT BUTTON. CALLS NORBUTTONOK SUBROUTINE WHEN PRESSED.
Gui, Num_of_Rules: Add, Button, x+m w80 gNORButtonCancel, Cancel ;CANCEL BUTTON THAT CALLS THE NORBUTTONCANCEL SUBROUTINE WHEN PRESSED.
Gui, Num_of_Rules: Show, x1429 y515, Number of Rules ;SHOWS THE GUI, SETS ITS X AND Y COORDINATES, AND TITLES THE WINDOW.
OnMessage(0x200, "WM_MOUSEMOVE")
Return
NORButtonCancel: ;IF USER PRESSES CANCEL, EXIT THE APP.
ExitApp
Return
NORButtonOK: ;IF USER PRESSENT OK, SAVE THE VALUE AND MOVE ON TO THE NEXT QUESTION.
Gui, Num_of_Rules: Submit
Code: Select all
Set Completed to false
Display GUI 1 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Wait until Completed = True
Set Completed to false
Display GUI 2 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Wait until Completed = True
Begin Loop
{
Do some stuff
Set Completed to false
Display GUI 3 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Wait until Completed = True
Set Completed to false
Display GUI 4 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Wait until Completed = True
Set Completed to false
Display GUI 5 to ask a question requiring a numeric answer. Cancel button exits the app. OK button continues and submits the GUI.
Wait until Completed = True
Do some more stuff
}
End Loop
CancelButtonLabel: (shared by all GUIs)
Exit the app
OKButtonLabel: (shared by all GUIs)
Submit the GUI (the default GUI for this label is the GUI containing the button)
Set Completed to true.
Return from this label
Users browsing this forum: No registered users and 169 guests