Announcement

Collapse
No announcement yet.

Don't Know How To Title This One...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Don't Know How To Title This One...

    Got a litte question for you'll. Ok, so I have everything running sweet now, looks really nice! But the client wants it so that certain area's of the autorun are blocked off after a certain date. He doesn't want the whole disk blocked off so the option in 'Security' is no good. Now I have no programming/scripting experience what so ever, so I'm lost. I noticed there was a %Date% variable, which I figured I could use to do something like this with:

    If %Date% >= 05/01/01

    Or something like that...but I don't know how to do that. Also, I see the Boolean option, but I can't figure out how to get it to work!!! I'm so frustrated right now

    Here's the picute...click on a link from the first page, and if the date is less than 05/01/01 then it will go through like it's no problem. If the date is equal to or greater than 05/01/01 then a dialog box would appear stating 'Blah Blah Blah'. Doesn't sound too hard huh? Bah, I'm just braindead when it comes to this Thanx in advance!!!

  • #2
    Re: Don't Know How To Title This One...

    What you could do is use the Menu Expiration feature. To do this, go to Project | Settings on the menu. Select the Security tab. Set the number of days to the appropriate amount (150 days for 5 months, etc.) Then in your menu, just check if %IsExpired% is TRUE. You could use this condition to show the dialog box.

    Comment


    • #3
      Re: Don't Know How To Title This One...

      Hi,
      I was just fooling around with dates and you can compare dates using Boolean conditions. So you can use Support’s suggestion and take advantage of the built in functionality or you can set it up for yourself.
      In your case what you would do is have your JUMP TO PAGE action with the Boolean condition: "%Date% < 05/01/01". So now the JUMP TO PAGE action will only occur if that %Date% string is less then 05/01/01. After that action (on the same event) have a SHOW MESSAGE action, give it the Boolean condition that: “%Date% >= 05/01/01", which means that the SHOW MESSAGE action will only occur if the %Date% string is equal to or greater then “05/01/01”. That's it.
      This being true I would go with Support's suggestion because if you use Boolean conditions a String comparison is being made. Which means that "05/02/00" is greater then "05/01/01", which according to what the dates actually mean is untrue but according to string comparison it is. Basically the strings are compared from left to right, so since "05/02" is greater then "05/01" (because the character 2 is greater then the character 1) "05/02/00" is greater then "05/01/01".
      The only positive thing about using the Boolean condition method is that you have more control over it, in my opinion, and can do some interesting things according to dates. So if you are only concerned with a specific year (if the dates are all in the same year the string comparison problem will not occur) then you might consider using this method.
      Of course that was all slightly off topic but I hope it helped you see the pros and cons of both methods. Again, though, for simplicities sake and overall reliability the built-in functionality that Support mentioned is your best bet.

      mark.
      MSI Factory The Next Generation Intelligent Setup Builder

      Comment

      Working...
      X