Page 1 of 1 1
Topic Options
#123334 - 2004-07-20 11:56 AM Call VbScript From KixTart
Jason_Baron Offline
Lurker

Registered: 2004-07-20
Posts: 2
Hi,

I am new to KixTart and struggling already!!!

I have a parent.kix (Kix Script) that I run and want to call child.vbs (VBScript). child.vbs needs to access a variable declared in parent.kix (or indicate success/failure in some way).

Am I correct in thinking that:
1) Using Call to invoke child.vbs will not work because Call expects Kix and not vbs? At the moment I have a msgbox command in the child.vbs that is causing problems.

2) I can use Call but would need to convert my child.vbs to child.kix - i.e. write child.vbs in Kix and not vbs?

OR

Use shell to call child.vbs and use wscript.quit 'n' to set a return value. In parent.kix I would need to use @ERROR to interogate the return value.

Is any of the above true or I have just not understood the concepts at all?

regards,

Jason

Top
#123335 - 2004-07-20 12:11 PM Re: Call VbScript From KixTart
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Jason,

first of all it's KiXtart not KixTart

your assumptions:

1) Correct !
2) see 1

you can do it by SHELL (waits for execution) or RUN (continues with Kixtart script)

eg:

shell 'wscript.exe yourscript.vbs [arguments]'
where [arguments] might be one of your KiX variables

you might set the exit value of the vbscript to anything you want and see if @error gets set (don't know exactly)




There is of course always the possibility to drop vbscript completely and rewrite those scripts for KiXtart

Hope this helps


Edited by Jochen (2004-07-20 12:15 PM)
_________________________



Top
#123336 - 2004-07-20 12:44 PM Re: Call VbScript From KixTart
Jason_Baron Offline
Lurker

Registered: 2004-07-20
Posts: 2
Jochen,

thanks for the quick reply.

My initial thoughts where that I would need to write the child script in KixTart.

Be prepared for more questions!!!

thanks,

Jason

Top
#123337 - 2004-07-20 01:38 PM Re: Call VbScript From KixTart
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Quote:

My initial thoughts where that I would need to write the child script in KixTart.




it's still KiXtart.
_________________________
!

download KiXnet

Top
#123338 - 2004-07-20 02:08 PM Re: Call VbScript From KixTart
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Please, it's KiXtart!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#123339 - 2004-07-20 02:09 PM Re: Call VbScript From KixTart
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
what he said ...
_________________________



Top
#123340 - 2004-07-20 02:33 PM Re: Call VbScript From KixTart
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
What is the content of CHILD.VBS anyway? There is a VBS2KIX() UDF here that can convert VBS to KIX files..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#123341 - 2004-07-21 03:40 AM Re: Call VbScript From KixTart
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Yes, go native! Stay with KiXtart all the way.
_________________________
There are two types of vessels, submarines and targets.

Top
#123342 - 2004-07-21 07:29 AM Re: Call VbScript From KixTart
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Agreed!

If he would share with us what the VBS is, it should be easily converted.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#195495 - 2009-08-20 09:08 PM Re: Call VbScript From KixTart [Re: Kdyer]
DemoDog Offline
Fresh Scripter

Registered: 2009-08-20
Posts: 9
Loc: Washington DC
h'mm .. can I jump in after declaring my self as a newbie?

Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.AddWindowsPrinterConnection "\\pserver1\6thFloorFieldCrew1"

I'd sorely luv to convert this to a kix script. I located and d/l'ed the UDF vbs2kix , but kix32 vbs2kix fieldcrew1.vbs fieldcrew1.kix returns;
ERROR : IDispatch pointers not allowed in expressions!
Script: fieldcrew1.vbs
Line : 7

atb



Edited by DemoDog (2009-08-20 09:20 PM)
_________________________
If Stupidity got us into this mess, then why can't it get us out?
Will Rogers

Top
#195498 - 2009-08-21 08:34 AM Re: Call VbScript From KixTart [Re: DemoDog]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Please don't append your questions to existing threads, always start a new one.

This is especially true for venerable threads like this one which dates back to 2004 and should be left to rest in the peace that it has earned.

As regards your question, what's wrong with the KiXtart AddPrinterConnection() built-in function?

[edit] I see that you have opened a new thread, thanks. [/edit]

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 320 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.062 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