Page 1 of 1 1
Topic Options
#67912 - 2002-07-09 12:51 AM Welcome message in logon script
systeembeheerder Offline
Fresh Scripter

Registered: 2002-04-14
Posts: 26
Loc: The Netherlands
I want to set in my logon script a welcome message.

It most say in the morning: Goedemorgen
In the afternoon: Goedemiddag
And in the evening: Goedeavond

The time when he must say: Goedemorgen is between 0.00 and 11.59 hour and the time when he must say: Goedmiddag is between 12.00 and 17.59 hour and the time with the script must say: Goedeavond is between 18.00 and 23.59

I have tried some things with @time but every time my script gets an error.

How must this in my logon script?

Please advise..

Top
#67913 - 2002-07-09 12:58 AM Re: Welcome message in logon script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
heh...
isn't that Goedemiddag like noon (at 12.00)?

anyway, could you send your script which you have...
there is probably some minor syntax thingie...

it does not matter how much code you have unless it's less than one line or more than 1000 lines [Big Grin]

so, let us see your base...
_________________________
!

download KiXnet

Top
#67914 - 2002-07-08 01:45 PM Re: Welcome message in logon script
Breaker Offline
Hey THIS is FUN
*****

Registered: 2001-06-15
Posts: 268
Loc: Yorkshire, England
Hi,

Try something like this in your script...

code:
$Time = @TIME
$hour = SubStr($time,1,2)
Select
Case $hour <= 12
$Greeting = "Good morning"
Case $hour < 17
$Greeting = "Good afternoon"
Case $hour >= 17
$Greeting = "Good evening"
EndSelect

At(7,12) $Greeting + ", " + @FULLNAME + " (username: " + @USERID + ")."

Hope this helps!

[ 08 July 2002, 13:49: Message edited by: Breaker ]
_________________________
================================================
Breaker


Top
#67915 - 2002-07-08 01:52 PM Re: Welcome message in logon script
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

For ideas:
code:
$periode=Val(Substr(@time,1,2))
SELECT
CASE (12 <= $periode) AND ($periode <= 17)
? "Goedemiddag, @userid"
CASE (18 <= $periode) AND ($periode <= 23)
? "Goedenavond, @userid"
CASE 1
? "Goedemorgen, @userid"
ENDSELECT

greetings.

[ 08 July 2002, 13:53: Message edited by: MCA ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#67916 - 2002-07-08 04:52 PM Re: Welcome message in logon script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
code:
$hour = val(SubStr(@TIME,1,2))
Select
Case $hour < 12
$Greeting = "Good morning"
Case $hour < 17
$Greeting = "Good afternoon"
Case 1
$Greeting = "Good evening"
EndSelect
? $Greeting + ", " + @FULLNAME + " (username: " + @USERID + ")."

Optimized for improved KiXtart Golf score [Wink]
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.106 seconds in which 0.069 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org