Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2000
    Location
    Johannesburg, South Africa
    Posts
    36

    %CurrentTime% variable disappeared

    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?

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160

    Re: %CurrentTime% variable disappeared

    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>
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  3. #3
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: %CurrentTime% variable disappeared

    Now THAT's an answer. Chalk one more up for the Tig.

    Corey Milner
    Creative Director, Indigo Rose Software

  4. #4
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160

    Re: %CurrentTime% variable disappeared

    Just lucky I got here first, and I was just playing with that feature so it was fresh on my mind.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  5. #5
    Join Date
    Sep 2002
    Location
    West of the Atlantic
    Posts
    75

    Re: %CurrentTime% variable disappeared

    Thanks i was wondering about that last night....

  6. #6
    Join Date
    Sep 2000
    Location
    Johannesburg, South Africa
    Posts
    36

    Re: %CurrentTime% variable disappeared

    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

  7. #7
    Join Date
    Jun 2000
    Location
    England
    Posts
    200

    Re: %CurrentTime% variable disappeared


    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>

  8. #8
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728

    Re: %CurrentTime% variable disappeared


    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. [img]/ubbthreads/images/icons/smile.gif[/img]
    --[[ Indigo Rose Software Developer ]]

  9. #9
    Join Date
    Sep 2000
    Location
    Johannesburg, South Africa
    Posts
    36

    Smile Re: %CurrentTime% variable disappeared

    You are right. It is not part of the standard list. Oops!!!

    Thanks!

  10. #10
    Join Date
    Sep 2000
    Location
    Johannesburg, South Africa
    Posts
    36

    Re: %CurrentTime% variable disappeared

    Thanks John-oh,

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

  11. #11
    Join Date
    Sep 2000
    Location
    Johannesburg, South Africa
    Posts
    36

    Re: %CurrentTime% variable disappeared

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts