Hello Guest it is April 18, 2024, 10:05:45 AM

Author Topic: vbScript and G-Code system variables  (Read 3551 times)

0 Members and 1 Guest are viewing this topic.

vbScript and G-Code system variables
« 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.
Re: vbScript and G-Code system variables
« Reply #1 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.