Page 1 of 2 12>
Topic Options
#167134 - 2006-09-08 11:16 PM Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
Hi, I am very new to Kix scripting; and I need a lot of help with a login system I will be using on a network. Everytime I run the script I recieve:

Script Error: unknown command !
$fromForm.Caption = " (System) Login"

system is the name of the network

Here is the whole sript in full:
Code:
   
;***************************************************************
;***************************************************************
;**
;** Network Login
;** Netlogon.kix
;**
;** Dependencies:
;**
;** Kixforms.dll
;**
;** V.3.2.01 28/12/2004
;** V.3.2.02 13/01/2005 Check for and register .DLL
;** V.3.2.03 14/01/2005 Map network drives
;** V.3.2.04 15/01/2005 Log user/station details
;** V.3.2.05 26/02/2005 Fixed problem with incorrect drive mapping displayed
;** V.3.2.06 26/02/2005 Removed display name from greeting
;** V.3.2.07 20/03/2005 Added AV call for Somerset sites
;** V.3.2.08 07/04/2005 Added RegFixes section. Checkfor and install KB888254
;** V.3.2.09 24/05/2005 Split into seperate scripts
;**
$strVersion = "V.3.2.09(b)"
;**
;***************************************************************
;***************************************************************

;** Dim some global vars.

Dim $frmForm
Dim $fraBanner, $fraForm
;Dim $prgProgress
Dim $Hour

;** Set some global vars.

$LSD = @LServer + "\netlogon"
$WaitTime = 1 ;** Time to wait after each task
$DoProgressCalls = 25 ;** Maximum times DoProgress is called
$Step = 100/$DoProgressCalls ;** Increment progress bar
$Blanker = " " ;** Blank captions

;****************
;** START HERE **
;***************

Gosub "CheckDLL"
Gosub "DOFORM"

$frmForm.Show

Call "$LSD\MapDrives.kix"

EXIT 1

;*************
;**END HERE **
;*************


;*************************************************************
;** SUBS BELOW **
;*************************************************************


:CheckDLL

;*****************************************
;** Check that KIXFORMS.DLL is registered and **
;** copy and register if not **
;*****************************************

$ReturnCode = KEYEXIST("HKEY_CLASSES_ROOT\KixTart.Form\CLSID")

IF $ReturnCode = 0 ;** KixForms not registered
;** Copy .DLL
$SourceFile = @LServer + "\netlogon\kixforms.dll"
$Value = ReadValue( "HKLM\System\CurrentControlset\Control\Windows", "SystemDirectory")
$Destination = ExpandEnvironmentVars( $Value )
COPY $SourceFile $Destination
;** Register .DLL silently
$CMDLine = "regsvr32 /s " + $Destination + "\kixforms.dll"
$ObjShell = CreateObject("WScript.Shell")
$ObjShell.run($CMDLine, 1, true)
;** Kill shell object
$ObjShell = nothing
ENDIF
;** Wait for registration to take effect
sleep 2
RETURN

:DoProgress

$prgProgress.value = $prgProgress.value + $Step

Return

:DOFORM

;***************
;** Main form **
;***************
$frmForm = CREATEOBJECT("Kixtart.FORM")
$frmForm.Caption = " system Login"
$frmForm.sysMenu = 0
$frmForm.Height = 300
$frmForm.Width = 450
$frmForm.FontName = "Verdana"
$frmForm.FontSize = 9
$frmForm.center


;*************
;** Banner **
;*************
$fraBanner = $frmForm.PictureBox
;$fraBanner.IMAGE = "C:\my projects\NetCare3\Images\NC32SM.gif"
$fraBanner.BACKCOLOR = $frmForm.RGB(255,255,255)
$fraBanner.WIDTH = $frmForm.width - 4
$fraBanner.HEIGHT = 60
$fraBanner.LEFT = -2
$fraBanner.TOP = -2

;** Draw On the banner **
$fraBanner.FONTSIZE = 14
$fraBanner.FONTNAME = "verdana"
$fraBanner.FONTBOLD = 1
$fraBanner.FONTITALIC = 1
$fraBanner.ForeColor = $frmForm.RGB(0, 0, 192)
$fraBanner.PrintXY (10,0,"NetLogon 3.2 : Netlogon.kix")
$fraBanner.FontItalic = 0
$fraBanner.FONTSIZE = 8
$fraBanner.ForeColor = $frmForm.RGB(0,100,100)
$fraBanner.PrintXY (10,20,$strVersion + " Powered by Kixforms ")
$fraBanner.FONTSIZE = 9
$fraBanner.PrintXY (10,35,"D5PS2Z0J Systems")
$fraBanner.FONTBOLD = 0
$fraBanner.FONTSIZE = 10

;******************
;** Progress Bar **
;******************
$prgProgress = $frmForm.ProgressBar
$prgProgress.width = $frmForm.width - 10
$prgProgress.left = 2
$prgProgress.height = 20
$prgProgress.top = 245;$frmForm.height - $prgProgress.height - 5
$prgProgress.style = 0

;****************
;** Main Frame **
;****************
$fraMain = $frmForm.PictureBox
$fraMain.BACKCOLOR = $frmForm.RGB(255,255,255)
$fraMain.WIDTH = $frmForm.width
$fraMain.HEIGHT = 182 ;$frmForm.height - $fraBanner.height - 35
$fraMain.LEFT = -2
$fraMain.TOP = $fraBanner.Height - 5

$lblJob = $fraMain.label
$lblJob.FONTSIZE = 10
$lblJob.top = 80
$lblJob.width = 440 ;fraMain.width - 20
$lblJob.left = 10

$lblTask = $fraMain.label
$lblTask.FONTSIZE = 10
$lblTask.top = 120
$lblTask.width = 440 ;fraMain.width - 20
$lblTask.left = 50


;** Draw on the frame **
;** Greeting
$Hour = val(trim(left(@Time,2)))
If $Hour < 12
$Greeting = "Good Morning "
else
if $Hour < 17
$Greeting = "Good Afternoon "
else
$Greeting = "Good Evening "
endif
endif
$fraMain.FONTSIZE = 11
$fraMain.FONTNAME = "verdana"
$fraMain.FONTBOLD = 1
$fraMain.ForeColor = $frmForm.RGB(0,100,100)
$fraMain.PrintXY (10,10,$Greeting)
$fraMain.printXY (10,40,"Please wait while your logon script executes...")



Return


;*******************************
;*******************************
;** END OF FILE **
;*******************************
;*******************************


Sorry if my reply may be slow; my moden suffered a power surge and I am back on dial-up for the time!



04nunhucks@gmail.com

Top
#167135 - 2006-09-08 11:30 PM Re: Login Scripts
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, with above code the error you gave just ain't possible as there is no such line in the script.

may I ask, why do you shell with wscript and not directly with kixtart shell?

Top
#167136 - 2006-09-09 06:33 AM Re: Login Scripts
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You realize the the KiXforms install requires local admin rights? Thus your suers would all have to be local admins.
_________________________
There are two types of vessels, submarines and targets.

Top
#167137 - 2006-09-09 07:22 AM Re: Login Scripts
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hi 04nunhucks and Welcome to KiXtart.org and KiXforms,

Just a few small suggestions;

It is better to create separate Functions rather then using ‘Goto/Return’ statements.

"Kixtart.Form" has been replaced with "Kixtart.System".

Once the ‘$System’ object has been created it is a good idea to verify that it was actually created, so that if it was not created then you will know that there is a problem with the install and or functionality of KiXforms.

For the form to function you must have a loop for the doevents() of the form.

Also what ver of KiXforms are you using?
You can get the most current ver over at KiXforms.org

This is your script/form with the modifications:

Code:

;***************************************************************
;***************************************************************
;**
;** Network Login
;** Netlogon.kix
;**
;** Dependencies:
;**
;** Kixforms.dll
;**
;** V.3.2.01 28/12/2004
;** V.3.2.02 13/01/2005 Check for and register .DLL
;** V.3.2.03 14/01/2005 Map network drives
;** V.3.2.04 15/01/2005 Log user/station details
;** V.3.2.05 26/02/2005 Fixed problem with incorrect drive mapping displayed
;** V.3.2.06 26/02/2005 Removed display name from greeting
;** V.3.2.07 20/03/2005 Added AV call for Somerset sites
;** V.3.2.08 07/04/2005 Added RegFixes section. Checkfor and install KB888254
;** V.3.2.09 24/05/2005 Split into seperate scripts
;**
$strVersion = "V.3.2.09(b)"
;**
;***************************************************************
;***************************************************************

;** Dim some global vars.

Dim $frmForm
Dim $fraBanner, $fraForm
;Dim $prgProgress
Dim $Hour

;** Set some global vars.

$LSD = @LServer + "\netlogon"
$WaitTime = 1 ;** Time to wait after each task
$DoProgressCalls = 25 ;** Maximum times DoProgress is called
$Step = 100/$DoProgressCalls ;** Increment progress bar
$Blanker = " " ;** Blank captions

;******************
;** START HERE **
;******************

CheckDLL()
DOFORM()

Call "$LSD\MapDrives.kix"

Exit 1

;**************
;**END HERE **
;**************


;*************************************************************
;** SUBS BELOW **
;*************************************************************


Function CheckDLL()

;*************************************************
;** Check that KIXFORMS.DLL is registered and **
;** copy and register if not **
;*************************************************

$ReturnCode = KeyExist("HKEY_CLASSES_ROOT\KixTart.Form\CLSID")

If $ReturnCode = 0 ;** KixForms not registered
;** Copy .DLL
$SourceFile = @LServer + "\netlogon\kixforms.dll"
$Value = ReadValue( "HKLM\System\CurrentControlset\Control\Windows", "SystemDirectory")
$Destination = ExpandEnvironmentVars( $Value )
Copy $SourceFile $Destination
;** Register .DLL silently
$CMDLine = "regsvr32 /s " + $Destination + "\kixforms.dll"
$ObjShell = CreateObject("WScript.Shell")
$ObjShell.run($CMDLine, 1, true)
;** Kill shell object
$ObjShell = nothing
EndIf
;** Wait for registration to take effect
Sleep 2

EndFunction

Function DoProgress()

$prgProgress.value = $prgProgress.value + $Step

EndFunction

Function DOFORM()

;***************
;** Main form **
;***************

Break On
$System = CreateObject("Kixtart.System")
If Not $System
$nul= MessageBox("KiXforms Not Initiated. This Script Will Now Close.","Error",16)
Quit()
EndIf

$frmForm = $System.Form()
$frmForm.Text = " system Login"
$frmForm.sysMenu = 0
$frmForm.Height = 300
$frmForm.Width = 450
$frmForm.FontName = "Verdana"
$frmForm.FontSize = 9

;*************
;** Banner **
;*************
$fraBanner = $frmForm.Controls.PictureBox()
;$fraBanner.IMAGE = "C:\my projects\NetCare3\Images\NC32SM.gif"
$fraBanner.BACKCOLOR = $frmForm.RGB(255,255,255)
$fraBanner.WIDTH = $frmForm.width - 4
$fraBanner.HEIGHT = 60
$fraBanner.LEFT = -2
$fraBanner.TOP = -2

;** Draw On the banner **
$fraBanner.FONTSIZE = 14
$fraBanner.FONTNAME = "verdana"
$fraBanner.FONTBOLD = 1
$fraBanner.FONTITALIC = 1
$fraBanner.ForeColor = $frmForm.RGB(0, 0, 192)
$fraBanner.PrintXY (10,0,"NetLogon 3.2 : Netlogon.kix")
$fraBanner.FontItalic = 0
$fraBanner.FONTSIZE = 8
$fraBanner.ForeColor = $frmForm.RGB(0,100,100)
$fraBanner.PrintXY (10,20,$strVersion + " Powered by Kixforms ")
$fraBanner.FONTSIZE = 9
$fraBanner.PrintXY (10,35,"D5PS2Z0J Systems")
$fraBanner.FONTBOLD = 0
$fraBanner.FONTSIZE = 10

;******************
;** Progress Bar **
;******************
$prgProgress = $frmForm.Controls.ProgressBar()
$prgProgress.width = $frmForm.width - 10
$prgProgress.left = 2
$prgProgress.height = 20
$prgProgress.top = 245;$frmForm.height - $prgProgress.height - 5
$prgProgress.style = 0

;****************
;** Main Frame **
;****************
$fraMain = $frmForm.Controls.PictureBox()
$fraMain.BACKCOLOR = $frmForm.RGB(255,255,255)
$fraMain.WIDTH = $frmForm.width
$fraMain.HEIGHT = 182 ;$frmForm.height - $fraBanner.height - 35
$fraMain.LEFT = -2
$fraMain.TOP = $fraBanner.Height - 5

$lblJob = $fraMain.Controls.label()
$lblJob.FONTSIZE = 10
$lblJob.top = 80
$lblJob.width = 440 ;fraMain.width - 20
$lblJob.left = 10

