Alternate entry function

barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Alternate entry function

Post by barry.marcus »

If I want use <exec> to launch a texis script (i.e., via

<exec BKGND texis myScript></exec>

is there a way to specify an entry point for the call other than the function named main? This would be a convenience more than anything, because I have a number of different calls to make this way and I'd like to keep all of the functions together in a single module if possible.
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Alternate entry function

Post by Kai »

Yes, just add it to the script path as you would in a URL:

<exec BKGND texis myScript/someOtherFunc.txt></exec>

Start functions can be given on the command line as they would in URLs.
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

Alternate entry function

Post by mark »

barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Alternate entry function

Post by barry.marcus »

Thanks. Ha! I guess I should RTM more thoroughly! Now, one more question about this...

Here is a simple proof-of-concept test script file, called test, that I wrote:

<script language=Vortex>
<a name=main>
<exec BKGND texis.exe test/longWait.txt>
</exec>
</a>

<a name=longWait PUBLIC>
<vxcp timeout 10000>
<sleep 60>
</a>
</script>

My objective is to demonstrate launching a lengthy process, but having the function that spawns that process return immediately and then end, leaving the lengthy process to continue running.

I am testing this by issuing the following from a command prompt:

texis test

When the <exec> statement in main does NOT include the BKGND option, everything works, except that main waits until the function longWait finishes, as I expect. However, when I add the BKGND option to the <exec> statement (as you see above), I get the following error returned at the command prompt:

000 test:3: Cannot set std[0] flags: The parameter is incorrect in the function TXpopenduplex

What am I doing wrong here?
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Alternate entry function

Post by Kai »

Your script is correct. That error is something we've encountered before, and haven't yet found a cause for.
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Alternate entry function

Post by barry.marcus »

Hmm... Do you know of any workaround?
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Alternate entry function

Post by Kai »

We've been working on one. Contact tech support for a version to test it; it should be available soon.
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Alternate entry function

Post by barry.marcus »

Hi. I contacted tech support and they said someone would get back to me re this issue, but as yet no one has. Any progress on a workaround or fix? Thanks.
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Alternate entry function

Post by Kai »

A build with a workaround is being built. We'll reply via tech support when it is ready (in a day or two).
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Alternate entry function

Post by barry.marcus »

Great! Thanks Kai.
Post Reply