Page 1 of 1 1
Topic Options
#127657 - 2004-10-09 09:14 PM Start using a script
Anonymous
Unregistered


Hi,
I have looked around for an hour or so, also looked at the beginners guide etc, I'm a newbie, all I really want to do (for a start) is run one script the osid one mentioned elsewhere, I've tried wkix32.exe osid.kix (which I've named it) maybe it runs but it doesn't produce any output. Help!

Top
#127658 - 2004-10-09 09:25 PM Re: Start using a script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Lets see what code you got so far.
Top
#127659 - 2004-10-09 09:26 PM Re: Start using a script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
When you start to learn to use KiXtart, I recommend that you open a CMD window and use Kix32.exe from the command prompt. This way the windows remains after execution and you can any output.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#127660 - 2004-10-09 09:32 PM Re: Start using a script
Anonymous
Unregistered


Thats exactly what I'm doing.
In answer to the previous question the code is exactly that (complete with carriage returns and line feeds from here:
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=12&t=000019

Top
#127661 - 2004-10-09 09:35 PM Re: Start using a script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You stated above the you were using wkix32.exe . I suggested tha you use Kix32.exe. Now you state that is exactly what you are doing. Which is it?

The link you provided is no longer valid.


Edited by Howard Bullock (2004-10-09 09:36 PM)
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#127662 - 2004-10-09 09:43 PM Re: Start using a script
Anonymous
Unregistered


Sorry, I meant I was doing it from the cmd prompt, however (sorry) I was using wkix32.exe, however I've just tried the same with kix32.exe with the same result. Just don't know what I should be doing
Top
#127663 - 2004-10-09 09:48 PM Re: Start using a script
Anonymous
Unregistered


This is the correct link, I think

http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB12&Number=81711

Top
#127664 - 2004-10-09 09:48 PM Re: Start using a script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I have looked up the OSID() UDF. I understand that you have this in a script file. Are you actually calling the UDF? Have you read the FAQ How to use UDFs ?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#127665 - 2004-10-09 09:50 PM Re: Start using a script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Its easy to forget to actually display a returned value, so it should be called like this:

Break On

?"Value=" OSID()[1]

Exit 1

function osid(optional $sComp)

... rest of function ...

Top
#127666 - 2004-10-09 09:57 PM Re: Start using a script
Anonymous
Unregistered


no, I didn't really know what a udf was!
So it seems that I have to start the script inside the script itself? eg
break on

$abc = OSID()

"Operating system = " $ab

get $_
Exit 1

(followed by the rest) for example?

Top
#127667 - 2004-10-09 10:00 PM Re: Start using a script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ja, you need to add some code to actually invoke the UDF. Not only that, this particular UDF doesn't return a simple number or string, it returns an ARRAY of values, so you need to specify which array value you want to use or display, ie

$Value1 = OSID()[1]
?"Value1=" $Value1

$Value2 = ODID()[2]
?"Value2=" $Value2

etc, etc



Top
#127668 - 2004-10-09 10:05 PM Re: Start using a script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The funny thing is, the UDF even has an example section that demonstates how to use it. And how can you not realize that the post is a UDF if it is part of the UDF Forum?

Also, Shaw's example is a bad one as it requires OSID() to run multiple times. As shown in the UDF header example, the usage would be e.g.
Code:

$Values = OSID()
? 'Value0=' + $Values[0]
? 'Value1=' + $Values[1]
for each $value in $values
? 'Value = '+$value
next



Edited by sealeopard (2004-10-09 10:07 PM)
_________________________
There are two types of vessels, submarines and targets.

Top
#127669 - 2004-10-09 10:07 PM Re: Start using a script
Anonymous
Unregistered


Because I am a newbie?
Top
#127670 - 2004-10-09 10:33 PM Re: Start using a script
Anonymous
Unregistered


Thanks to everyone who replied, in particular shawn, its now working! and I'm a little wiser
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 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.062 seconds in which 0.026 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