Page 1 of 2 12>
Topic Options
#45303 - 2003-09-05 02:36 PM kix and html
Anonymous
Unregistered


[Moderator (Sealeopard): Moved thread from 'Scripts' to 'Starters' forum due to lack of script in body]

This might be a stupid question but...

I wanna start a kix script with a parameter from a hyperlink something like adress="script.kix parameter" but i can't find a way to pass the parameter. Somebody knows help ?

thanks in advance

[ 17. September 2003, 19:07: Message edited by: sealeopard ]

Top
#45304 - 2003-09-05 02:37 PM Re: kix and html
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
script.kix?$parameter=value

might be one option.
does your script run at all, btw?
_________________________
!

download KiXnet

Top
#45305 - 2003-09-05 02:40 PM Re: kix and html
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Check page 21 of the KiXtart manual:

KIX32 Demo.kix $Key=Value
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45306 - 2003-09-05 02:45 PM Re: kix and html
Anonymous
Unregistered


of course of course from within a scrips this works...but my question was what about a hyperlink? a wanna call the script with parameter form ms internet explorer or so

script.kix?$param as an adress works...but i can't get the parameter

Top
#45307 - 2003-09-05 02:58 PM Re: kix and html
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Yes, but your example was not even close.
quote:
adress="script.kix parameter"
SO I pointed you to the proper format for getting the variable + value into the script. That is closer than you were. If you have at least been close I would not have replied.

It looks like Lonkero added a "?" which is Standard for the beginning of a URL parameters. Somtime you get parts of the complete answer in each post.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45308 - 2003-09-05 03:02 PM Re: kix and html
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
It depends whether you want to run it locally (on the PC) or on the HTTP server.

For a local path, replace the space character " " with %20, and the "$" character with %24.

Top
#45309 - 2003-09-05 03:06 PM Re: kix and html
Anonymous
Unregistered


my example wasn't a solution but a question.

the form script?param doesn't work in an URL. The script doesn't get the param....

Top
#45310 - 2003-09-05 03:14 PM Re: kix and html
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
The form "script?param" works perfectly well in a URL.

You are not providing sufficient information for us to give you an answer, so we are having to guess what your problem might be.

To start with, are you trying to run the script locally on the PC, or are you asking the web server to run it?

If it is the web server then the parameter will be made available in environment variables. If it is the local PC then you must pass the information directly.

If it is the local PC, how are you executing the script? Have you associated ".kix" with kix32.exe?

At least give us the full URL that you are trying.

Top
#45311 - 2003-09-05 03:17 PM Re: kix and html
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Here are two examples of doing this from an ASP page.

code:
response.redirect("file://server_name/share_name/file_path/kix32.exe demo.kix $a=1")

code:
my_command =  "cscript.exe e:\inetpub\wwwroot\my_web\my_program.vbs myparam"

set o = createobject("wscript.shell")
server.scripttimeout = 120
rc = o.run (my_command,0,true)



[ 05. September 2003, 15:19: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45312 - 2003-09-05 04:10 PM Re: kix and html
Anonymous
Unregistered


sorry i wasn't very clear. Let me try again

everything is local. The web page contains links in the form http://script.kix (parameter)

Of course .kix is linked to kix32

now how do i catch the parameter within a script that looks like :

script.kix :

shell $parameter+".exe"

(of course there are other commands in the script)

Top
#45313 - 2003-09-05 04:21 PM Re: kix and html
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
still not sure what you ask.
if you give the parameter on the line:
script.kix $parameter="myvalue"

it will be set in the script.
_________________________
!

download KiXnet

Top
#45314 - 2003-09-05 04:36 PM Re: kix and html
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
quote:
http://script.kix (parameter)
If this is all local (no HTTP server) then the URL must start "file://", and there is no way to pass a parameter in a file:// URL.

What is it you are trying to achieve. Perhaps we can suggest a better way that will work with KiXtart.

KiXforms or IE COM automation might solve your problem.

Top
#45315 - 2003-09-05 04:55 PM Re: kix and html
Anonymous
Unregistered


to Lonkero :

http://script.kix $parameter="myvalue"
doesn't work ->err 4040
http://script.kix ? $parameter="myvalue"
doesn't work for the same reason

Richard maybe you're right but it's all installed and i can't change it. I just want to migrate progressively...

Actually the web page looks like

choice 1 (links to "http://choice1.oldaply")
choice 2 (links to "http://choice2.oldaply") and so on

there are 80 or 100 of these

i want to change it to

choice 1 (should link to "http://newscrpit.kix(1)"

choice 2 (should link to "http://newscrpit.kix(2)"

the only problem is to catch the one ..two and so on in a script variable.....

Top
#45316 - 2003-09-05 04:59 PM Re: kix and html
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
eh?
do you have server named script.kix in your network?
like said, if not, you can't ever link like http://script.kix as that would search host script in kix domain!
also, your line is not same as I told.
you typed: http://script.kix ? $parameter="myvalue"
where as I suggested http://script.kix?$parameter="myvalue"

anyway, this will never work either.
you need to have the machine in your link too.
_________________________
!

download KiXnet

Top
#45317 - 2003-09-05 05:04 PM Re: kix and html
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
That is why I posted to use the file:// URL above. You should be able to use it directly in a hyperlink or via ASP.

[ 05. September 2003, 17:06: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45318 - 2003-09-05 05:05 PM Re: kix and html
Anonymous
Unregistered


Lonkero right... it is "http://script.kix?$parameter="myvalue""

...the program starts but i still don't get the parameter.

The link works of course as everything is on the web site with the starting page. it translates to "http://server/website/directory/script.kix?$param=somthing"

[ 05. September 2003, 17:08: Message edited by: adecot ]

Top
#45319 - 2003-09-05 05:15 PM Re: kix and html
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Well, I'm completely baffled [Confused]

A URL of "http://" requires a HTTP server, but you say all this is local. If there is an HTTP server then the script (when run) can pick up the rest of the line after the "?" from environment variables - the environment variable names are different depending on the HTTP server used.

Try issuing
code:
SHELL "%COMSPEC% /C set"

from your script and see what is set.

Howard, did you try that redirect? AFAIK it should fail, as the entire line including the parameters will be interpreted as being part of the file name.

Top
#45320 - 2003-09-05 05:15 PM Re: kix and html
Anonymous
Unregistered


sorry Bullok... my asp knowledge is close to 0. So i don't know how to put this to work.

response.redirect("file://server_name/share_name/file_path/kix32.exe demo.kix $a=1")

(and i don't enjoy the idea of having to rename all the files to asp either...)

Top
#45321 - 2003-09-05 05:29 PM Re: kix and html
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
We actually have something like running in production. I just posted a small part that seemed relevant. We launch a batch file. Posibbly the command line with parms was written to the batch file before the file:// that invoked the batch file.

That may be simpler to implement write batch files with the parms in them and then file:// to the right one for the circumstance.

I do not know a great deal about HTTP stuff. Just know we did some thing like what the poster wanted and tracked it down in case it helped.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45322 - 2003-09-05 05:41 PM Re: kix and html
Anonymous
Unregistered


tried the richard solution.but nothing in the set variables looks like my parameter. And yes of course there's a web server (IIS4) i wasn't very clear about that.

I can't still get the passed value either as a kix variable nor as a global set

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
1 registered (Allen) and 675 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.345 seconds in which 0.285 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