GUI - show, submit and recall
Posted: 18 Jun 2019, 08:34
I have a (maybe stupid) mistake in my code-structure. The simple idea is
- show a GUI-dialogue
- press a button
- GUI disappears, something is done
- GUI should be displayed again
-->> And here I get the message that a variable cannot be defined twice ...
What's wrong? Here is the structure of the code
- show a GUI-dialogue
- press a button
- GUI disappears, something is done
- GUI should be displayed again
-->> And here I get the message that a variable cannot be defined twice ...
What's wrong? Here is the structure of the code
Code: Select all
#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
Gosub, Fensteraufbau
return ; Ende Hauptprogramm
;; *************************************
Fensteraufbau:
Gui Add, Text, x200 y20 w120 h23 +Disabled +0x200, Wasser
....
Gui Add, Button, x30 y450 w100 h23 gStarten, &Starten
Gui Add, Button, x150 y450 w100 h23 gLogzeigen, &Log anzeigen
Gui Add, Button, x270 y450 w100 h23 gBeenden, &Beenden
Gui, Color, EBF4FA
Gui Show, w430 h500, 1-Klick
Return
;; *************************************
Logzeigen:
Run, %A_ScriptDir%\Gesamtlog.log
return
;; *************************************
Starten:
...
Gui,Submit
If gawa=1
{
Gosub, Wartungslauf
}
Gosub, Fensteraufbau
return
;; *************************************
Wartungslauf:
....do something
return
;; *************************************
GuiEscape:
GuiClose:
Beenden:
ExitApp
return