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
#19012 - 02/17/06 07:58 PM read jobinfo variable from vb script
Rick J Offline
OL Toddler

Registered: 02/17/06
Posts: 33
Loc: Green Bay, WI
I see you can set a jobinfo variable from vb script, but I can't seem to get it to read one. Any help would be appreciated.

Thanks,

Top
#19013 - 02/17/06 09:07 PM Re: read jobinfo variable from vb script
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
Try the following code in your VBScript:
Code:
watch.setjobinfo 8,"Jobinfo 8 is now set to this string"
watch.showmessage watch.expandstring("%8")
This sample demonstrates how to set JobInfo 8 to the specified string, and how to display it in a pop-up dialog.

Hope that helps,
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#19014 - 02/17/06 09:12 PM Re: read jobinfo variable from vb script
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
To read the value, use the following code (and in this sample, display it in a dialog box):
Code:
watch.showmessage watch.getjobInfo(8)
Remember: when setting a variable with VBScript, you are using a procedure which doesn't return a value. Therefore, you can't use parentheses around the parameters.

But when you're reading the value, you're using a function that is expected to return a value, which is why you must use parentheses around the parameter. It's one of those VB peculiarities we've all learned to love...


Hope that helps,
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#19015 - 02/18/06 10:21 AM Re: read jobinfo variable from vb script
Rick J Offline
OL Toddler

Registered: 02/17/06
Posts: 33
Loc: Green Bay, WI
Thanks! That was just what I needed.

Top