#45303 - 2003-09-05 02:36 PM
kix and html
|
Anonymous
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
|
|
|
|
#45305 - 2003-09-05 02:40 PM
Re: kix and html
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Check page 21 of the KiXtart manual:
KIX32 Demo.kix $Key=Value
|
|
Top
|
|
|
|
#45306 - 2003-09-05 02:45 PM
Re: kix and html
|
Anonymous
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
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.
|
|
Top
|
|
|
|
#45309 - 2003-09-05 03:06 PM
Re: kix and html
|
Anonymous
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
|
|
|
|
#45311 - 2003-09-05 03:17 PM
Re: kix and html
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
#45312 - 2003-09-05 04:10 PM
Re: kix and html
|
Anonymous
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
|
|
|
|
#45314 - 2003-09-05 04:36 PM
Re: kix and html
|
Richard H.
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
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
|
|
|
|
#45317 - 2003-09-05 05:04 PM
Re: kix and html
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
#45318 - 2003-09-05 05:05 PM
Re: kix and html
|
Anonymous
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
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Well, I'm completely baffled
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
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
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.
|
|
Top
|
|
|
|
#45322 - 2003-09-05 05:41 PM
Re: kix and html
|
Anonymous
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 675 anonymous users online.
|
|
|