Page 1 of 1 1
Topic Options
#211959 - 2016-09-30 01:57 AM Printting Info to a GUI
Schavuit Offline
Fresh Scripter

Registered: 2016-09-30
Posts: 14
Loc: South Korea
Im working on a script that pulls all kinds on info from the computer like.. computer name, OS, IP, etc... I was using CreateObject with IE but I cant get it to work without using my admin.. Do yall know of any other way to do this so it wont require admin?
Top
#211962 - 2016-09-30 03:29 PM Re: Printting Info to a GUI [Re: Schavuit]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Kixforms?
Top
#211992 - 2016-10-05 04:28 AM Re: Printting Info to a GUI [Re: ShaneEP]
Schavuit Offline
Fresh Scripter

Registered: 2016-09-30
Posts: 14
Loc: South Korea
http://www.kixforms.org/ this one?? So I tried to use that but I could not get it to work nothing pops up.. Is there an step by step guild that I could look at so I can figure it out?

And a side question I have a script calling to another script how do I make it so it wont wait for the other one to finish before continuing on?


Edited by Schavuit (2016-10-05 04:34 AM)

Top
#211998 - 2016-10-05 10:47 PM Re: Printting Info to a GUI [Re: Schavuit]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Welcome to KORG!

For Q1, did you copy the DLL to the computer and register it (regsvr32 kixforms.dll). Get the latest DLL from the KixForms forum on this site - sadly, KixForms.org hasn't been updated in a few years. The version available there doesn't work reliably with newer Windows versions.

Q2 - using Call runs the child script in the same Kix32 instance. If you want to run it asynchronously, you need to start another copy of Kix as well. You can use Run:
 Code:
$Cmd = %COMSPEC% /c Kix32.exe childscript.kix'
'Spinning off child: ' $Cmd ?
Run $Cmd
Defining the var lets you confirm the process with the message - remove this when it's working.

When I have lots of processing to do, I regularly spin off 20-25 child tasks in this manner. Keeping track of the number of child processes lets me fire off 5 more each time the count drops below 20.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212006 - 2016-10-06 05:24 PM Re: Printting Info to a GUI [Re: Glenn Barnas]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Here is kix form to get you started. I don't have the dll registered on my work computer, so I can't test it to make sure it doesn't look bad. But hopefully it'll get you started. Just have to have the kixforms.dll registered, and then run this with kix.

 Code:
Break On

$Form = CreateObject("Kixtart.Form")
$Form.Width = 300
$Form.Height = 200

$lbl_CompNameDesc = $Form.Controls.Add("Label")
$lbl_CompNameDesc.Width = 80
$lbl_CompNameDesc.Height = 20
$lbl_CompNameDesc.Top = 5
$lbl_CompNameDesc.left = 5
$lbl_CompNameDesc.Text = "Computer: "
$lbl_CompNameDesc.TextAlign = 64

$lbl_CompName = $Form.Controls.Add("Label")
$lbl_CompName.Width = 80
$lbl_CompName.Height = 20
$lbl_CompName.Top = $lbl_CompNameDesc.Top
$lbl_CompName.left = $lbl_CompNameDesc.Right + 5
$lbl_CompName.Text = @WkSta
$lbl_CompName.TextAlign = 16

$lbl_OSDesc = $Form.Controls.Add("Label")
$lbl_OSDesc.Width = 80
$lbl_OSDesc.Height = 20
$lbl_OSDesc.Top = lbl_CompNameDesc.Bottom + 10
$lbl_OSDesc.left = 5
$lbl_OSDesc.Text = "OS: "
$lbl_OSDesc.TextAlign = 64

$lbl_OS = $Form.Controls.Add("Label")
$lbl_OS.Width = 80
$lbl_OS.Height = 20
$lbl_OS.Top = $lbl_OSDesc.Top
$lbl_OS.left = $lbl_OSDesc.Right + 5
$lbl_OS.Text = @ProductType
$lbl_OS.TextAlign = 16

$lbl_IPDesc = $Form.Controls.Add("Label")
$lbl_IPDesc.Width = 80
$lbl_IPDesc.Height = 20
$lbl_IPDesc.Top = lbl_OSDesc.Bottom + 10
$lbl_IPDesc.left = 5
$lbl_IPDesc.Text = "IP: "
$lbl_IPDesc.TextAlign = 64

$lbl_IP = $Form.Controls.Add("Label")
$lbl_IP.Width = 80
$lbl_IP.Height = 20
$lbl_IP.Top = $lbl_IPDesc.Top
$lbl_IP.left = $lbl_IPDesc.Right + 5
$lbl_IP.Text = @IPAddress0
$lbl_IP.TextAlign = 16

$btn_Close = $Form.Controls.Add("ToolButton")
$btn_Close.Text = "Close"
$btn_Close.Center
$btn_Close.Top = $lbl_IPDesc.Bottom + 10
$btn_Close.OnClick = "$Form.Hide()"
$btn_Close.Icon = 37

$Form.Center
$Form.Show
While $Form.Visible
   $=Execute($Form.DoEvents)
Loop

Exit 1

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 1383 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.057 seconds in which 0.024 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