Time in script

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Machariel
Newbie
Posts: 15
Joined: Mon Mar 10, 2008 8:40 pm

Time in script

Post by Machariel » Wed May 28, 2008 11:17 am

Hello.

I have a VERY long script, and I want to see the excact time from one plaze to another plaze in the script.
I do not mean the time has to be shown when the script is compiled and ready to run for real. I just want to see the time betwen two points in the scrips, when Im programming the script, so i don't have to run the script all the time to take time with a stop watch..

Regards:-)
________
Ferrari F151
Last edited by Machariel on Tue Feb 01, 2011 11:34 pm, edited 1 time in total.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed May 28, 2008 11:26 am

Do you mean elapsed time? If so, use VBScript's Timer function which returns seconds since midnight:

VBSTART
VBEND

VBEval>Timer,startSeconds

..
.. do some long process
..

VBEval>Timer-%startSeconds%,elapsedSeconds

MessageModal>Seconds Elapsed: %elapsedSeconds%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Machariel
Newbie
Posts: 15
Joined: Mon Mar 10, 2008 8:40 pm

Post by Machariel » Wed May 28, 2008 11:51 am

no that is not what i mean.
the script im writing are depending on a 3rd part program that is doing a function every 311 sec.
But I can't just make a wait>311 becurse in this 311 sec the scrips has to run varius multiple diffrent commands.
So what im locking for is a simpel indication of the time in the script, that is telling me when the scrips has run for 311 sec from a sertain point in the script, so I DON'T have to run the script constantly, to take time..
________
iolite vaporizer review
Last edited by Machariel on Tue Feb 01, 2011 11:34 pm, edited 1 time in total.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed May 28, 2008 2:55 pm

Playing back what I think you want.

Start a script
Do some things
Start special program, and start clock to count 311 seconds.
Let other programs and script run
When 311 seconds has passed pop up a message that special program is done.
Let scripts continue.


Does that sound correct?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Machariel
Newbie
Posts: 15
Joined: Mon Mar 10, 2008 8:40 pm

Post by Machariel » Wed May 28, 2008 4:14 pm

No not what i mean eighter.. then I have to run the script eanyway to know when 311 sec has passed multiple times from multiple diffrent spots in the scrips.. and it is exactly that I wont to avoid.. If i have a script that takes 5 hours from start to finish, it will take a life time to write the script..

Purhaps what im locking for, does not excist..
Then I have a kind reguist to the next release or upgrade to macro scheduler. That when you write a script, there will be a time indication of how long time you currently are in the script (if it was run from start until the current location/spot in the script)
Also, that you could right click and mark, for exampel line 28 to 354, and then you could see instantly the exact time it will take to run the script from line 28 to line 354.
________
Honda Dio specifications
Last edited by Machariel on Tue Feb 01, 2011 11:35 pm, edited 1 time in total.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu May 29, 2008 4:12 am

If you run a script with logging you will see the times.

You could create a macro to parse out the times in the log file and do the math for elapsed time.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts