Page 1 of 2 12>
Topic Options
#120257 - 2004-05-27 10:41 AM Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
I'm trying to drop the main KiXforms 2.3.0.44 GUI object. With 2.2.0 $object=0 was sufficient, but in the new version this dowsn't work. How do i get rid of the object completely ? I tried:
- $object.Hide()
- $object.Despose()
- $object=0
- $object.Clear()
Nothing seems to work..
_________________________
Kind regards,

Top
#120258 - 2004-05-27 10:57 AM Re: Drop KiXforms 2.3.0.44 object
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
$object.quit
_________________________
!

download KiXnet

Top
#120259 - 2004-05-27 11:18 AM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Thankz, will try that!
_________________________
Kind regards,

Top
#120260 - 2004-05-27 11:47 AM Re: Drop KiXforms 2.3.0.44 object
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
shoudn't that be object.Dispose ?


Oh well..
_________________________



Top
#120261 - 2004-05-27 12:08 PM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Will give Dispose() a shot too, .Quit didn't do the trick.
_________________________
Kind regards,

Top
#120262 - 2004-05-27 12:12 PM Re: Drop KiXforms 2.3.0.44 object
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what is $object?
could you paste the start of the creation so we can view how does the object gets created.
I think that might make difference.
_________________________
!

download KiXnet

Top
#120263 - 2004-05-27 12:17 PM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
The object is created like this:

Code:

$System=CreateObject('kixtart.System')
If Not $System
Shell 'regsvr32 /s %SystemRoot%\System32\KixForms.dll'
$System=CreateObject('kixtart.System')
EndIf

; Define window..
$Basis = $System.Form()



The object will be Basis, so $Basis.Quit, $Basis.Dispose() or $Basis=0 should do the trick. If i do this, and i use Shell '$Action' (see posts above) the process hangs. There's a simular post about the behaviour for KiXforms 2.2.0 if the GUI object isn't dropped (using $object=0).
_________________________
Kind regards,

Top
#120264 - 2004-05-27 12:50 PM Re: Drop KiXforms 2.3.0.44 object
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, why don't you do:
$system=0

?
that would get rid of KF.
_________________________
!

download KiXnet

Top
#120265 - 2004-05-27 01:12 PM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Tried it, but it didn't work if i correctly recall I'm trying the old script (not completely rewritten for KiXforms 2.3.0.44) with the new KiXforms 2.3.0.44, see if that works.
_________________________
Kind regards,

Top
#120266 - 2004-05-27 02:28 PM Re: Drop KiXforms 2.3.0.44 object
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Jooels solution should work, for example:

Code:

Break On

$System = CreateObject("Kixtart.System")

$System = 0

If $System
?"System does exist..."
Else
?"System does not exist..."
Endif

Exit 1



Top
#120267 - 2004-05-27 03:17 PM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
I will test this again asap. For now, i'm busy rollback all the affected scripts to minimize damage.

In this thread and the KiXforms BBS thread this is also mentioned (back then i worked with KiXgui). Maybe this is more help?

Once again: when i drop the GUI ($Main=0 $System=0) and i get to the Shell '$Action', all action stops till i kill the Kix process....
_________________________
Kind regards,

Top
#120268 - 2004-05-30 01:59 AM Re: Drop KiXforms 2.3.0.44 object
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Code:

$System=CreateObject('KiXforms.System')
If Not $System


is incorrect syntax as $System is an object. Teh correct sytax would be
Code:

$System=CreateObject('KiXforms.System')
If Not vartype($System)=9


or
Code:

$System=CreateObject('KiXforms.System')
If @ERROR

_________________________
There are two types of vessels, submarines and targets.

Top
#120269 - 2004-06-02 08:47 AM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
I know, but it is old code. Checking on the existence of the $System object works well for me, but better would be checking with VarType().
_________________________
Kind regards,

Top
#120270 - 2004-08-24 11:56 AM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
I've tested the code again with the released version and yes, it seems to drop the GUI object ($GUI=0, $GUI.Dispose() ?). However, when i use Shell 'InstallShield install Program' all action still stops until i kill KiXtart. With the old KiXforms 2.2.0, when i dropped the GUI object ($GUI=0) the Shell action was correct executed without killing KiXtart..

Sample:
Code:
$System=CreateObject('KiXtart.System')
If @Error
Shell 'regsvr32 /s %SystemRoot%\Utils\KixForms.dll'
$System=CreateObject('KiXtart.System')
If @ERROR
Exit
EndIf
EndIf

; Define window..
$Basis = $System.Form()
$Basis.Text = 'Installing applications..'
$Basis.Left = 50
$Basis.Top = 50
$Basis.Width = 350
$Basis.Height = 130
$Basis.Minbutton = 0
$Basis.Maxbutton = 0
$Basis.Sysmenu = 0
$Basis.Visible = 1
$Basis.Show

; Place labels, text window, status frame..
$BasisWelcome = $Basis.Label('Package installation script',10,10,260,18)
$BasisApplication = $Basis.Label('Installing :',10,$BasisWelcome.Bottom+2,50,18)
$BasisPackage = $Basis.Label('',65,$BasisWelcome.Bottom+2,$Basis.Width-71,18)
$BasisStatusFrame = $Basis.Groupbox('Status',6,$BasisApplication.Bottom+2,$Basis.Width-20,$Basis.ClientHeight-($BasisApplication.Bottom+10))
$BasisStatus = $BasisStatusFrame.Label('',8,14,$BasisStatusFrame.Width-12,$BasisStatusFrame.Height-24)


$Basis=0
If $Basis
$Basis.Shell('%ComSpec% /c \\server\ofcscan\pccnt\disk1\install.exe')
Else
Shell '%ComSpec% /c \\server\ofcscan\pccnt\disk1\install.exe'
EndIf

_________________________
Kind regards,

Top
#120271 - 2004-08-24 12:41 PM Re: Drop KiXforms 2.3.0.44 object
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kixforms won't release until the process calling it has ended.
even though you loose all references to it.
iirc, that's what I ran accross my tests.

some part of the "system-image" will remain in memory, no matter how you try to dispose it.
_________________________
!

download KiXnet

Top
#120272 - 2004-08-24 05:32 PM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
What a bummer With KiXforms 2.2.0 it worked perfectly and i'm not trusting .Shell('')...
_________________________
Kind regards,

Top
#120273 - 2004-08-25 08:49 AM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Looks like when running the script from HKLM/RunOnce (thus: logged on!) is doesn't install and when i run the script when i have a desktop it runs fine (with $object.Shell('Action').

Seems that this shell doesn't behave the same as the KiXtart Shell, because using the KiXtart Shell (and KiXforms 2.2.0) gave no problems !
_________________________
Kind regards,

Top
#120274 - 2004-08-25 08:59 AM Re: Drop KiXforms 2.3.0.44 object
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, shell can be bound to shell.
shell in wintosh is the explorer stuff and so on.
thus, if not yet shell, it can't be used either.

this is a quess though. only shawn can answer for sure to that.
_________________________
!

download KiXnet

Top
#120275 - 2004-08-25 09:41 AM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Ok, lets wait and see I'm currently testing again, with the old script. See if the old script still works..

Edit:
I've tested it:
  • From RunOnce it didn't install correct. I checked this by logging on as administrator.
  • From desktop it installed correct. Same check as above.


Edited by Schuliebug (2004-08-25 12:12 PM)
_________________________
Kind regards,

Top
#120276 - 2004-09-15 11:14 AM Re: Drop KiXforms 2.3.0.44 object
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Does anybody know if Shawn is on holiday or so? Haven't seen him around for a few weeks now...??
_________________________
Kind regards,

Top
Page 1 of 2 12>


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

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.039 seconds in which 0.013 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