GUI with Functions

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ASp
Posts: 2
Joined: 14 May 2021, 14:06

GUI with Functions

14 May 2021, 14:12

Hi There,

I´m in trouble with the following Code:

Code: Select all

Gui, Garmin:New
Gui, Font, s14, Verdana
Gui, Add, Button, x15 y10 w500, GPX und Listen löschen
Gui, Add, Button, x15 y55 w500, alle GPX auf Garmin verschieben
Gui, Add, Button, x15 y100 w500, aktuellen Track vom Garmin sichern
Gui, Add, Progress, x15 h20 w500 cBlue vMyProgress, 100
Gui, Add, Text, x15 y185, Status:
Gui, Font, s10, Verdana
Gui, Add, Edit, x90 y185 w425 r1 vMyEdit ,
Gui, Add, Button,, Test
Gui, Show,, Garmin

SetTimer, GarminConnected, 200
return

ButtonTest:
	msgbox Test
return

GarminConnected:
	Gui, Garmin:Default
	If FileExist("G:\") {
		GuiControl,, MyEdit, Garmin ist verbunden
	} else {
		GuiControl,, MyEdit, Garmin ist nicht verbunden, bitte warten...
	}
return
Without the first line of code the GuiControls within GarminConnected do not work but the ButtonTest works. With this first line it´s vice versa. How can I get both to work?
Looking forward for your answers

Regards
Andreas
User avatar
boiler
Posts: 17047
Joined: 21 Dec 2014, 02:44

Re: GUI with Functions

14 May 2021, 14:40

Code: Select all

GarminButtonTest:
	msgbox Test
return
Button documentation wrote:For GUI windows other than the first, the window number is included in front of the button's automatic label; for example: 2ButtonOK.
ASp
Posts: 2
Joined: 14 May 2021, 14:06

Re: GUI with Functions

14 May 2021, 14:42

Great, Thank you.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Joey5, Ralf_Reddings200244 and 312 guests