Timer that counts up when pressing hotkey?

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Timer that counts up when pressing hotkey?

Re: Timer that counts up when pressing hotkey?

by Xtra » 25 Jun 2018, 03:12

Code: Select all

#NoEnv

0::FileAppend, % RunTimer() "`n", Logger.txt    ; Press 0 to log time

RunTimer() {
    static s := A_TickCount
    VarSetCapacity(t,256),DllCall("GetDurationFormat","uint",2048,"uint",0,"ptr",0,"int64",(A_TickCount-s)*10000,"wstr","h':'mm':'ss","wstr",t,"int",256)
    return t
}
HTH

Re: Timer that counts up when pressing hotkey?

by Rohwedder » 25 Jun 2018, 02:13

Hallo,
try:

Code: Select all

q::
Gosub Logger ;write this line into each hotkey
Return

Logger:
	FileAppend, %A_TickCount%`t%A_ThisHotkey%`n, Logger.txt
Return

Timer that counts up and keypress gives me passed time

by StijnTV » 24 Jun 2018, 15:36

So what i want to do is create a timer that counts up. Whenever i press a hotkey it will then write down the time in a notepad (not the time as in AM or PM but the time that has passed since running the script).

Example: I'm a streamer on Twitch playing video games and i also record the gameplay. Whenever i do something sick i want to press a hotkey that writes down the time that has passed since i started the script (for example 10 minutes into the stream). This would tell me after the stream where i have to look to find this highlight (because i would start the script at the same time as the recording). It's basically a marker like you put in a book but for in a video.

I hope this makes sense. Feel free to ask more questions if necesarry.

post merged with duplicate post!

Timer that counts up when pressing hotkey?

by StijnTV » 24 Jun 2018, 15:18

The idea I have in mind is making a timer that counts up and when pressing a key it makes a quick note of that specific time. I would be using this while streaming so I can find my highlights back very easily without having to look back through the full video.

I have been looking around for hours now but I'm getting nowhere close unfortunately as I have no idea where to start. Pointing me in the right direction would be highly appreciated.

Top