Need Help

Ask gaming related questions (AHK v1.1 and older)
Foolishguy
Posts: 21
Joined: 09 Sep 2017, 03:30

Need Help

21 Mar 2018, 10:36

Hi, I did a little looking around for a script that would help find the time remaining in a Timer. I could not find it.
I decided to give it a go and found another way that would work for my current game script.
It plays a video game for 6 hours.
It currently works perfectly for Runescape.
I wanted a little more functionality.
I'm having a real hard time adding the variables and defining them.



so far I have:

Code: Select all

;time left
loop    ; start loop
{
FormatTime, Timeleft, ,HHmm ; contant real-time
}
FormatTime, Time, ,HHmm ; Timestamp of script start time
Timer = %Time% ; defining Timestamp as Timer
Timer += 0600 ; Adding run time to Timestamp
Timer -= %Timeleft% ; subtracting real time variable from Timestamp+ estimated Runtime to find remaining time

^!t MsgBox, , , %TImer% ; lets me see how much longer the script will be running for
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Need Help

21 Mar 2018, 13:26

i dont get what your problem is

are you trying to find out when a script has been started, or how long its been running for or when its supposed to finish?

anyway, have a look at A_TickCount
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Need Help

22 Mar 2018, 10:16

All but the first loop is unreachable code.
Your code will never, ever exit the first loop.

Code: Select all

loop    ; start INFINITE loop
{
FormatTime, Timeleft, ,HHmm ; contant real-time
}
; SCRIPT NEVER GETS TO THIS POINT.
FormatTime, Time, ,HHmm ; Timestamp of script start time

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 53 guests