loading
 
Timer values
from Australia  [87 posts]
17 year
I would like to know the time between the two event's (e.g. mouse clicks). Is there a feature like 'Timer' available from where the software could read the current time so that it can compare it to the previous value.
Anonymous 17 year
Yes, that is possible. In the next release 1.7.9 (due out in a couple hours) you can use the following code inside a VBScript module.

timestamp = GetVariable("MOUSE_CLICK_TIME")

if timestamp <> 0 then

  last = GetVariable("LAST_CLICK")

  if last <> 0 then

    write "Time Difference: " & timestamp - last

  end if

  SetVariable "LAST_CLICK", timestamp

end if

or see the robo-file below. Note that these variables are set when a user clicks on the main RoboRealm image. The timing is in seconds. You also have the variables MOUSE_CLICK_X and MOUSE_CLICK_Y which represent the location that the user clicked on. Watch the Watch_Variables module to see how these are set/removed on user interaction.

STeven.

program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index