$lblTask = $fraMain.Controls.label()
$lblTask.FONTSIZE = 10
$lblTask.top = 120
$lblTask.width = 440 ;fraMain.width - 20
$lblTask.left = 50


;** Draw on the frame **
;** Greeting
$Hour = Val(Trim(Left(@Time,2)))
If $Hour < 12
$Greeting = "Good Morning "
Else
If $Hour < 17
$Greeting = "Good Afternoon "
Else
$Greeting = "Good Evening "
EndIf
EndIf
$fraMain.FONTSIZE = 11
$fraMain.FONTNAME = "verdana"
$fraMain.FONTBOLD = 1
$fraMain.ForeColor = $frmForm.RGB(0,100,100)
$fraMain.PrintXY (10,10,$Greeting)
$fraMain.printXY (10,40,"Please wait while your logon script executes...")

$frmForm.center
$frmForm.Show

While $frmForm.visible
$= Execute($frmForm.doevents())
Loop

EndFunction

;*******************************
;*******************************
;** END OF FILE **
;*******************************
;*******************************



Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)


Edited by benny69 (2006-09-09 07:50 AM)

Top
#167138 - 2006-09-10 08:02 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
Hi, my users are local admins and thank you for the welcomes. The version of Kixforms I am using is 4.53.0.0 RC1. When I use the modification above I recieve the error message "KiXforms Not Initiated. This Script Will Now Close."
Is system meant to be the NetBIOS?- I guess not, either way I get the message way (substituting system for NetBIOS name)

Top
#167139 - 2006-09-10 08:10 PM Re: Login Scripts
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
The error that you are getting is telling you that KixForms is not installed on that machine.

Code:

Function CheckDLL()

;*************************************************
;** Check that KIXFORMS.DLL is registered and **
;** copy and register if not **
;*************************************************

$ReturnCode = KeyExist("HKEY_CLASSES_ROOT\KixTart.Form\CLSID")

If $ReturnCode = 0 ;** KixForms not registered
;** Copy .DLL
$SourceFile = @LServer + "\netlogon\kixforms.dll"
$Value = ReadValue( "HKLM\System\CurrentControlset\Control\Windows", "SystemDirectory")
$Destination = ExpandEnvironmentVars( $Value )
Copy $SourceFile $Destination
;** Register .DLL silently
$CMDLine = "regsvr32 /s " + $Destination + "\kixforms.dll"
$ObjShell = CreateObject("WScript.Shell")
$ObjShell.run($CMDLine, 1, true)
;** Kill shell object
$ObjShell = nothing
EndIf
;** Wait for registration to take effect
Sleep 2

EndFunction


This will try to install the KiXForms DLL for you, but if you do not have it located in this specified locations
Quote:

$SourceFile = @LServer + "\netlogon\kixforms.dll"


It will not be able to install it for you.

Top
#167140 - 2006-09-10 08:12 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
Jooel:may I ask, why do you shell with wscript and not directly with kixtart shell?

I dont have a definate reason for that question.

Top
#167141 - 2006-09-10 08:18 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
Hi gargoyle, this is the error

Expected ")"

Line 122


Edited by 04nunhucks (2006-09-10 08:20 PM)

Top
#167142 - 2006-09-10 08:25 PM Re: Login Scripts
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
And what is Line 122?
Top
#167143 - 2006-09-10 08:32 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
There is this line:$fraBanner.WIDTH = $frmForm.width - 4 in the banner section. there is a line in grey at the top:
" system Login0300450Verdana9"

Top
#167144 - 2006-09-10 08:54 PM Re: Login Scripts
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
04nunhucks,
Quote:


The version of Kixforms I am using is 4.53.0.0 RC1




This is the ver of KiXtart not the ver of KiXforms.

What is the line just above ‘$fraBanner.WIDTH = $frmForm.width - 4’
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#167145 - 2006-09-10 09:03 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
version is 4.3.0.45
Line abover is:$fraBanner.BACKCOLOR = $frmForm.RGB(255,255,255)

Code:
 ;***************************************************************
