Hello Guest it is October 15, 2019, 12:39:49 AM

Author Topic: Where are button scripts stored?  (Read 3386 times)

0 Members and 1 Guest are viewing this topic.

Where are button scripts stored?
« on: December 20, 2016, 09:50:22 PM »
I edit and create screen sets on one computer and then copy the screen set to the cnc controller computer.  I have to copy and paste the button scripts from a text file that I copy over to the cnc controller computer.  This is faster than re-typing  the code into the individual button script editors.  If I knew the file that contained the button scripts,  I could just copy this over with the .set file for the screen set.

Thanks for any help.
Rick

Offline Tweakie.CNC

*
  • *
  •  7,945 7,945
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Where are button scripts stored?
« Reply #1 on: December 21, 2016, 02:25:22 AM »
The button scripts are contained in the screen .set file.

This thread refers http://www.machsupport.com/forum/index.php/topic,31871.msg221659.html#msg221659

Tweakie.
« Last Edit: December 21, 2016, 02:27:30 AM by Tweakie.CNC »
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Offline RICH

*
  • *
  •  7,367 7,367
    • View Profile
Re: Where are button scripts stored?
« Reply #2 on: December 21, 2016, 07:42:46 AM »
Just a comment,
If the button scripting calls for some macro which was created or modified you will need to copy those over to proper directory.

RICH
Re: Where are button scripts stored?
« Reply #3 on: December 21, 2016, 12:30:19 PM »
I knew this seemed like a familiar question.  My CRS kicking in again.

To follow this through a little further.  I thought .set files were created and saved by Screen4 (as well as other screen design programs).  So how do you save the button script in the .set file from Mach3?  I guess they should be saved when you exit the Mach3 VB script editor (which I did save when closing the editor)?

This is what I did.  I created a new screen on computer A, then used Mach3 to add the button script (saving the before closing the VB editor) on computer A.  I copied the set file from computer A to the control computer.  The button script was not part of the .set file. 

I'll play with this some more and try not to ask the same question again.
Thanks.
Rick

Offline RICH

*
  • *
  •  7,367 7,367
    • View Profile
Re: Where are button scripts stored?
« Reply #4 on: December 21, 2016, 02:41:01 PM »
I use Dietz's Machscreen so can't answer any questions on using screen4.

In Mach3 you can edit or add scripting by Operator>Edit Button Script,
the buttons available to edit will blink, click on the button,
and the editor screen will show any scripting. Make changes as you wish
and when you click to close the window  you will be given choices on what to do.....one of them is to save the changes.

The changed script is saved in the screen set. If you copy that screen set, say to another computer you will see the scripting.

Frankly to learn, I just copied the Mach3 folder to a computer and started playing around with a screen learning how to use what's available in the screen designer program. It was rather intuitive to me on what is required to do things.

Now as far as scripting goes .......... thats a different story.
You can start by reading ( no lets say studying ) the following:

- Mach Customization Guide
- Mach Programmers Reference Manual
- Get posted list's of Buttons, DRO's, Led Numbers, etc.

Then if you have no experience with programing / scripting:
Go STUDY examples posted of scripting, what's in existing screens, pay attention to how things are done and before you know it you'll be dangerous!

Have fun ....it's a trip!  ;)  ;D  >:D

RICH
Re: Where are button scripts stored?
« Reply #5 on: December 21, 2016, 04:12:37 PM »
Thanks for the info Rich.  I've been kind of dabbling with screen sets.  I've been adding and removing things from the 1024.set for over a year now.  The screen set I'm using now really looks like a mess, since I haven't done anything with the underlying "mask", but it works just fine for my needs.  I've been waiting til I have settled on what I want on the screen set.  Just when I think I don't need anything else, I think of something that would be handy.

My latest is a couple of buttons (X axis and Y axis) that adjusts the DRO so that 0,0 is in the center of the work piece (like some of the fancy DRO's on milling machines).  I found that I was always measuring and marking the center of a work piece before putting on the CNC machine.  Than I thought Mach3 could do this.  It's working great.

On to my problem... I think the problem was that I was not closing Mach3 before copying the .set file to the control PC.  I've got 2 monitors on the computer that I'm writing the button scripts on and Mach3 is on one and I was looking at the other monitor while copying the .set file to the control pc.

Rick