|
|
|||||||
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? |
||||||||
|
|
|||||||
What does VarTypeName($Printer) return? You may a problem somewhere else in your program that is not populating the variable. |
||||||||
|
|
|||||||
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? |
||||||||
|
|
|||||||
How about not encapsulating the vars in quotes? For example, you have: code:or..? "The $printer is installed" code:try this -Color n/n ? "$DriveLetter $Path" code:or..? "The "+$printer+" is installed" code:HTH,Color n/n ? $DriveLetter $Path Kent |
||||||||
|
|
|||||||
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) |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
Are you sure about the versions? quote: |
||||||||
|
|
|||||||
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? |
||||||||
|
|
|||||||
So, did you try our suggestions and check the vartype? Please report back with the vartype results and/or post your script. |
||||||||
|
|
|||||||
If you have valid data when the variable is assigned, check it again just before printing it to the screeen. |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
So, now you're saying you don't get any output at all? 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. |
||||||||
|
|
|||||||
jens, just relax and wait his response. bet everything is ok but having some weird dim- or similar issue there... |
||||||||
|
|
|||||||
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 ] |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
saaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah!!! 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... mmmh bugger well tanx again for all the help guys greetz from the Netherlands and have a nice weekend |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
see above i worked it out... It was the COLOR statement... but tnx anyhow |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
If i try to post the script it says: Sorry, we do not permit this HTML tag: Parenthesis in HTML tag ??? 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 ] |
||||||||
|
|
|||||||
I'm not surprised you are not seeing anything. quote:The "n" in the color statement refers to "normal", which is black. You are printing black text on a black background, and that makes it kinda hard to read |
||||||||
|
|
|||||||
eh... normal is for black? like, n=black text/n=black background... should use more console stuff to remember these. good pick anyway there howarth. |
||||||||
|
|
|||||||
mmmmmmmmmmmmh! know i,am feeling really stupid quote I'm not surprised you are not seeing anything. But the strange thing is that i see the printout corectly with kix4.20 with the color n/n black/black in gray-style? Owkay then well tanx for all the support here guys... [ 07. July 2003, 08:38: Message edited by: dm330 ] |