Read time from ini, format time and then add time.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
relativity
Posts: 13
Joined: 22 Nov 2019, 04:23

Read time from ini, format time and then add time.

05 Dec 2019, 06:05

Dear people,

I'm creating a project to account for my hours spent on projects.
I have a iniread which reads the time from ini in hh:mm:ss
Now I need to format the time properly and add time (which varies in hours, minus and seconds)


How can this be done?

Thanks allot
rakesha002
Posts: 46
Joined: 04 Dec 2017, 00:11

Re: Read time from ini, format time and then add time.

06 Dec 2019, 05:50

Hi,

To help you, we need more information and example script at least would be nice, there are some ways we can do what you ask for.
Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: Read time from ini, format time and then add time.

06 Dec 2019, 06:15

Code: Select all

/*
[Default]
time=09:19:52
*/

IniRead, tm, %A_ScriptFullPath%, Default, time
v := "19000101" RegExReplace(tm,":") 
v += 05, Hours
v += 10, Minutes
v += 20, Seconds
FormatTime, tm1, %v%, HH:mm:ss
MsgBox % tm "`n" tm1
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Marium0505, mcl and 351 guests