Page 1 of 2 12>
Topic Options
#42380 - 2003-07-03 11:49 AM KIX32 v4.20 doesn't print var?
dm330 Offline
Fresh Scripter

Registered: 2003-05-27
Posts: 16
Loc: Netherlands
Hi all,

Our logonscript shows drives and printers that are being installed, but if i want to use KIX32 version 4.20 (currently 4.12) all the var like for example:

? "The $printer is installed"

are not shown bij kix, then kix 4.20 shows:

? "The is installed"

mmmh...

anyone?
_________________________
greetz dm330, from the Netherlands

Top
#42381 - 2003-07-03 01:16 PM Re: KIX32 v4.20 doesn't print var?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What does VarTypeName($Printer) return? You may a problem somewhere else in your program that is not populating the variable.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#42382 - 2003-07-03 02:43 PM Re: KIX32 v4.20 doesn't print var?
dm330 Offline
Fresh Scripter

Registered: 2003-05-27
Posts: 16
Loc: Netherlands
The variable for example $printer works fine if i use kix 4.12, when i only replace the kix version to 4.20 the variable $printer is empty while it should say someting like \\server\printer

for drives it's someting like

Color n/n ? "$DriveLetter $Path"

It doesn't matter what variable i use they all stay emtpy?
_________________________
greetz dm330, from the Netherlands

Top
#42383 - 2003-07-03 02:46 PM Re: KIX32 v4.20 doesn't print var?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
How about not encapsulating the vars in quotes?

For example, you have:

code:
? "The $printer is installed"

or..
code:
Color n/n ? "$DriveLetter $Path"

try this -

code:
? "The "+$printer+" is installed"

or..
code:
Color n/n ? $DriveLetter $Path

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#42384 - 2003-07-03 02:50 PM Re: KIX32 v4.20 doesn't print var?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Without seeing the script, it's hard to help. There are a couple of reasons why this happens, e.g. variable scope issues. Also, please do not use variables embedded inside strings. You could also try
code:
? 'vartype(printer)     = '+vartype($printer)
? 'vartypename(printer) = '+vartypename($printer)
? 'printer = '+$printer
? 'The $printer is installed'

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

Top
#42385 - 2003-07-03 02:51 PM Re: KIX32 v4.20 doesn't print var?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
As I stated previously, your code may work with 4.12 but may not be setting the $printer variable correctly under 4.20.

So please use Vartypename() to validate your variable when it is assigned to insure that you are getting what you think you should be getting under 4.20.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#42386 - 2003-07-03 02:52 PM Re: KIX32 v4.20 doesn't print var?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Are you sure about the versions?
quote:
- Added NoVarsInStrings option. If this option is ON, variables inside strings
are not resolved.

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#42387 - 2003-07-03 02:55 PM Re: KIX32 v4.20 doesn't print var?
dm330 Offline
Fresh Scripter

Registered: 2003-05-27
Posts: 16
Loc: Netherlands
well the printers and the drives are all connected during the script, the only thing i don't have is the text on the screen?
_________________________
greetz dm330, from the Netherlands

Top
#42388 - 2003-07-03 02:58 PM Re: KIX32 v4.20 doesn't print var?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
So, did you try our suggestions and check the vartype?
Please report back with the vartype results and/or post your script.
_________________________
There are two types of vessels, submarines and targets.

Top
#42389 - 2003-07-03 03:01 PM Re: KIX32 v4.20 doesn't print var?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
If you have valid data when the variable is assigned, check it again just before printing it to the screeen.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#42390 - 2003-07-03 03:11 PM Re: KIX32 v4.20 doesn't print var?
dm330 Offline
Fresh Scripter

Registered: 2003-05-27
Posts: 16
Loc: Netherlands
tryed most of the sug to setting the variable to "the printer "+$printer+"" and so on but i dont't even get the part of "the printer" text so i think i have to use the other sug like the vartype(). wil get back here when i have worked all the sug out...

tnx all
_________________________
greetz dm330, from the Netherlands

Top
#42391 - 2003-07-03 03:14 PM Re: KIX32 v4.20 doesn't print var?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
So, now you're saying you don't get any output at all? [Confused] This sounds different from what you talked about before.

It could indicate a script failure at a point before the printing section. Put a DEBUG ON into the first line of your code and step through the code in order to detect the failing line.

Oh, and the reaosn we make suggestions is that you DO give them a try and report back so that we can help you effectively.
_________________________
There are two types of vessels, submarines and targets.

