I am curious if anyone has developed a counter for time saved using hotstrings?
I have a ahk file that I run to save time typing repetitive phrases. Each time I use a hotstring such as "lol" for laugh out loud and it expands I would like the program to add 1.5 seconds to a counter showing how much time I saved using the hotstring.
Any ideas?
counter for hotstrings Topic is solved
Re: counter for hotstrings
I'd guess you're from the States being that much into statistics
Re: counter for hotstrings
Great guess haha
Re: counter for hotstrings Topic is solved
reviewing the statistics will eat up all the time he savedBoBo wrote:I'd guess you're from the States being that much into statistics
Re: counter for hotstrings
I have installed this on several computers at my work and would like to know average amounts of time saved/usage of the program per person.
I love the hard time you guys are giving me but would appreciate some real feedback or ideas to go about this using autohotkey.
Thank you
I love the hard time you guys are giving me but would appreciate some real feedback or ideas to go about this using autohotkey.
Thank you
Re: counter for hotstrings
try this, you can also send the data to a file this is just so you can demo, remember, when the script restarts the old data is lost unless you saved to filearochon wrote:I have installed this on several computers at my work and would like to know average amounts of time saved/usage of the program per person.
I love the hard time you guys are giving me but would appreciate some real feedback or ideas to go about this using autohotkey.
Thank you
Code: Select all
::lol::
SendInput, laugh out loud
timesaved += 1.5
msgbox, %timesaved%
return
Re: counter for hotstrings
GeneBene - thank you for the help this is perfect!
::lol::
sendinput, laugh out loud
timesaved += 1.5
return
::
sendinput, roll on floor laughing
timesaved += 2.3
return
F8::msgbox, %timesaved%
::lol::
sendinput, laugh out loud
timesaved += 1.5
return
::
sendinput, roll on floor laughing
timesaved += 2.3
return
F8::msgbox, %timesaved%
Re: counter for hotstrings
Now the next step is to apply an amount to all hotstrings then figure out a way to convert %timesaved% to display to a gui in format of hours, minutes, and seconds
Re: counter for hotstrings
Here's a way:
Code: Select all
:*:abcj-::
:*:abcm-::
:*:abcz-::
vHotkey := RegExReplace(A_ThisHotkey, "^:.*?:") ;remove first two colons and the text in-between
vHotkey := SubStr(vHotkey, 1, -1)
if !IsObject(oArray)
oArray := Object("abcj", "abcdefghij"
, "abcm", "abcdefghijklm"
, "abcz", "abcdefghijklmnopqrstuvwxyz"
, "", "")
vText := oArray[vHotkey]
vLen := StrLen(vText) - StrLen(vHotkey) - 1
;SendInput, % "{Raw}" vText
SendInput, % "{Text}" vText
MsgBox, % "you saved " vLen " key presses"
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: counter for hotstrings
this page has info on turning seconds into what you want https://www.autohotkey.com/docs/commands/FormatTime.htm see last example therearochon wrote:Now the next step is to apply an amount to all hotstrings then figure out a way to convert %timesaved% to display to a gui in format of hours, minutes, and seconds
Re: counter for hotstrings
The Format function can also be useful for displaying times, see: FORMAT FUNCTION EXAMPLES here:
jeeswg's characters tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=26486
jeeswg's characters tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=26486
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: counter for hotstrings
I added this as suggested but I am having issues with %timesaved% not being a whole number of seconds. For instance %timesaved%= 3.500000 which is not a valid input for (number of seconds)
Code: Select all
::lol::
sendinput, laugh out loud
timesaved += 1.5
return
::rofl::
sendinput, roll on floor laughing
timesaved += 2.3
return
; The following function converts the specified number of seconds into the corresponding
; number of hours, minutes, and seconds (hh:mm:ss format).
f8::MsgBox % FormatSeconds(%timesaved%) ; 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
/*
; Unlike the method used above, this would not support more than 24 hours worth of seconds:
FormatTime, hmmss, %time%, h:mm:ss
return hmmss
*/
}
Re: counter for hotstrings
::lol::
sendinput, laugh out loud
timesaved += 1.5
return
::
sendinput, roll on floor laughing
timesaved += 2.3
return
timesaved := Round(timesaved)
F8::MsgBox,% FormatSeconds(timesaved)
sendinput, laugh out loud
timesaved += 1.5
return
::
sendinput, roll on floor laughing
timesaved += 2.3
return
timesaved := Round(timesaved)
F8::MsgBox,% FormatSeconds(timesaved)
Last edited by arochon on 16 Apr 2018, 07:35, edited 1 time in total.
Re: counter for hotstrings
Found 1 issue with this method....
when using
First letter capitalization is not recognized. Typing rofl is the same as If you type Rofl = "roll on floor laughing" or ROfl = "roll on floor laughing". You have to Type ROFL to get = "ROLL ON FLOOR LAUGHING"
If using this format, which I would like to be able to do, you can command the first letter to be capital or not by typing "Rofl" vs "rofl"
Any ideas? Thanks in advance for any help. I would like to accomplish the counter idea without disrupting the capitilization features of the hotstring.
when using
Code: Select all
::rofl::
sendinput, roll on floor laughing
Code: Select all
::rofl::roll on floor laughing
Any ideas? Thanks in advance for any help. I would like to accomplish the counter idea without disrupting the capitilization features of the hotstring.
Re: counter for hotstrings
Is this what you looking for (options for hotstrings)?
Code: Select all
:C:rofl::roll on floor laughing
:C:Rofl::Roll On Floor Laughing
:C:ROFL::ROLL ON FLOOR LAUGHING
Re: counter for hotstrings
Thank you BriHecato.
I tried adding the "C" option earlier... but did not make 3 different entries. The following code worked and accomplished both tasks.
To clarify:
I tried adding the "C" option earlier... but did not make 3 different entries. The following code worked and accomplished both tasks.
To clarify:
Code: Select all
:C:aat::
sendinput, ambient air temperature{space}
counter += 1
return
:C:Aat::
sendinput, Ambient air temperature{space}
counter += 1
return
:C:AAT::
sendinput, AMBIENT AIR TEMPERATURE{space}
counter += 1
return
Who is online
Users browsing this forum: No registered users and 283 guests