PDA

View Full Version : %CurrentTime% variable disappeared



Carlos
10-10-2002, 05:16 PM
Hi there,

I inserted a %CurrentTime" variable attached to a text file.
After previewing the project a few times, the variable has now disappeared and now obviousy does not show the current time anynore. (It worked fine when previewing a few times)
It has disappeared from the variable lists and even the help index!
If I write it in manually (%CurrentTime%) nothing happens.

Anyone had this before?

TJ_Tigger
10-10-2002, 06:50 PM
In AMS4 the variables I could find are as follows:
#CURRENTDAY#
#CURRENTHOUR#
#CURRENTMINUTE#
#CURRENTMONTH#
#CURRENTMONTH2#
#CURRENTSECOND#
#CURRENTDAY#

or you could just set the %CURRENTTIME% to the current time using this.

%CurrentTime% = System.GetDateTime ( "TIME", "Military Time")



<IR_ACTIONS_LIST>
<Action name="Get Date Time">
<Type>139</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%CurrentTime%</Variable>
<ReturnType>1</ReturnType>
<Date>0</Date>
<Time>0</Time>
</Action>
</IR_ACTIONS_LIST>

Corey
10-10-2002, 06:53 PM
Now THAT's an answer. Chalk one more up for the Tig.

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

TJ_Tigger
10-10-2002, 06:58 PM
Just lucky I got here first, and I was just playing with that feature so it was fresh on my mind.

pagedown
10-10-2002, 08:12 PM
Thanks i was wondering about that last night....

Carlos
10-11-2002, 02:06 AM
Thanks Tigger. Will try that.

Is %CurrentTime" not supposed to be in the built in variables list? I am sure it was there!

Anyway I will use your workaround. Thanks again

John-oh
10-11-2002, 08:02 AM
If you want it to 'tick' you could put it in a loop ...

<IR_ACTIONS_LIST>
<Action name="Get Date Time">
<Type>139</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%Currenttime%</Variable>
<ReturnType>1</ReturnType>
<Date>0</Date>
<Time>0</Time>
</Action>
<Action name="WHILE">
<Type>204</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%currenttime%&amp;gt;0</Condition>
</Action>
<Action name="Get Date Time">
<Type>139</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%Currenttime%</Variable>
<ReturnType>1</ReturnType>
<Date>0</Date>
<Time>0</Time>
</Action>
<Action name="Refresh Objects">
<Type>125</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<RefreshType>1</RefreshType>
<RefreshAllObjects/>
<RefreshSpecificObjects>Text1</RefreshSpecificObjects>
</Action>
<Action name="END WHILE">
<Type>205</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
</IR_ACTIONS_LIST>

Lorne
10-11-2002, 09:48 AM
Is %CurrentTime" not supposed to be in the built in variables list? I am sure it was there!

Sounds like you mean the list of variables that appears when you right-click on a field and select Insert..., then Variable. Custom variables will show up in that "Insert Variable" list too.

Whenever you add an action to your project that assigns a value to a variable, that variable is added to the "Insert Variable" list for you. You might notice that it actually says "Built-in Variable" or "Custom Variable" in the right-hand column, too. /ubbthreads/images/icons/smile.gif

Carlos
10-11-2002, 01:58 PM
You are right. It is not part of the standard list. Oops!!!

Thanks!

Carlos
10-11-2002, 02:02 PM
Thanks John-oh,

That was going to be the next thing I was going to tackle...
Thanks again guys.

Carlos
10-11-2002, 04:46 PM
I used the script that John-oh kindly provided.
It worked great. I placed it in the "On show" event list because it does not work in the "On initialize" section.

However:
It hides all the Hotspots I have on that page and makes them inactive. I also have an AVI object on that page but it remains visible i.e. the only objects it hides are the Hotspots.

Any idea how I can have the Currenttime loop running and include the hotspots?