Welcome Guest.   Make a donation to an author on the site April 17, 2014, 01:31:03 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: Pausable timer  (Read 2194 times)
rgdot
Supporting Member
**
Posts: 1,514


View Profile WWW Give some DonationCredits to this forum member
« on: October 03, 2011, 05:59:29 PM »

I am looking for a timer that is pausable. But also has a separate hotkey or button that pastes the current elapsed time (to the second) into an 'internal' or external text editor. After pasting it the focus moves to after the pasted time ready for me to type things. Would be great if it can also paste the current date but that is of course available in text editors so it's not very important.

If this makes sense (?) is it doable? or something like this exists already?

Thanks smiley
Logged
Paul Keith
Member
**
Posts: 1,965


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: October 04, 2011, 12:04:18 AM »

This would be cool if it can be implemented in some type of launcher IMO like FARR.
Logged

<reserve space for the day DC can auto-generate your signature from your personal PopUp Wisdom quotes>
Renegade
Charter Member
***
Posts: 10,361



Tell me something you don't know...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: October 04, 2011, 03:42:41 AM »

I am looking for a timer that is pausable. But also has a separate hotkey or button that pastes the current elapsed time (to the second) into an 'internal' or external text editor. After pasting it the focus moves to after the pasted time ready for me to type things. Would be great if it can also paste the current date but that is of course available in text editors so it's not very important.

If this makes sense (?) is it doable? or something like this exists already?

Thanks smiley

See the attached file.

* PasteyTimer.exe (165.5 KB - downloaded 125 times.)

Screenshot:



It doesn't do the date though.

Also, it's not polished.

* Currently the hotkey accelerator settings are not saved between runs.
* The clipboard is used as well, so when you paste, your clipboard has that data on it.
* It only shows hours, minutes, seconds. No attempt to do days, etc.

I've set it to be easy to use with your left hand. i.e. Use Z and X to start/stop. That way you can do it 1-handed. Sucks for lefties though...

It's .NET 4 Client Profile, so you need .NET 4 installed. (Sorry - had it finished before I realized that my defaults are for .NET 4, and not .NET 2.) Shouldn't be a problem though.

But, it does what you've asked for.
Logged

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker
rgdot
Supporting Member
**
Posts: 1,514


View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: October 04, 2011, 09:23:59 AM »

@Renegade, thank you very much thumbs up .NET is no problem. Running it and pasting into Notepad, works great.

Just a couple of things that are not a problem for me but just to look, the timer thing happened when I clicked stop twice in a row by mistake. The other is pasting into Notepad++ (language either php or normal text).



Logged
Renegade
Charter Member
***
Posts: 10,361



Tell me something you don't know...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: October 04, 2011, 11:43:32 AM »

@Renegade, thank you very much thumbs up .NET is no problem. Running it and pasting into Notepad, works great.

Just a couple of things that are not a problem for me but just to look, the timer thing happened when I clicked stop twice in a row by mistake. The other is pasting into Notepad++ (language either php or normal text).
 (see attachment in previous post)


Yes - I was aware of the double-stop issue. It has to do with time calculations since Unix 0 time (I calculate time based on ticks). I didn't bother fixing it because I wanted to get it done quickly.

For Notepad++, offhand I don't know why that would be. However, I must admit that I did use the "cheap" method of sending text to the 3rd party application. Again, that was in the interests of time. Doing it "right" would take me a day or so. I only tested in Skype and Editplus, and they worked fine. I never tested in Notepad++ or any other applications. Sad

(Having looked into the problem further, the solution seems to be to use the native method keybd_event in user32.dll to send data. A bit more to it than that, but... that goes from 1 line of code to 1,000 lines of code...)

To get around the Notepad++ problem, you can focus on anything that doesn't accept text input, press hotkey + V, then in Notepad++ do a normal paste. That relates to the lack of "polish" I posted above where the clipboard is used and the data remains on the clipboard.

If nobody objects, I'll post the source code under a "don't complain" license. tongue Grin i.e. Yes. There is room for improvement. And no, I'm not looking for criticism on something that I slapped together very quickly to get a job done. tongue

That way anyone that is interested and has time can do some polish for it. (It wouldn't be hard -- the code is nice and clean with some comments -- it might be a good learning exercise for anyone interested in improving their C# skills.)

Sorry there -- I'm just under the gun with a few things that I have to get done. Sad


Logged

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker
rgdot
Supporting Member
**
Posts: 1,514


View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: October 04, 2011, 12:47:55 PM »

I understand. It works for me so it's fine for me at least. I will try the alternate method for Notepad++. Thanks.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.029s | Server load: 0.03 ]