Page 1 of 1 1
Topic Options
#149156 - 2005-10-04 01:40 AM Multiple colors on one line with ?
Skorpion Offline
Fresh Scripter

Registered: 2005-09-27
Posts: 11
Hi,

I'm trying to make my script alot easier to see when there are problems and when everything is ok.

Basically I want my MapDrive function to print out "Mapping X to \\server\share - " and then if it's successful it would print out a green "Connected" or a red "Failed"...

Is this possible?

Top
#149157 - 2005-10-04 02:14 AM Re: Multiple colors on one line with ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well, I don't understand the subject line "Multiple colors on one line with ?" since "?" starts a newline. If you wannt colours, look at the color command in the manual.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#149158 - 2005-10-04 02:18 AM Re: Multiple colors on one line with ?
Skorpion Offline
Fresh Scripter

Registered: 2005-09-27
Posts: 11
But ? is also how you output to the command line... i.e. ? "Test"
Or am I completely mistaken?

I know about Color but changing it half way through a sentence...

Is there another way of outputting text?

Top
#149159 - 2005-10-04 02:21 AM Re: Multiple colors on one line with ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You are completely mistaken. See my FAQ on the ? command.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#149160 - 2005-10-04 02:28 AM Re: Multiple colors on one line with ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
anything your script produces that you don't pass somewhere (to a var, to a function or to a command) is outputted to the console window.

there is no console-spill command.
_________________________
!

download KiXnet

Top
#149161 - 2005-10-04 02:48 AM Re: Multiple colors on one line with ?
Skorpion Offline
Fresh Scripter

Registered: 2005-09-27
Posts: 11
Ahhh very cool, so used to PHP etc, didn't expect that one :-)

Problem sorted, thanks guys.

Top
#149162 - 2005-10-04 06:13 AM Re: Multiple colors on one line with ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Code:

COLOR w+/b
'Test'
COLOR g/r+
' Whatever'
?
COLOR w+/b
'Test Line 2'
COLOR g/r+
' Whatever'

_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 4409 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.068 seconds in which 0.037 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