Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 7:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Script clock with resolution to tenths- hundredths of a sec.
PostPosted: September 25th, 2007, 12:49 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Has anyone used the Clock Script functions??
I can create a clock, but when I try to start it, "function not found" error is returned. It's only 2 lines of script copied from the help file, but it will not work

Code:
var myClock = CreateClock("ScriptClock","clock_var")
myClock.Start() // will start the clock.

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Last edited by sandyn on September 25th, 2007, 10:00 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: September 25th, 2007, 6:06 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi Sandyn,
look at viewtopic.php?t=230&highlight=createclock

cheers
Paul


For this message Paul has been thanked by : mackavi


Top
 Profile  
 
 Post subject: script clock with tenths a hundredths of a second resolution
PostPosted: September 25th, 2007, 9:53 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Thanks very much Paul,
I must have had a senior moment, because I thought I had searched for 'createclock' and found nothing.
When I downloaded the example, it worked fine and was exactly what I had done in my test publication. I reduced my test publication to be identical to the example, but I still got the same error----but now the clock actually runs. The only difference between the two publications was the chapter window size?.....so I changed my one to match the example and the error disappeared?? I'm a bit baffled to say the least.......and I can't reproduce the original error on mine by reverting to the different window size. Very strange?

The point of this exercise was because I had noticed that the Clock Action has the option to display time down to hundredths of a second and I wondered if the Script Clock has the same capability....which it does :-)

Code:
myClock = CreateClock("ScriptClock","clock_var","[hh],[mm],[ss],[ff]")
myClock.Start()


This will give you a script clock with hundredth of a second resolution BUT.....there is no 'myClock.GetTenths()' operation, however the tenths and hundredths can be extracted from the clock_var variable by using the following constant expressions in insert variable.


Code:

(clock_var.toString()).charAt(9)-------for tenths of a second
(clock_var.toString()).charAt(10)------for hundredths of a second.




so it is possible to have a script clock with resolution down to hundredths of a second. I haven't tested it's accuracy yet.

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group