Machsupport Forum
Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: DBTguy9 on April 29, 2015, 12:29:29 PM
-
Hi everyone!
I'm currently trying to build an external C++ program that utilizes the scripting function in Mach 3 based off the MachRemote example on the main site. I have added a "Load File" button to the screen, sourced it correctly, and am able to run other scripting commands on it like scripter.DoButton(21) and scripter.DoOEMButton(169) so I know the button is sourced and functions correctly.
It is not allowing me to use the LoadFile or LoadRun command.
Here's the section of code that I have:
void CMachRemoteDlg::OnBnClickedLoadFile()
{
if (scripter == NULL) return;
scripter.LoadFile("c:\Rosetta.tap");
}
Any suggestions as to why this would not work?
-
I found out that I have to be in the Open File dialog box in order for the LoadFile and LoadRun commands to execute properly. Anyone know of a way in which I am able to do this without opening this dialog box? Or how to close it in proper sequence if its necessary to have it open while loading a GCode file?
-
whether you are able to do load g code using an external button I have to find a way to quickly load code
greeting