#90066 - 2002-12-01 07:46 AM
KIXForms and Loginscript
|
KIXKicks
Starting to like KiXtart
Registered: 2002-07-26
Posts: 177
Loc: Vancouver, WA
|
I have been using a KiXtart Loginscript for awhile now and it has worked pretty well. I wanted to try a GUI Interface (using KiXforms) instead of the plain DOS looking interface that I had written.
I used Chris S. loginscript example (written using KiXforms). I was 80% done when I ran into a problem. I want a window to popup and provide a field for the user to enter a password. I need to capture what is enter and set that to a variable.
This is what I have come up with and it does not work as I need it to. Given my newbie experience with KiXforms, I was hoping one of you experts should shed some light:
code:
$FORMPASS=CREATEOBJECT("KIXTART.FORM") $FORMPASS.SIZE=200,100 $FORMPASS.SYSMENU=0 $FORMPASS.TEXT="Enter Network Password" $FORMPASS.CENTER $LABELPASSINPUT=$FORMPASS.TEXTBOX("",20,10,145,20) $LABELPASSINPUT.PASSWORDCHAR="*" $LABELPASSINPUTBUTTON=$FORMPASS.COMMANDBUTTON("OK") $LABELPASSINPUTBUTTON.CENTER $LABELPASSINPUTBUTTON.DEFAULT=TRUE $LABELPASSINPUTBUTTON.ONCLICK="GETPASS($LABELPASSINPUT.VALUE)" $PASS=$LABELPASSINPUT.VALUE
$FORMPASS.SHOW
2 problems with it. One it seems to continue on with the script (passing the area where the password would be used, so it fails). Two is finding out how to set the $PASS variable to the value of what the user enters.
The window is a simple window with a blank field and an OK button. When the user enters their password, a '*' is displayed for each character. It seems that the loginscript should wait until the ONCLICK property is activated.
Thanks in advanced,
KIXKicks [ 01. December 2002, 07:49: Message edited by: KIXKicks ]
|
|
Top
|
|
|
|
#90068 - 2002-12-01 08:17 AM
Re: KIXForms and Loginscript
|
KIXKicks
Starting to like KiXtart
Registered: 2002-07-26
Posts: 177
Loc: Vancouver, WA
|
That does help, however the window I have create never goes away so it stays on this portion of the code. I tried to change the code to this:
code:
$FORMPASS=CREATEOBJECT("KIXTART.FORM") $FORMPASS.SIZE=200,100 $FORMPASS.SYSMENU=0 $FORMPASS.TEXT="Enter Network Password" $FORMPASS.CENTER $LABELPASSINPUT=$FORMPASS.TEXTBOX("",20,10,145,20) $LABELPASSINPUT.PASSWORDCHAR="*" $LABELPASSINPUTBUTTON=$FORMPASS.COMMANDBUTTON("OK",100,40,40,20) $LABELPASSINPUTBUTTON.DEFAULT=TRUE $LABELPASSINPUTBUTTON.ONCLICK=$FORMPASS.HIDE $PASS=$LABELPASSINPUT.VALUE $FORMPASS.SHOW WHILE $FORMPASS.VISIBLE $=EXECUTE($FORMPASS.DOEVENTS()) LOOP
But it doesn't work. [ 01. December 2002, 08:18: Message edited by: KIXKicks ]
|
|
Top
|
|
|
|
#90072 - 2002-12-01 08:35 AM
Re: KIXForms and Loginscript
|
KIXKicks
Starting to like KiXtart
Registered: 2002-07-26
Posts: 177
Loc: Vancouver, WA
|
By the way...BBChecker II is pretty awesome!
Here is the latest code:
code:
$FORMPASS=CREATEOBJECT("KIXTART.FORM") $FORMPASS.SIZE=200,100 $FORMPASS.SYSMENU=0 $FORMPASS.TEXT="Enter Network Password" $FORMPASS.CENTER $LABELPASSINPUT=$FORMPASS.TEXTBOX("",20,10,145,20) $LABELPASSINPUT.PASSWORDCHAR="*" $LABELPASSINPUTBUTTON=$FORMPASS.COMMANDBUTTON("OK",100,40,40,20) $LABELPASSINPUTBUTTON.DEFAULT=TRUE $LABELPASSINPUTBUTTON.ONCLICK="$$FORMPASS.HIDE" $PASS=$LABELPASSINPUT.VALUE $FORMPASS.SHOW WHILE $FORMPASS.VISIBLE $=EXECUTE($FORMPASS.DOEVENTS) LOOP
Do I need the LOOP at the end?
|
|
Top
|
|
|
|
#90076 - 2002-12-01 09:14 PM
Re: KIXForms and Loginscript
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 1114 anonymous users online.
|
|
|