Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: ComNerd21 on May 15, 2016, 11:04:07 PM

Title: vbScript and G-Code system variables
Post by: ComNerd21 on May 15, 2016, 11:04:07 PM
Hi all, i am writing a vbScript program for mach3. my code is:
Code("#100 = 1")
If (Code("#100") = 1) Then
   MsgBox("true")
Else
   MsgBox("false")
End If

when this code is run i get a "false" message box, what am i doing wrong, i am using the system variable because I will need the state of this in another program.
Title: Re: vbScript and G-Code system variables
Post by: ComNerd21 on May 16, 2016, 07:59:51 PM
SOLVED!!!

Hi all, i am writing a vbScript program for mach3. my code is:
Code("#100 = 1")
If (Code("#100") = 1) Then
   MsgBox("true")
Else
   MsgBox("false")
End If

when this code is run i get a "false" message box, what am i doing wrong, i am using the system variable because I will need the state of this in another program.

Use a vbScript global variable.