PDA

View Full Version : %JulianDate%


Bruce
06-26-2003, 02:48 PM
Does this look right? I would like to dump after 15 days.

%JulianDate% = System.GetDateTime ( "Date", "Julian Date")
%DaysSinceBuilt% = Evaluate (%JulianDate% - #JulianDate#)
IF (%DaysSinceBuilt% >= 15)
%Result% = Dialog.MessageBox ("OOPS!", "This CD Has Now Expired! Plea...", Ok, Stop)
Application.Exit
END IF

TJ_Tigger
06-26-2003, 03:14 PM
Unless I am mistaken, this will dump 15 days after build time, not the first time they run the app

Bruce
06-26-2003, 04:19 PM
Right! /ubbthreads/images/icons/smile.gif

bobohearn
06-27-2003, 05:59 AM
Bruce, I am very intersetd in having a cd expire in a certain amount of time. At least the interface will,right?. Could you tell me how to insert this information and where, I am not real familiar with code and variables. Thanks

Bruce
06-28-2003, 10:41 PM
Sure I'll try to slap it up on Monday. :-)

Derek
06-29-2003, 10:20 AM
You can read about this in detail in the Knowledge Base:

http://www.indigorose.com/ubbthreads/showflat.php?Cat=&Board=KBAMS40&Number=12645&page= 0&view=collapsed&sb=5&o=0&fpart=

bobohearn
06-29-2003, 02:35 PM
Derek, I read the information I just have no clue where to put it. I got to the projects "On Initiliaze" section but ran out of gas there. I think if I can figure this out a lot of other mysteries will unfold. Any chances of a step by step?

Bruce
06-30-2003, 10:57 AM
bob-

<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>%JulianDate%</Variable>
<ReturnType>0</ReturnType>
<Date>3</Date>
<Time>0</Time>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%DaysSinceBuilt%</Variable>
<Value>%JulianDate% - #JulianDate#</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%DaysSinceBuilt% &amp;gt;= 15</Condition>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>OOPS!</DialogTitle>
<DialogMessage>The Time On This CD Has Expired!</DialogMessage>
<Icon>4</Icon>
<Variable>%Result%</Variable>
<DialogType>0</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="Exit">
<Type>2</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
</IR_ACTIONS_LIST>

Try this, you'll need to change the amount of days it allows and the message the end user gets.

bobohearn
06-30-2003, 05:23 PM
Fantastic! Thanks so much, Bruce.

Corey
06-30-2003, 06:51 PM
The Dancing Banana strikes again. 1-800-how's-my-dancing.

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

Bruce
06-30-2003, 10:45 PM
Bob-
B.T.W. Derek was right in referring you to that thread...Read it again S L O W L Y LOL I do a lot of that! It's that or the good folks at the Rose will give ya a hard time (Like Corey) :-)

Corey
06-30-2003, 11:12 PM
Da-nuh... Da-nuh... [suspense music from "Jaws"]

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