Page 1 of 1 1
Topic Options
#61701 - 2001-12-28 03:47 PM Problem with Kixforms
Anonymous
Unregistered


I have a small problem with Kixforms.
What you see is my new logonscriptwindow:

I want that where you can read "busy" that that value will change in "SUCCEED" or in "FAILURE" depending of the @error value.
But I don't know how to change that value.
This is what I have yet but it doesn't work:

code:

; Made at friday 28 december 2001
; You need kixforms for executing this script!

break on
$ip=enumipinfo(0,0)
$time=LEFT(@time,5)
$dd=RIGHT(@date,2)
$mm=SUBSTR(@date,LEN(@date)-4,2)


; From

$Form = createobject("kixtart.form")
$Form.Caption = "Welcome back @fullname"
$Form.Height = 400
$Form.Width = 400
$Form.FontSize = 9


; Frames

$Frame1 = $Form.Frame(13,1,350,150,"Network Information:")
$Frame2 = $Form.Frame(13,160,350,100,"Logon Processes:")
$Frame3 = $Form.Frame(13,270,350,100,"Common Info:")


; Labels

$Label1 = $Frame1.Label(13,25,185,20,"Privilege: @priv")
$label2 = $Frame1.Label(13,50,185,20,"Computername: @wksta")
$label3 = $Frame1.Label(13,75,185,20,"Domain: @domain")
$label4 = $Frame1.Label(13,100,185,20,"Logonserver: @lserver")
$label5 = $Frame1.Label(13,125,185,20,"IP-address: $ip")

$label6 = $Frame2.Label(13,25,185,20,"Synchronizing system time:")
$label7 = $Frame2.Label(13,50,185,20,"Mapping drives:")
$label8 = $Frame2.Label(13,75,185,20,"Set up some common settings:")

$label9 = $Frame3.Label(13,25,300,20,"@day $dd-$mm-@year $time")
$label10 = $Frame3.Label(13,50,300,20,"Written by systeembeheer EZW")
$label11 = $Frame3.Label(13,75,300,20,"Kixtart Version @kix with Kixforms plugin")


; Textboxes

$Systemtime = $Form.Label(220,184,100,20,"Busy")
$Systemtime.BorderStyle = 1

$Mapdrv = $Form.Label(220,209,100,20,"Busy")
$Mapdrv.BorderStyle = 1

$Commonset = $Form.Label(220,234,100,20,"Busy")
$Commonset.BorderStyle = 1


; Start

$Form.Show

SETTIME "\\taa-fs1"
IF @ERROR=0
$Systemtime = $Form.Label(220,184,100,20,"SUCCEED")
$systemtime.BorderStyle = 1
ELSE
$Systemtime = $Form.Label(220,184,100,20,"FAILURE")
$Systemtime.BorderStyle = 1
ENDIF

While $Form.GetEvent

LOOP
Exit


[ 28 December 2001: Message edited by: awinkel ]

Top
#61702 - 2001-12-28 05:02 PM Re: Problem with Kixforms
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
While I haven't used this, shouldn't the .label here be .value
code:

; Textboxes$Systemtime = $Form.Label(220,184,100,20,"Busy")$Systemtime.BorderStyle = 1$Mapdrv = $Form.Label(220,209,100,20,"Busy")$Mapdrv.BorderStyle = 1$Commonset = $Form.Label(220,234,100,20,"Busy")$Commonset.BorderStyle = 1

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#61703 - 2001-12-28 05:23 PM Re: Problem with Kixforms
Anonymous
Unregistered


If I change it I have no textboxes anymore.
Top
#61704 - 2001-12-28 05:34 PM Re: Problem with Kixforms
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Sander,

Use the caption property to set a label value, like this:


SETTIME "\\taa-fs1"
IF @ERROR=0
$Systemtime.Caption = "SUCCEED"
ELSE
$Systemtime.Caption = "FAILURE"
ENDIF

-Shawn

Top
#61705 - 2001-12-28 06:01 PM Re: Problem with Kixforms
Anonymous
Unregistered


Yes that works, thanks!

Do you know why there is a delay by building up the window?
I can see the text about the Network Information/Logon Processes and Common info after the script knows the results from the Logon Processes.
Previously the only thing I see is a equal grey window.

Top
#61706 - 2001-12-28 06:22 PM Re: Problem with Kixforms
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Yeah, like i say, kixforms doesn't really perform too well in a logon script ... it's meant to be used for windows interactive scripts ... login scripts are too "serial" or "top-to-bottom" to use kixforms effectively ... a better solution for login scripting (imho) is to use something like the logonscreen.exe activex control discussed elsewhere on this board ... it allows one to create a login window then to send messages to it at anytime during the logoin script ...

kixforms needs to have it's form built-up while invisible, then it has to get into it's event loop so that the controls can get initialized and visible ... so for example, the best way to fix the problem your having right now is to move your $form.show closer to your event loop, like this:


$Form.Show
While $Form.GetEvent
LOOP

-Shawn

Top
#61707 - 2001-12-28 06:50 PM Re: Problem with Kixforms
Alex.H Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 406
Loc: France
Shawn, Awinkel,
Did one of you try the logonscr.k2k script from KixwinVB in logon process ?
_________________________
? getobject(Kixtart.org.Signature)

Top
#61708 - 2001-12-28 06:54 PM Re: Problem with Kixforms
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Yeah I did - that was pretty impressive ! Especially the progress bar !


-Shawn

Top
#61709 - 2001-12-28 09:53 PM Re: Problem with Kixforms
Anonymous
Unregistered


Alex, I have didn't try it but I will give it a change in a couple of days.
I want to tell you how I like it if you want.

Top
#61710 - 2001-12-28 10:52 PM Re: Problem with Kixforms
Anonymous
Unregistered


Alex, I have see the demo and I found it impressive.
I think KixwinVB will be very good for GUI logonscript.
When I have time I will convert my current dosscript into a kixwinvb script.

Top
#61711 - 2001-12-28 11:08 PM Re: Problem with Kixforms
Alex.H Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 406
Loc: France
It was for this purpose (well, it was, as actually most of us here see KixwinVB and KixForms as complete GUI support for kixtart)
When i was creating it, i had in mind old kixwin for the shape, and something more complete than Logonscreen.exe Active-X control, as i could do some stuff with it, but not exactly what i wanted. As usual,if you're not happy, do it yourself. So i did.

It seems that the funny part of KWVB is that it's completely asynchronous, and works a little better with logon process. (KF too, but only with peekevent, if i'm right. Shawn ?)
As opposite, i don't think i can add the same KF getevent (a real wait for input before return the event).

_________________________
? getobject(Kixtart.org.Signature)

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 581 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.06 seconds in which 0.027 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