"global" Procedures For All Events Conflicts With Text Obj Data Source Script??
I want a global counter in Procedures For All Events, so I do this:
counter = 1
Then I create a single-line text object, and set its data source to VBS as a single-line expression. I leave the default "Sample Text".
I get this error in the Text Properties dialog:
Output:
Procedures for All Events (Line 1): Variable is undefined: 'counter'
What gives? Why should the text object possibly care about a properly-defined global var?
This seems like it should be really simple, but the notion of a global space via seems to be all sorts of a problem. (this post is relevant to the global space in a different way, especially this comment)
(I'm using BarTender2016)
-
It looks like you have to define the variable first:
Dim counter counter = 1
With this done the error in the single line VB script goes away.
0 -
Thanks Ian; initially I tried declaring and assigning on the same line, which I guess isn't allowed. I got some help via this response in a different thread and thankfully have gotten past similar noob mistakes since then :)
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare