Page 1 of 1 1
Topic Options
#119709 - 2004-05-17 09:26 PM RedirectOuput confusion
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
I have a 400 line login script that was working fine before I placed in a if RedirectOutput statement. The code I inputted is as follows:
Code:
  
;If RedirectOutput($rootserver + "ClnWinLogon\output\"+@WKSTA+".txt") = 0
; ? "Workstation = " + @WKSTA
; ? "UserName = " + @USERID
; ? "Opened Log file at " + @DATE + " " + @TIME
;Else
; ? "Failed to log. Please contact It.
;EndIf




Once this was placed in the script, it appeared to miss the first if statement right after that. (The only line between the first if statement and the end of this section was setting a variable).

Any ideas on what may have happened?

Thanks

Top
#119710 - 2004-05-17 09:46 PM Re: RedirectOuput confusion
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Use your code without ";"


lets get serious... I hope you do use it without ;

Did you run the script in debug mode??
Code:
If RedirectOutput($rootserver + "ClnWinLogon\output\"+@WKSTA+".txt") = 0  



Is $rootserver =server1\ or $rootserver=server1 ???

If it is $rootserver=server1

your code must be:

Code:
If RedirectOutput($rootserver + "\ClnWinLogon\output\"+@WKSTA+".txt") = 0  




Edited by Co (2004-05-17 09:54 PM)
_________________________
Co


Top
#119711 - 2004-05-17 09:53 PM Re: RedirectOuput confusion
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
Yes, I did use it without the comment(;). I had to do that to quickly fix it because I was working on production code. Ya, Ya I know... VERY BAD practice

Yes, I ran it in debug mode, but it is hard to really tell what is going on in this case. It skipped about 200 lines of my script (due to haveing a master if statement in it). Not haveing lines on the debug lines made it a bit harder too.

Top
#119712 - 2004-05-17 09:57 PM Re: RedirectOuput confusion
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
I have edited my last post while you were replying to it. Please read it again...
_________________________
Co


Top
#119713 - 2004-05-17 09:59 PM Re: RedirectOuput confusion
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
at least this is wrong:
; ? "Failed to log. Please contact It.

in english, it's missing the close quote.
_________________________
!

download KiXnet

Top
#119714 - 2004-05-18 03:26 PM Re: RedirectOuput confusion
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
Apparently my reply did not make it through yesterday.

The qoute was the problem. Thanks for all the help.

I am going to have to stop trying to rush through the changes to the script. I ended up with egg on my face 2 times yesterday because of this. It did help in a few places though. I have revised it to show more of the errors

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 640 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.054 seconds in which 0.024 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