Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
timer help
#1
say i want to set a timer not in a dialogue but say i wanted to set a timer on my yahoo so that i knew how long i been on yahoo for how would i go about this can u help me pleaseBig Grin
#2
So where would you want the timer to be at? I'm not sure what you mean you want a timer on your yahoo? Would you want it inside a dialog or maybe in the Quick Macros output? Where exactly would you want the timer?
Taking on Quick Macros one day at a time
#3
Something like this?

FunctionTimer:
Code:
Copy      Help
int i
for i 0 1000000000
,str s=i
,OnScreenDisplay s 1 0 0 "" 25 0xff0000 2 "tim4924"


Macro1:
Code:
Copy      Help
shutdown -6 0 "FunctionTimer"
Taking on Quick Macros one day at a time
#4
yes tyvm noob here lol
#5
this looks cool setting a timer for on screen, ive looked at QM help for what i need. i just dont know which one to use and how to.

what i would like to know is it possible to set a timer counting up for a window name.
and if its possible to have the timer in seconds, minutes, hours.

if it can be done could u show me an example.
#6
thanks for a speedy reply... never got one though
#7

Did you want a timer on the window itself? In a dialog? On the Screen?...
Taking on Quick Macros one day at a time
#8
on a window, next to the window name, if its possible ty
#9
i would like to have this alsi if it is possible?
#10
Function notepad_timer
Trigger: !cv"* - Notepad" "Notepad" "" "" "" 0x6
Code:
Copy      Help
;\
int hwnd=val(_command)
int i h m s; str ss
for i 0 1000000000
,if(!IsWindow(hwnd)) ret
,ss.getwintext(hwnd)
,if(i) ss.replacerx(" <\d+:\d+:\d+>$") ;;remove previous timer
,s=i%60
,m=i/60%60
,h=i/3600
,ss.formata(" <%i:%02i:%02i>" h m s)
,ss.setwintext(hwnd)
,1
err+
#11

This looks nice, I didn't realize that I could use this also.
Taking on Quick Macros one day at a time
#12
WOW Gint thats perfect...exactly what i needed Thanks!
#13
Gintaras Wrote:Function notepad_timer
Trigger: !cv"* - Notepad" "Notepad" "" "" "" 0x6
Code:
Copy      Help
;\
int hwnd=val(_command)
int i h m s; str ss
for i 0 1000000000
,if(!IsWindow(hwnd)) ret
,ss.getwintext(hwnd)
,if(i) ss.replacerx(" <\d+:\d+:\d+>$") ;;remove previous timer
,s=i%60
,m=i/60%60
,h=i/3600
,ss.formata(" <%i:%02i:%02i>" h m s)
,ss.setwintext(hwnd)
,1
err+

Quick Question....What does the " ;\ " Do on the first line in the above quote?
#14
Does not allow to run the macro when you click the Run button.
#15
Ok thanks for the fast responce...i figured that out, but was wondering if it meant anything else...Thanks!
#16
i want a onscreendisplay timer going to 60 seconds then it turns to a minute then 60 mins to a hour u got any ideas please post it thanks
#17
i have this so far from using the above example, not to sure if its me or not but seems its not clearing up the last seconds as quick as it should.

Code:
Copy      Help
int i h m s; str ss
for i 0 1000000000
,spe
,if(i) ss.replacerx(" <\d+:\d+:\d+>$")
,s=i%60
,m=i/60%60
,h=i/3600
,ss.formata(" <%i:%02i:%02i>" h m s)
,OnScreenDisplay ss
,1
err+
#18

Clears them up fine for me.
Taking on Quick Macros one day at a time
#19
Code:
Copy      Help
int i h m s; str ss
for i 0 1000000000
,s=i%60
,m=i/60%60
,h=i/3600
,ss.format("%i:%02i:%02i" h m s)
,OnScreenDisplay ss 2 -1 -1 "" 18 0x008000 8 "timer123"
,1
#20
i hadnt seen ambers post/s and was using the examples given previos to that. thought i could piece them together.


Forum Jump:


Users browsing this thread: 2 Guest(s)