Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: DerWeisse on August 06, 2018, 06:46:47 AM
-
As seasoned VB programmer I was HOPING I can find suitable controls on user screen, but found just few, or I can't find other.
I have text strings coming over RS-232 comm with MACH using VB macro, and I wish to see them on the screen, like in VB textbox, label, and other textual controls.
I can't find "user controls", such as LABEL with ref num, so I can direct text from the macro to that label (or text box).
LABEL seems to ask for explicit text and has no ref number, same for DRO (fixed ref to some functions), couldn't find other text-looking controls.
To make it clear:
If i get text string like "ABC" into string variable in VB like ST, I wish to direct it to my control. LIke in VB I can send it to my textbox like text1.text=ST
It doesn't exists or I just didn't find it?
-
you have to use in Screen a Label with description Userlabel10 (just an example).
in VBScript you have to set userlabel like:
myString="hello world"
SetUserLabel(10, myString)
-
"with description Userlabel10"... Description WHERE???
The only options for label are:
- Global (Y/N)
- Label (expects explicit text)
- Locked for mouse (Y/N)
I don't see how to assign any variable to the label.
Your suggestion is exactly what I was looking for.
Thanks.
-
text = userlabelXX
-
Where does the XX go? :-\
I don't see a place for ## on the label,
Thanks.
-
The number is part of the name.
See page 20 (3-6) here:
http://www.machsupport.com/wp-content/uploads/2013/02/Mach2_6.11_Custom.pdf
-
Many thanks. It works.
(Not immediate or intuitive to VB folks, who expect the "name" to be one thing and the text ("caption") another.)
This is my first attempt in modifying Mach. The manual you sent was was unknown to me, not mentioned in Mach site or I missed it.
All is now well, my ATC works great with MACH3.
-
It's on the Machsupport site under Mach2 manuals.