IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#30404 - 09/30/09 05:15 AM Function - ExecScriptfile - any help
Gerald Offline
Member

Registered: 07/24/08
Posts: 74
Loc: Italia - France
Hi,
In a project I have 1 file csv. But to the future, we will use a second file to correct part of informations of this 1 file.

I'll use this function ExecScriptfile to take-up there informations without touch the main file.
I search in topic, web help, script sample... So... I see it's possible to give parameters, but it's possible to take a return script value ?
Can I use the function's parameters same as return value ?

I know they're another way to do that (workflow, prog C, ...).


Gerald

Top
#30405 - 09/30/09 02:15 PM Re: Function - ExecScriptfile - any help
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Gerald,

In your vbscript, you can use "Script.ReturnValue = i", where "i" is an integer variable, to return a value to PlanetPress. The function ExecScriptFile is actually a function that returns an integer.

So in a PressTalk object, you could say:
Code:
define(&i, integer, 0)

&i := ExecScriptFile('C:\\myscript\\script.vbs', '', 1)

show(inttostr(&i))
And then in your vbscript, you can use:
Code:
Script.ReturnValue = 1337
With this, the "show" command in your PressTalk object will display the number "1337".

Hope that helps.

Regards,
Rapha

Top
#30406 - 10/01/09 03:40 AM Re: Function - ExecScriptfile - any help
Gerald Offline
Member

Registered: 07/24/08
Posts: 74
Loc: Italia - France
Thx Raphael,

I searched a string return or an array string ...

Returning integer value must be interesting but in this case... hic!

So I must go to the workflow to find other solution...

Gerald

Top