Post by Qysh » 29 May 2018, 16:59
Vielleicht kann dir das weiter helfen
Code: Select all
msg_seconds := 5
Gui, Add, Text, x2 y59 w60 h20 , Timerlänge :
Gui, Add, Edit, x72 y59 w110 h20 vzeit,
Gui, Add, Button, x2 y89 w180 h20 gstart, Start
Gui, Font, s32
Gui, Add, Edit, x2 y2 w180 h50 vdisplay ReadOnly, Seconds
Gui, Show, w189 h115, ichdotcom
return
start:
Gui, submit, nohide
timeArray := StrSplit(zeit, ":")
second := timeArray[3]
minute := timeArray[2]
hour := timeArray[1]
end_time := second + (minute * 60) + ((hour * 60) * 60)
current_time := 0
SetTimer, timer, 1000
return
timer:
calc := end_time - current_time
GuiControl,, display, %calc%
if(calc == msg_seconds)
{
MsgBox, %msg_seconds% Sekunden bis zum Ende
}
else if(calc <= 0)
{
SoundBeep, 400, 1000
SetTimer, timer, Off
return
}
current_time += 1
return
GuiClose:
ExitApp
Vielleicht kann dir das weiter helfen ;)
[img]https://i.imgur.com/tdg08aP.png[/img]
[code]msg_seconds := 5
Gui, Add, Text, x2 y59 w60 h20 , Timerlänge :
Gui, Add, Edit, x72 y59 w110 h20 vzeit,
Gui, Add, Button, x2 y89 w180 h20 gstart, Start
Gui, Font, s32
Gui, Add, Edit, x2 y2 w180 h50 vdisplay ReadOnly, Seconds
Gui, Show, w189 h115, ichdotcom
return
start:
Gui, submit, nohide
timeArray := StrSplit(zeit, ":")
second := timeArray[3]
minute := timeArray[2]
hour := timeArray[1]
end_time := second + (minute * 60) + ((hour * 60) * 60)
current_time := 0
SetTimer, timer, 1000
return
timer:
calc := end_time - current_time
GuiControl,, display, %calc%
if(calc == msg_seconds)
{
MsgBox, %msg_seconds% Sekunden bis zum Ende
}
else if(calc <= 0)
{
SoundBeep, 400, 1000
SetTimer, timer, Off
return
}
current_time += 1
return
GuiClose:
ExitApp[/code]