Page 1 of 1

How do I execute scripts from inside program

Posted: Sun Feb 22, 2015 1:57 am
by Redlion
Hi,

I have been trying to write a small program to test some HW scripts to see which is the most effective.
I have several hunderd different scripts to test so compiling each time and then testing them is a pain,
so I wrote a small program to edit the script easily and then test them.

I am using the following code to execute the script.

Execute("Hollywood "..PathPart(f$)..Dir$.."/HWtemp.hws")

It works if i execute the script in "Cubic IDE" but when I compile it, I get an error.

A window pops up titled "Tester output" (Tester - name of my compiled program) and in the window the line
Hollywood: Unknown command

I am sure I am doing something really silly but I just can not peg it down.

How do I execute a script from within my compiled program.

Thanks Leo

Re: How do I execute scripts from inside program

Posted: Sun Feb 22, 2015 10:11 am
by airsoftsoftwair
Hmm, what about

Execute("Hollywood:System/Hollywood "..PathPart(f$)..Dir$.."/HWtemp.hws")

?

Re: How do I execute scripts from inside program

Posted: Sun Feb 22, 2015 12:20 pm
by Redlion
@ airsoftsoftwair

Yep that fixed it, I was sure I tried that but I must of had something not quite right.

Thanks again

Leo