Source language: Translate to:

4 saisons

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

4 saisons

Postby Alex » Sat Jan 06, 2007 7:32 am

Hi,

Happy New Year !!!

How can I do a program with the 4 saisons ?

Thanks

Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Wrangler » Sat Jan 06, 2007 9:23 am

:?: Please explain saisons.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Alex » Sat Jan 06, 2007 9:55 am

4 saisons :

Spring

Summer

Autumn

Winter



Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Wrangler » Sat Jan 06, 2007 9:58 am

Ahh. 4 SEASONS. Now I understand. But the question makes no sense. What do you mean do a program with the 4 seasons? Please explain what it is you want to do in detail.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Alex » Sat Jan 06, 2007 10:16 am

Sorry !!!


I want to have when I click of a PushButton, in which saison we are in France.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Gaev » Sat Jan 06, 2007 5:30 pm

Assuming that default Date Format in France is d/m/y ...
Code: Select all
... Enter the correct values for first day of each season in your country
DateToNum "!20/3/[Year]" "d/m/y" "[StartSpring]"
DateToNum "!23/6/[Year]" "d/m/y" "[StartSummer]"
DateToNum "!21/9/[Year]" "d/m/y" "[StartAutumn]"
DateToNum "!19/12/[Year]" "d/m/y" "[StartWinter]"

DateToNum "[DateShort]" "Default" "[Today]"

If "[Today]" "<" "[StartSpring]"
   SetVar "[currentSeason]" "Winter"
   Return
EndIf

If "[Today]" "<" "[StartSummer]"
   SetVar "[currentSeason]" "Spring"
   Return
EndIf

If "[Today]" "<" "[StartAutumn]"
   SetVar "[currentSeason]" "Summer"
   Return
EndIf

If "[Today]" "<" "[StartWinter]"
   SetVar "[currentSeason]" "Autumn"
   Return
EndIf

SetVar "[currentSeason]" "Winter"
Return
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Wrangler » Sat Jan 06, 2007 6:04 pm

Nice piece of code, Gaev. Into the locker it goes. Thanks. :lol:
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Alex » Sun Jan 07, 2007 12:25 am

Thank you very much

It's a very good code


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests

cron