- Elkha - Blue
- 매크로
- 오토핫키 커뮤니티
if문을 딱한번만 실행시킬수없나요?
-
-
http://www.autohotkey.com/board/topic/80024-help-with-stopwatch-script/
stopwatch script 입니다. 시간을 감소 말고 증가시키면 원하시는게 될거 같네요. 참고하세요
-
왜이렇게 다들 어렵게 쓰셧는지..?
startTime = %A_Tickcount%
delayTime(sTime)
{
nowTime = %A_Tickcount%
dTime := floor((nowTime-sTime)/1000)
day := floor(dTime/86400)
dTime := mod(dTime,86400)
hour := floor(dTime/3600)
dTime := mod(dTime,3600)
minute := floor(dTime/60)
second := mod(dTime,60)
if day>0
{
text = %day%일
}
if hour>0
{
text = %text%%hour%시
}
if minute>0
{
text = %text%%minute%분
}
text = %text%%second%초
return text
}
F2::
text := delayTime(startTime)
msgbox, %text%
return
이런식으로해서 timer롤 통해 delayTime을 불러 오면 될듯 한데 ..?
-
http://www.autohotkey.com/board/topic/51990-convert-seconds-to-years-months-days-hours-minutes-seconds
MsgBox % FormatSeconds(7384) ; 7384 = 2 hours + 3 minutes + 4 seconds. It yields: 2:03:04 FormatSeconds(NumberOfSeconds) ; Convert the specified number of seconds to hh:mm:ss format. { time = 19990101 ; *Midnight* of an arbitrary date. time += %NumberOfSeconds%, seconds FormatTime, mmss, %time%, mm:ss return NumberOfSeconds//3600 ":" mmss ; This method is used to support more than 24 hours worth of sections. }
시간경과를 하시는거 같은데
큰거부터 if로 해결하세요
먼저 날짜 시간 분 초
시간경과:
if(day>0)
{
? 일 시간 분 초
}
else?f(hour>0)
{
?시간 분 초
}
else if(minute>0)
{
?분 초
}
else if(second>0)
{
?초
}
second++
if(second=60)
{
??second=0
? minute++? if(minute=60)
? {
? ??minute=0
? ??hour++
? ? if(hour=24)
? ?{
? ? ?hour=0
? ? ?day++
? ?}
? }
}
?