cooles Board habt ihr hier. Jetzt muss ich auch mal eine Frage stellen, für die ich als Noob bisher keine Antwort gefunden habe. Ich hoffe jemand kann helfen.
Ich habe eine GUI mit mehreren Unter-GUIs erstellt.
In diesen Unter-GUIs habe ich Edit-Felder, deren Variablen-Inhalte ich im späteren Verlauf des Skripts weiter verwenden möchte.
Das versuche ich, in dem ich mit gPaste1, 2 und 3 die variablen Werte auf den Unter-GUIs anhand ihrer HWNDs auszulesen.
Allerdings lese ich anscheinend falsche Werte aus.
Code: Select all
#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
Gui, 4: Show, w245 h310, MLT Copy
Gui, 4: Font, s30 Bold q5 c0xE5007D, Calibri
Gui, 4: Add, Text, x38 y-2 w169 h61 +0x200, MLT Copy
Gui, 4: Font
Gui, 4: Add, Button, gMLT1 x64 y80 w168 h45, 1G MLT
Gui, 4: Add, Button, gMLT2 x64 y136 w168 h45, 10G MLT
Gui, 4: Add, Button, gMLT3 x64 y192 w168 h45, 100G MLT
Return
MLT1:
Gui, 4: hide
Gui, 11: Show, w245 h310, MLT Copy
Gui, 11: Font, s30 Bold q5 c0xE5007D, Calibri
Gui, 11: Add, Text, x38 y-8 w169 h61 +0x200, MLT Copy
Gui, 11: Font
Gui, 11: Font, S18, Calibri
Gui, 11: Add, Edit, hWndEdit11 vVPSZ1 x64 y80 w168 h45
Gui, 11: Font, s12, Bold, Calibri
Gui, 11: Add, Button, gPaste1 x64 y192 w168 h45, Einfügen
Gui, 11: Add, Button, gBack1 x64 y248 w168 h45, Zurück
Gui, 11: Font
Return
MLT2:
Gui, 4: hide
Gui, 2: Show, w245 h310, MLT Copy
Gui, 2: Font, s30 Bold q5 c0xE5007D, Calibri
Gui, 2: Add, Text, x38 y-8 w169 h61 +0x200, MLT Copy
Gui, 2: Font
Gui, 2: Font, S18, Calibri
Gui, 2: Add, Edit, hWndEdit21 vVPSZ2 x64 y80 w168 h45
Gui, 2: Font, s12, Bold, Calibri
Gui, 2: Add, Button, gPaste2 x64 y192 w168 h45, Einfügen
Gui, 2: Add, Button, gBack2 x64 y248 w168 h45, Zurück
Gui, 2: Font, s12, Bold, Calibri
Return
MLT3:
Gui, 4: hide
Gui, 3: Show, w245 h310, MLT Copy
Gui, 3: Font, s30 Bold q5 c0xE5007D, Calibri
Gui, 3: Add, Text, x38 y-8 w169 h61 +0x200, MLT Copy
Gui, 3: Font
Gui, 3: Font, S18, Calibri
Gui, 3: Add, Edit, hWndEdit31 vVPSZ3 x64 y80 w168 h45
Gui, 3: Font, s12, Bold, Calibri
Gui, 3: Add, Button, gPaste3 x64 y192 w168 h45, Einfügen
Gui, 3: Add, Button, gBack3 x64 y248 w168 h45, Zurück
Gui, 3: Font
Return
Back1:
Gui, 11: destroy
Gui, 4: show
Return
Back2:
Gui, 2: destroy
Gui, 4: show
Return
Back3:
Gui, 3: destroy
Gui, 4: show
Return
Paste1:
GuiControlGet, Gui, 11: %Edit11%
MsgBox 0x42040, Ergebnis, Es wurde %Edit11% eingegeben.
Return
Paste2:
GuiControlGet, Gui, 2: %Edit21%
MsgBox 0x42040, Ergebnis, Es wurde %Edit21% eingegeben.
Return
Paste3:
GuiControlGet, Gui, 3: %Edit31%
MsgBox 0x42040, Ergebnis, Es wurde %Edit31% eingegeben.
Return
GuiEscape:
11GuiClose:
2GuiClose:
3GuiClose:
4GuiClose:
Gui +OwnDialogs
MsgBox 0x24, Programm beenden, Wirklich beenden?
IfMsgBox Yes, {
ExitApp
} Else IfMsgBox No, {
Return
}