ERMEGM
- 14th February 2010, 05:15
Hello,
I'm trying to work on something using Darryl's VirtualPort.bas. Instead of having one macro, I've created several macros, each having their own macro name. What I was wondering (if it can be done) is this, when writing the ports, can you use an index to display the various macros.
As an example, I have created macros pair1, pair2, pair3 and pair4. Is it possible to be able to call up the macros by entering:
@ OutputPort pair[index]
and displaying them by:
@ WritePort _Pattern, pair[index]?
I only ask because I have done this and get errors like:
Found label after column 1. (pair)
Illegal character ([)
I'm trying to do this without having to create labels for each of these and having 4 times the code when once will do with indexing.
The reason for this setup is for a menu I've created in my program. I'm asking it to read some data and display it on one pair of outputs. When an input is received, index is incremented by 1 and the next set of data is read and displayed on a second set of outputs. This happen two more times, so being able to index the macros would be ideal. Do you think this is possible?
Thanks in advance,
Tony
I'm trying to work on something using Darryl's VirtualPort.bas. Instead of having one macro, I've created several macros, each having their own macro name. What I was wondering (if it can be done) is this, when writing the ports, can you use an index to display the various macros.
As an example, I have created macros pair1, pair2, pair3 and pair4. Is it possible to be able to call up the macros by entering:
@ OutputPort pair[index]
and displaying them by:
@ WritePort _Pattern, pair[index]?
I only ask because I have done this and get errors like:
Found label after column 1. (pair)
Illegal character ([)
I'm trying to do this without having to create labels for each of these and having 4 times the code when once will do with indexing.
The reason for this setup is for a menu I've created in my program. I'm asking it to read some data and display it on one pair of outputs. When an input is received, index is incremented by 1 and the next set of data is read and displayed on a second set of outputs. This happen two more times, so being able to index the macros would be ideal. Do you think this is possible?
Thanks in advance,
Tony