So I'm in a conundrum, I need to have a Gui window with a couple input fields come up, store both inputs as variables, and when OK is pressed, come up with a confirmation dialog with the variables in the text. But I'm stuck in two places.
Firstly, if I put all of the "GUI, Add" lines in the auto execute section, as I understand is the proper way to do it, I can't figure out how to fill the variables. Here's what I have:
Code: Select all
;GUI Box Playground. Gui, Add, Text,, Vendor ID: Gui, Add, Text,, Manufacturer: Gui, Add, Edit, ym vVendor Gui, Add, Edit, vMan Gui, Add, Button, Default, OK Gui, 2:Add, Text,, Vendor:"%Vendor%".`n Manufacturer:"%Man%" `n`n Is this Correct? Gui, 2:Add, Button, Default gYes, Yes Gui, 2:Add, Button,gNo,No ;Begin Script #k:: Gui, Show,, Input Variables. ;The First window Return ButtonOK: ;Submit data, and show the second window Gui, Submit Gui, 2:Show,,Confirm Entry. Return ;Subroutine for a yes Yes: WinClose Msgbox Yea! "%Vendor%" "%Man%" Return ;Subroutine for a no. No: WinClose Msgbox stincky! Return Return