"default" not working as intended in my script.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
AutoAllTheKeys
Posts: 6
Joined: 02 Mar 2018, 14:33

"default" not working as intended in my script.

08 Mar 2018, 15:40

Hi everyone! I'm trying to make a small script piece that will open the proper data cell, enter some text, then open a gui letting the user specify the rest of the text. I have managed to get everything working except for the fact that I want the gui to submit and close when I press the enter key. I tried setting the button as default but that still doesn't work for me. What should I do? Code is below.

F23::
Send, {F3}
Send, {Down 4}
Send, Ind=
Gui, New,
Gui, Color, 4D6082
Gui, Add, Text,, Enter Independent Insulator Rotation
Gui, Add, Edit, vUserInputVariable
Gui, Add, Button, gOK, OK
Gui, Show,, Edit Rotation
Return

OK:
Gui, Submit
Send, %UserInputVariable%
Send, {Enter}
Return

Any time I set the button to default it highlights it but does nothing when I press the enter key. What am I missing?
Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: "default" not working as intended in my script.

08 Mar 2018, 15:57

Code: Select all

Gui, Add, Button, gOK Default, OK
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
AutoAllTheKeys
Posts: 6
Joined: 02 Mar 2018, 14:33

Re: "default" not working as intended in my script.

08 Mar 2018, 16:02

Wow that makes me feel really dumb. Guess I just wasn't putting it in the right spot. I really appreciate it! Thank you!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], RandomBoy and 256 guests