Top
#42392 - 2003-07-03 04:15 PM Re: KIX32 v4.20 doesn't print var?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jens, just relax and wait his response.
bet everything is ok but having some weird dim- or similar issue there...
_________________________
!

download KiXnet

Top
#42393 - 2003-07-05 12:58 AM Re: KIX32 v4.20 doesn't print var?
dm330 Offline
Fresh Scripter

Registered: 2003-05-27
Posts: 16
Loc: Netherlands
Have put in a part of the script here:

:ConnectDrive
USE $DriveLetter $Path

DEBUG ON
If SETOPTION("NoVarsInStrings", "OFF") = 0 Endif
? "TEST"
? "the printer $DriveLetter $Path"
Vartype($Driveletter)

If @ERROR = 0
Color n/n ? "the printer $DriveLetter $Path"
Else
If SetConsole ("SHOW") = 0 Endif
Color r+/n ? ? "Warning the following drive failed to connect:" ? "$DriveLetter $Path" ?
Sleep 5
Endif

DEBUG OFF

This part is printed correct the first time.
? "TEST"
? "the printer $DriveLetter $Path"

After the "If @ERROR = 0" part nothing is printed anymore and because i give a loop in the script everything including the ? "TEST" part is not printed anymore after the first loop.

The VarTypeName($Printer) returns 8, that would be a string.

The drive letter and the path i get out of a query script like this:

[Global Group]
Drive1="M: \\server01\sharename"
Drive2="Q: \\server02\sharename"

Downloaded the latest version from here 4.20 just to be sure. same results :-(

hope this helps a bit...

[ 04. July 2003, 13:03: Message edited by: dm330 ]
_________________________
greetz dm330, from the Netherlands

Top
#42394 - 2003-07-04 01:12 PM Re: KIX32 v4.20 doesn't print var?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Please show us more of your script including the the code where you read your INI file and split the string into $DriveLetter and $Path. Infact show us all your code and it would be much easier for us to help.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#42395 - 2003-07-04 01:18 PM Re: KIX32 v4.20 doesn't print var?
dm330 Offline
Fresh Scripter

Registered: 2003-05-27
Posts: 16
Loc: Netherlands
[Mad] saaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah!!! [Mad]

i think something changed between 4.12 and 4.20 with this part if you would use COLOR:
Color n/n ? "the printer $DriveLetter $Path"

Because if i only print:
? "the printer $DriveLetter $Path"

everthing works fine... [Eek!]

mmmh bugger

well tanx again for all the help guys

greetz from the Netherlands and have a nice weekend [Big Grin]
_________________________
greetz dm330, from the Netherlands

Top
#42396 - 2003-07-04 01:19 PM Re: KIX32 v4.20 doesn't print var?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
also, I must ask the code also as there is no loop code given.

oh, and remove all these:
If SetConsole ("SHOW") = 0 Endif

and setoption things from the execution part.
_________________________
!

download KiXnet

Top
#42397 - 2003-07-04 02:01 PM Re: KIX32 v4.20 doesn't print var?
dm330 Offline
Fresh Scripter

Registered: 2003-05-27
Posts: 16
Loc: Netherlands
see above

i worked it out...

It was the COLOR statement...

but tnx anyhow

[Big Grin]
_________________________
greetz dm330, from the Netherlands

Top
#42398 - 2003-07-04 02:20 PM Re: KIX32 v4.20 doesn't print var?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I saw it ofcourse.
but still my comments stay.

and even though you are glad now that your script runs, you should be considered why it didn't run before.
_________________________
!

download KiXnet

Top
#42399 - 2003-07-04 02:45 PM Re: KIX32 v4.20 doesn't print var?
dm330 Offline
Fresh Scripter

Registered: 2003-05-27
Posts: 16
Loc: Netherlands
If i try to post the script it says:

Sorry, we do not permit this HTML tag: Parenthesis in HTML tag

???

[Confused]

Well yes that's true...

If you read the 4.20 manual, it stat's

New commands, functions, macros

Enhanced commands, functions
COLOR COLOR now accepts variables as input.

So they did change something?

Well i can't use COLORS anymore, because then i can't print any text...

I think it's that you can use $var with the COLOR option and you have
to close it somehow before you can print something to the screen?

[ 04. July 2003, 14:49: Message edited by: dm330 ]
_________________________
greetz dm330, from the Netherlands

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.076 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

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