Jump to content
Sign in to follow this  
Guest GerrishGray

Day of the week detection in scasm?

Recommended Posts

Guest

Hi,I'm trying to create macro which should be visible only at the weekend. So far without success. I'm able to detect number of the day in the year, but not in the week. Is there a way how to achieve this? Thanks.

Share this post


Link to post
Share on other sites

As far as I know there is no variable for day of the week, so the only one you could use is day of the year I think (although that would mean making a lot of different checks).


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest

That's exactly what I was trying to avoid :) I was thinking about this, but the code would be so complex and probably not feasible in scasm. But I'll probably give it a try before giving up...

Share this post


Link to post
Share on other sites
Guest gorchi

Jiri,maybe You could try diving day of year with 7, like:Uvar( $WeekOfYear int( $dayofyear / 7 )Anyway, I am interested though how You get day of Year, it could be useful for me :) Last time I tried to check for it it was unsuccessful :(Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest GerrishGray

HiUntil the world moves over to 8-day weeks, with 3-day weekends of course :-), there is no practical way of doing this. Using SCASM variables is a non-starter - this only works at compile time, not run time.All you could do would be set up a 'lookup table' using Interpolate(). The only other trick I can think of would be to ask the pilot to indicate that it's the weekend by tuning NAV2, say, to a particular frequency.Good luckGerrish

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...