;***************************************************************
;**
;** Network Login
;** Netlogon.kix
;**
;** Dependencies:
;**
;** Kixforms.dll
;**
;** V.3.2.01 28/12/2004
;** V.3.2.02 13/01/2005 Check for and register .DLL
;** V.3.2.03 14/01/2005 Map network drives
;** V.3.2.04 15/01/2005 Log user/station details
;** V.3.2.05 26/02/2005 Fixed problem with incorrect drive mapping displayed
;** V.3.2.06 26/02/2005 Removed display name from greeting
;** V.3.2.07 20/03/2005 Added AV call for Somerset sites
;** V.3.2.08 07/04/2005 Added RegFixes section. Checkfor and install KB888254
;** V.3.2.09 24/05/2005 Split into seperate scripts
;**
$strVersion = "V.3.2.09(b)"
;**
;***************************************************************
;***************************************************************

;** Dim some global vars.

Dim $frmForm
Dim $fraBanner, $fraForm
;Dim $prgProgress
Dim $Hour

;** Set some global vars.

$LSD = @LServer + "\netlogon"
$WaitTime = 1 ;** Time to wait after each task
$DoProgressCalls = 25 ;** Maximum times DoProgress is called
$Step = 100/$DoProgressCalls ;** Increment progress bar
$Blanker = " " ;** Blank captions

;******************
;** START HERE **
;******************

CheckDLL()
DOFORM()

Call "$LSD\MapDrives.kix"

Exit 1

;**************
;**END HERE **
;**************


;*************************************************************
;** SUBS BELOW **
;*************************************************************


Function CheckDLL()

;*************************************************
;** Check that KIXFORMS.DLL is registered and **
;** copy and register if not **
;*************************************************

$ReturnCode = KeyExist("HKEY_CLASSES_ROOT\KixTart.Form\CLSID")

If $ReturnCode = 0 ;** KixForms not registered
;** Copy .DLL
$SourceFile = @LServer + "\netlogon\kixforms.dll"
$Value = ReadValue( "HKLM\System\CurrentControlset\Control\Windows", "SystemDirectory")
$Destination = ExpandEnvironmentVars( $Value )
Copy $SourceFile $Destination
;** Register .DLL silently
$CMDLine = "regsvr32 /s " + $Destination + "\kixforms.dll"
$ObjShell = CreateObject("WScript.Shell")
$ObjShell.run($CMDLine, 1, true)
;** Kill shell object
$ObjShell = nothing
EndIf
;** Wait for registration to take effect
Sleep 2

EndFunction

Function DoProgress()

$prgProgress.value = $prgProgress.value + $Step

EndFunction

Function DOFORM()

;***************
;** Main form **
;***************

Break On
$system = CreateObject("Kixtart.System")
If Not $system
$nul= MessageBox("KiXforms Not Initiated. This Script Will Now Close.","Error",16)
Quit()
EndIf

$frmForm = $System.Form()
$frmForm.Text = " system Login"
$frmForm.sysMenu = 0
$frmForm.Height = 300
$frmForm.Width = 450
$frmForm.FontName = "Verdana"
$frmForm.FontSize = 9

;*************
;** Banner **
;*************
$fraBanner = $frmForm.Controls.PictureBox()
;$fraBanner.IMAGE = "C:\my projects\NetCare3\Images\NC32SM.gif"
$fraBanner.BACKCOLOR = $frmForm.RGB(255,255,255)
$fraBanner.WIDTH = $frmForm.width - 4
$fraBanner.HEIGHT = 60
$fraBanner.LEFT = -2
$fraBanner.TOP = -2

;** Draw On the banner **
$fraBanner.FONTSIZE = 14
$fraBanner.FONTNAME = "verdana"
$fraBanner.FONTBOLD = 1
$fraBanner.FONTITALIC = 1
$fraBanner.ForeColor = $frmForm.RGB(0, 0, 192)
$fraBanner.PrintXY (10,0,"NetLogon 3.2 : Netlogon.kix")
$fraBanner.FontItalic = 0
$fraBanner.FONTSIZE = 8
$fraBanner.ForeColor = $frmForm.RGB(0,100,100)
$fraBanner.PrintXY (10,20,$strVersion + " Powered by Kixforms ")
$fraBanner.FONTSIZE = 9
$fraBanner.PrintXY (10,35,"D5PS2Z0J Systems")
$fraBanner.FONTBOLD = 0
$fraBanner.FONTSIZE = 10

;******************
;** Progress Bar **
;******************
$prgProgress = $frmForm.Controls.ProgressBar()
$prgProgress.width = $frmForm.width - 10
$prgProgress.left = 2
$prgProgress.height = 20
$prgProgress.top = 245;$frmForm.height - $prgProgress.height - 5
$prgProgress.style = 0

