Welcome Guest.   Make a donation to an author on the site September 01, 2014, 06:13:35 AM  *

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.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: convert time  (Read 2743 times)
lullabylin
Charter Member
***
Posts: 2

View Profile Give some DonationCredits to this forum member
« on: April 18, 2007, 09:36:45 AM »

Hi, I would LOVE to have a little widget that would enable conversion between TIME tracked in increments of sixty and increments of 100.
I have to keep track of media time (hours, minutes, seconds as shown in a standard media player) and time as a quantity in a spread sheet.

The spread sheet recognizes seconds as increments of a hundredth instead of increments of 1/60th.
A widget to convert back and forth from 100th's to 60th's would be SO SUPER!!!!!
LullabyLin

PS Here is a link to a page that has a conversion function like I'd like in a freestanding tool:  http://www.springfrog.com...onverter/decimal-time.htm
« Last Edit: April 18, 2007, 10:07:12 AM by lullabylin » Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: April 18, 2007, 08:08:44 PM »

Here's a possible solution:

[copy or print]
;ConverTime
;By jgpaiva
;date: June 2006
;Function:

MsgBox,4,Hours/Minutes to Decimal?,Convert Hours`,Minutes and seconds to Decimal?`n  (select No to do the reverse operation)
IfMsgBox Yes
{
  InputBox,Time,Input Time,Please input time in the following format: Hours:Minutes:Seconds
  StringSplit,something,Time,`:,`:
  if something0 <> 3
  {
    msgbox,wrong parameters
    exitapp
  }
  result := something1 + something2 /60 + something3 / (60*60)
  msgbox,% result
}
IfMsgBox No
{
  InputBox,Time,Input Time,Please input time in the decimal format
  hours := time // 1
  minutes := ((time - hours) * 60) //1
  seconds := ((time - hours - (minutes/60)) * 60 * 60) //1
  msgbox,Hours: %hours%`nMinutes: %minutes%`nSeconds: %seconds%
}
Just paste that in notepad, save it as ConvertTime.ahk, download and install autohotkey and double-click ConvertTime.ahk Wink
Logged

lullabylin
Charter Member
***
Posts: 2

View Profile Give some DonationCredits to this forum member
« Reply #2 on: April 18, 2007, 09:54:43 PM »

Thanks, JG.  I already use AHK and love it as a sort of typing expander. 
So your widget is really neat but I am still scratching my head because I don't really want to convert the minutes and seconds to decimal as in a time clock decimal system of time.
I track time played of media files as a quantity in a spreadsheet that is then multiplied by an hourly rate.  If I multiply the total minutes and seconds by a number, I don't get the right thing because the quantity of seconds should be converted since it's based on a sixtieth and should be based on tens to be accurate.  Maybe I need to go back to 5th grade!!!! 
Thank you very much for sharing your script.  I'm going to sleep on it and maybe insight will come ...  tellme
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: April 21, 2007, 06:35:45 AM »

Sorry but i don't quite get what you mean.
Notice that the script i made does exactly what the webpage you mentioned does.
To select the way the time is converted, you have to press yes or no at the beggining.
From what you described, i think that you pressed 'yes'. Try pressing 'no' at the beggining, and see if that's what you want Wink
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.028s | Server load: 0.01 ]