Gui, Submit problem

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jsmain
Posts: 62
Joined: 07 Feb 2014, 08:21

Gui, Submit problem

20 Sep 2016, 11:28

Never had issue with this before, but it's been a while since I used it. I'm not sure if its broken (Bug) or my code.

I have this example, and it doesn't work as expected. It will not update the IP variable after being changed.
I am running version 1.1.24.01 AHK.

Code: Select all

#SingleInstance, Force
	Global	IP := "127.0.0.1"
	Gosub Config
Return

Config:
	Gui, +ToolWindow
	Gui, Add, Text, y10 w60 h20 +Right, IP Address:
	Gui, Add, Edit, xp+70 yp-3 w110 h20, %IP%
	Gui, Add, Button, x10 y70 w85 h25 gNetworkCancel, Cancel
	Gui, Add, Button, x105 y70 w85 h25 gNetworkAccept, Accept
	Gui, Show, ,vMix Network Info...
Return

NetworkAccept:	;*Data Validation*******************************************
	Gui,  Submit,nohide
	msgbox Network Write %IP%
Return

NetworkCancel:
	Gui, Cancel
Return
garry
Posts: 3788
Joined: 22 Dec 2013, 12:50

Re: Gui, Submit problem

20 Sep 2016, 11:35

see variable in Edit vIP1

Code: Select all

;-------- https://autohotkey.com/boards/viewtopic.php?f=5&t=23522 ---
#SingleInstance, Force
	Global	IP := "127.0.0.1"
	Gosub Config
Return
Config:
	Gui, +ToolWindow
	Gui, Add, Text, y10 w60 h20 +Right, IP Address:
	Gui, Add, Edit, xp+70 yp-3 w110 h20 vIP1, %IP%
	Gui, Add, Button, x10 y70 w85 h25 gNetworkCancel, Cancel
	Gui, Add, Button, x105 y70 w85 h25 gNetworkAccept, Accept
	Gui, Show, ,vMix Network Info...
Return
NetworkAccept:	;*Data Validation*******************************************
	Gui,  Submit,nohide
	msgbox Network Write %IP1%
Return
NetworkCancel:
	Gui, Cancel
Return
jsmain
Posts: 62
Joined: 07 Feb 2014, 08:21

Re: Gui, Submit problem

20 Sep 2016, 12:00

Thanks for that!
A Duh moment I guess!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doanmvu and 151 guests