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
#30678 - 01/25/10 07:09 AM How can I execute a VBScript?
Anonymous
Unregistered


I'd like to know how can I execute a VBScript?
I tried to do this in Planet Press Design:

execscriptfile('C:\\Documents and Settings\\Minister\\Desktop\\minister\\barracodigo.vbs', &codigob, VBScript)

But it's not work.

Top
#30679 - 01/25/10 07:50 AM Re: How can I execute a VBScript?
Anonymous
Unregistered


reading the planet user guide. I show that the correct must be this:
execscriptfile('c:\\codigobarra.vbs', &codigob, 0)

0 -> for autodect; 1 - VBScript;
I have tried both, but still not working.

Top
#30680 - 01/25/10 09:36 AM Re: How can I execute a VBScript?
Raphael Lalonde Lefebvre Offline
OL Expert

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

Execscriptfile is a function, which returns an integer. It cannot be used alone, it has to be used as a function and assigned to an integer variable. Try this:

Code:
define(&i, integer, 0)

&i := execscriptfile('c:\\codigobarra.vbs', &codigob, 0)
This should work. Even if you do not need to use the returned value, it has to be called this way.

Hope that helps!

Regards,
Rapha

Top
#30681 - 01/25/10 01:03 PM Re: How can I execute a VBScript?
Anonymous
Unregistered


Now work the execution, but I did a script to receive a terminal paramater. If I run at cmd this
"c:\codigobraa.vbs test", will create a txt file with test value inside. I'm tring do this in planet press. I put &codigob in planet to be "test".
But not work, how can I pass a parameter like that?

Top
#30682 - 01/25/10 01:09 PM Re: How can I execute a VBScript?
Raphael Lalonde Lefebvre Offline
OL Expert

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

When you pass a parameter to a script from Design, it will assign it to the variable "Script.ParamString". So if codigob is "test", then if you call Script.ParamString in your script, it will return "test".

This is how you obtain the value of a parameter from Design.

Regards,
Rapha

Top
#30683 - 01/25/10 03:06 PM Re: How can I execute a VBScript?
Anonymous
Unregistered


thanks man it's work!!!

Top