#42380 - 2003-07-03 11:49 AM
KIX32 v4.20 doesn't print var?
|
dm330
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
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.
|
Top
|
|
|
|
#42382 - 2003-07-03 02:43 PM
Re: KIX32 v4.20 doesn't print var?
|
dm330
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
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
|
Top
|
|
|
|
#42385 - 2003-07-03 02:51 PM
Re: KIX32 v4.20 doesn't print var?
|
Howard Bullock
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.
|
Top
|
|
|
|
#42387 - 2003-07-03 02:55 PM
Re: KIX32 v4.20 doesn't print var?
|
dm330
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
|
|
|
|
#42389 - 2003-07-03 03:01 PM
Re: KIX32 v4.20 doesn't print var?
|
Howard Bullock
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.
|
Top
|
|
|
|
#42390 - 2003-07-03 03:11 PM
Re: KIX32 v4.20 doesn't print var?
|
dm330
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
|
|
|
|
#42393 - 2003-07-05 12:58 AM
Re: KIX32 v4.20 doesn't print var?
|
dm330
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
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.
|
Top
|
|
|
|
#42395 - 2003-07-04 01:18 PM
Re: KIX32 v4.20 doesn't print var?
|
dm330
Fresh Scripter
Registered: 2003-05-27
Posts: 16
Loc: Netherlands
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 507 anonymous users online.
|
|
|