Page 1 of 1 1
Topic Options
#167436 - 2006-09-11 03:22 PM leading 0
csb3358 Offline
Fresh Scripter

Registered: 2003-10-21
Posts: 5
Loc: Georgia
I am trying to redirect output to a text file (actually a .vnc file) which has always worked great, when a user logs in it creates a file called "FULLNAME.VNC" on a network folder and our admins can double click the icon and see the users machine. I am trying to upgrade our VNC to the purchased version. when I do this I am unable to double click the icon any longer, I get "bad name/value pair". However, when I manually remove the leading 0 from the text file it works fine. My question is how do I force kixtart NOT to put the leading 0 in when I redirect output. Below is the code I use if you need it.

Thanks for the help.

---Start of code---
$IPNUM=(LTrim(SubStr(@IPADDRESS0,1,3)))+"."+(LTrim(SubStr(@IPADDRESS0,5,3)))+"."+(LTrim(SubStr(@IPADDRESS0,9,3)))+"."+(LTrim(SubStr(@IPADDRESS0,13,3)))

RedirectOutput("\\servername\sharename\@FULLNAME.vnc",1)
? "[connection]"
? "host=$IPNUM"
? "port=5900"
? "password=yeahsure"
? " "
? "[options]"
? "use_encoding_0=1"
? "use_encoding_1=1"
? "use_encoding_2=1"
? "use_encoding_3=1"
? "use_encoding_4=1"
? "use_encoding_5=1"
? "preferred_encoding=5"
? "restricted=0"
? "fullscreen=0"
? "8bit=0"
? "shared=0"
? "swapmouse=0"
? "belldeiconify=0"
? "emulate3=1"
? "emulate3timeout=100"
? "emulate3fuzz=4"
? "disableclipboard=0"
? "localcursor=1"
? "scale_num=1"
? "scale_den=1"
? "viewonly=1"

EndIf
---End of code---

Top
#167437 - 2006-09-11 03:40 PM Re: leading 0
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Code:

Dim $SO
...
$SO = RedirectOutput("\\servername\sharename\@FULLNAME.vnc",1)
...


Top
#167438 - 2006-09-11 03:49 PM Re: leading 0
csb3358 Offline
Fresh Scripter

Registered: 2003-10-21
Posts: 5
Loc: Georgia
That was it...nice and easy...thanks for the help Witto!
Top
#167439 - 2006-09-12 05:55 AM Re: leading 0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also the FAQ Forum under Why does the console display zeros and ones (amongst others)? and Suppressing Results when running scripts
_________________________
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 323 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.095 seconds in which 0.059 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