Page 1 of 1 1
Topic Options
#38664 - 2003-04-02 11:08 AM Modified AT()
jtrainer Offline
Fresh Scripter

Registered: 2002-03-06
Posts: 36
Collective,

I'd like to use the AT function, however....

I have grown to appreciate the Red Hat startup/shutdown OK and Error indicators. I have recreated this with my script, however, I cannot place the [OK] to begin at a specified collum.

When processing the logon/logoff script, my [OK]'s move left and right, depending on the lenght of the informational string provided. I.E.

Now mapping U: to \\server\share [OK]
Now mapping U: to \\diffserver\longshare [OK]
Now mapping U: to \\srva\anothershare [OK]

How can I get the AT() function to use a ('leave me alone value', 60)?

To simply state it, I want to be able to write at collum X, I don't care what row I'm at.

Thanks
jtrainer
_________________________
Bumped my mouse again, time to reboot Windoze....
Top
#38665 - 2003-04-02 11:29 AM Re: Modified AT()
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
That'd require an enhancement in KiX (which I am actually really not aware of if it is already there [Roll Eyes] )

Wait-O
_________________________



Top
#38666 - 2003-04-02 11:43 AM Re: Modified AT()
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I posted a UDF a few days ago which is used for formatted output, this would do the jobs for you.

The UDF is in this thread

Call it like this:
code:
udfFormatField("Now mapping U: to whatever",59,"L")

That will leave the cursor at column 60.

[ 02. April 2003, 11:45: Message edited by: Richard H. ]

Top
#38667 - 2003-04-02 11:52 AM Re: Modified AT()
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
A really simple solution would be:
code:
$sSpace10="          "
$sSpace80=$sSpace10+$sSpace10+$sSpace10+$sSpace10+$sSpace10+$sSpace10+$sSpace10+$sSpace10
...
Left("Mapping U: to whatever"+$sSpace80,59)


Top
#38668 - 2003-04-02 11:59 AM Re: Modified AT()
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Thanx Richard,

that gives me the opportunity to have a lunch break now [Big Grin]
_________________________



Top
#38669 - 2003-04-02 05:34 PM Re: Modified AT()
jtrainer Offline
Fresh Scripter

Registered: 2002-03-06
Posts: 36
All,

Thanks for the input. I'll be playing (time permitting) today and see how this works. Initial test is the Richard's second input work fine. I want to play with the function too.

jt
_________________________
Bumped my mouse again, time to reboot Windoze....
Top
#38670 - 2003-04-03 10:12 AM Re: Modified AT()
jtrainer Offline
Fresh Scripter

Registered: 2002-03-06
Posts: 36
All,

Hats of the Richard. His number 2 response wrked fine. Still questions loom about.

code:
  
$sSpace10=" "
$sSpace80=$sSpace10+$sSpace10+$sSpace10+$sSpace10+$sSpace10+$sSpace10+$sSpace10+$sSpace10
...
Left("Mapping U: to \MyServer\MyShare\@USERID"+$sSpace80,59)

In the above code, I have used the UserID macro. This does not reflect on the screen the users ID. How can I modify the line to allow to display the users ID?

Thanks
jt
_________________________
Bumped my mouse again, time to reboot Windoze....
Top
#38671 - 2003-04-03 10:20 AM Re: Modified AT()
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
What operating system are you running this on?

If Win9x, try the @WUSERID macro, @USERID is for NT.

You could also try the environment variable %USERNAME%

Finally, it is good coding practice to place any variables outside the string delimiters, so:
code:
Left("Mapping U: to \MyServer\MyShare\"+@USERID+$sSpace80,59)


Top
#38672 - 2003-04-08 03:02 PM Re: Modified AT()
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I've just posted details of a utility here which you can use to get the current cursor position.
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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.156 seconds in which 0.122 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