211
VB and the development of wizards / Re: Starting a VBScript from am Button?
« on: June 18, 2022, 06:17:08 AM »
you create a macrofile in the holder c:\Mach3\macros\Your profile name
let's say MyFuntions.m1s
in the file MyFuntions.m1s you place a function with the code:
now in any button you can use this code:
so you can keep the specific code in just one file -> MyFunctions.m1s
and you can add as may functions you want.
let's say MyFuntions.m1s
in the file MyFuntions.m1s you place a function with the code:
Code: [Select]
'function for button1 ------------------------------------------------
Function Button1() as Boolean
Code ("F300")
End Function
now in any button you can use this code:
Code: [Select]
Sub Main()
Call Button1()
End Sub
#Expand <\..\..\macros\Your profile name\MyFunctions>
so you can keep the specific code in just one file -> MyFunctions.m1s
and you can add as may functions you want.