31
VB and the development of wizards / Re: How do I use VB to turn a LED on & off on the screen?
« on: February 19, 2007, 12:59:37 PM »
Hi Darc,
first you should define a M-Macro like M100 for Led on and M101 for LED off.
Then can use the whole VB-Script language for your Macros..
M100:
SetUserLED (nnnn, 1) ' Led on
M101:
SetUserLED (nnnn, 0) ' Led off
or you can use both in one macro:
M100:
If GetUserLED (nnnn) then ' UserLED on?
SetUserLED (nnnn,0) ' then turn it off
else
SetUserLED (nnnn, 1) ' ..or turn it on...
end if
Thats will toggle the status of your LED....
Copy this macro into your folder matching your profile.
Best regards,
Wolfram
first you should define a M-Macro like M100 for Led on and M101 for LED off.
Then can use the whole VB-Script language for your Macros..
M100:
SetUserLED (nnnn, 1) ' Led on
M101:
SetUserLED (nnnn, 0) ' Led off
or you can use both in one macro:
M100:
If GetUserLED (nnnn) then ' UserLED on?
SetUserLED (nnnn,0) ' then turn it off
else
SetUserLED (nnnn, 1) ' ..or turn it on...
end if
Thats will toggle the status of your LED....
Copy this macro into your folder matching your profile.
Best regards,
Wolfram