;****************
;** Main Frame **
;****************
$fraMain = $frmForm.Controls.PictureBox()
$fraMain.BACKCOLOR = $frmForm.RGB(255,255,255)
$fraMain.WIDTH = $frmForm.width
$fraMain.HEIGHT = 182 ;$frmForm.height - $fraBanner.height - 35
$fraMain.LEFT = -2
$fraMain.TOP = $fraBanner.Height - 5

$lblJob = $fraMain.Controls.label()
$lblJob.FONTSIZE = 10
$lblJob.top = 80
$lblJob.width = 440 ;fraMain.width - 20
$lblJob.left = 10

$lblTask = $fraMain.Controls.label()
$lblTask.FONTSIZE = 10
$lblTask.top = 120
$lblTask.width = 440 ;fraMain.width - 20
$lblTask.left = 50


;** Draw on the frame **
;** Greeting
$Hour = Val(Trim(Left(@Time,2)))
If $Hour < 12
$Greeting = "Good Morning "
Else
If $Hour < 17
$Greeting = "Good Afternoon "
Else
$Greeting = "Good Evening "
EndIf
EndIf
$fraMain.FONTSIZE = 11
$fraMain.FONTNAME = "verdana"
$fraMain.FONTBOLD = 1
$fraMain.ForeColor = $frmForm.RGB(0,100,100)
$fraMain.PrintXY (10,10,$Greeting)
$fraMain.printXY (10,40,"Please wait while your logon script executes...")

$frmForm.center
$frmForm.Show

While $frmForm.visible
$= Execute($frmForm.doevents())
Loop

EndFunction

;*******************************
;*******************************
;** END OF FILE **
;*******************************
;*******************************


Top
#167146 - 2006-09-10 09:22 PM Re: Login Scripts
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
[Quote]
version is 4.3.0.45




This is unlikely since the newest ver is ‘2.46.55.0’ of KiXforms.classic

Use these two lines to tell what ver of KiXforms you have installed.

Code:

$system = CreateObject("Kixtart.System")
? $system.Version



And do not get this error when I run the form, the code is good.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#167147 - 2006-09-11 10:18 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
Hi,
I resolved the problem with the Expected ")" at line 122, but now when I run the script,The dialog stays as it is not doing anything. could there be an error in the MaptoDrive scipt.:
Code:
;************************************************
;** MapDrives.kix D5PS2Z0J Systems **
;** **
;** 25/05/2005 V1.00 **
;** **
;************************************************

$lblJob.caption = $Blanker
$lblJob.caption = "Mapping Network Drives... "

USE * /DELETE

;** Common mappings: Everyone gets these **

Sleep $WaitTime
$prgProgress.value = $prgProgress.value + 5

$DriveToMap = "\\d5ps2z0j\resources"
$lblTask.Caption = $Blanker
$lblTask.Caption = $DriveToMap
USE L: $DriveToMap
$prgProgress.value = $prgProgress.value + 5



; RETURN



It is 2.3.0.45

Top
#167148 - 2006-09-11 10:21 PM Re: Login Scripts
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nope.
no such problem there.

Top
#167149 - 2006-09-11 10:24 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
I have just downloaded and installed KixForms 2.46.55.0 (development build) this may help.
Top
#167150 - 2006-09-12 05:30 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
Hi,
I have tried everything, but the script won't work. This is what I get. It stays like this and does not continue [image]http://www.freewebs.com/inetwise/netlogon2.bmp[/image]

Top
#167151 - 2006-09-12 06:03 PM Re: Login Scripts
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes...
because doevents() does hold your script until the form is closed.
instead of using that, you could use either doevents(1) (not sure that's the correct number anymore) or add timer code.

Top
#167152 - 2006-09-12 10:41 PM Re: Login Scripts
04nunhucks Offline
Getting the hang of it

Registered: 2006-09-08
Posts: 66
But what about it not doing anything? Thanks jooel
Top
#167153 - 2006-09-12 11:07 PM Re: Login Scripts
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I may have not said it clearly enough.
your code is doing something all the time:
Code:

While $frmForm.visible
$= Execute($frmForm.doevents())
Loop


this part of code above makes your script loop inside the while-loop as long as the form is visible.
so, it does do something, it loops. just as you asked it to, with the code.

Top
Page 1 of 2 12>


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

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.07 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org