Announcement

Collapse
No announcement yet.

%CurrentTime% variable disappeared

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • %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
    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

    Comment


    • #3
      Re: %CurrentTime% variable disappeared

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

      Corey Milner
      Creative Director, Indigo Rose Software

      Comment


      • #4
        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

        Comment


        • #5
          Re: %CurrentTime% variable disappeared

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

          Comment


          • #6
            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

            Comment


            • #7
              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>

              Comment


              • #8
                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 ]]

                Comment


                • #9
                  Re: %CurrentTime% variable disappeared

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

                  Thanks!

                  Comment


                  • #10
                    Re: %CurrentTime% variable disappeared

                    Thanks John-oh,

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

                    Comment


                    • #11
                      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?

                      Comment

                      Working...
                      X