Hello Guest it is March 28, 2024, 11:43:36 AM

Author Topic: Script not updating. Please help.  (Read 1991 times)

0 Members and 1 Guest are viewing this topic.

Script not updating. Please help.
« on: August 17, 2017, 11:02:43 PM »
So someone is probably going to point out the obvious to me, but I can not figure it out.

I am trying to setup the tool changer M6 like @DazTheGas has in one of his videos. I am following it to the T.  The script works fine in debug and displays what it should. When I save, shutdown and re-open mach and try to MDI an M6 command, it still displays what the old script had in it.

How do I get mach to load the new M6 script?
« Last Edit: August 17, 2017, 11:04:34 PM by Phukdat »
Re: Script not updating. Please help.
« Reply #1 on: August 17, 2017, 11:25:27 PM »
Hi,
where are you saving the m6 script? Sounds to me like you're saving it in a different profile.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Script not updating. Please help.
« Reply #2 on: August 17, 2017, 11:39:08 PM »
Hi,
where are you saving the m6 script? Sounds to me like you're saving it in a different profile.

Craig

It is being saved in the same folder as the same name as the original. The location and the name has not changed.

I thought that it might have been a different profile too, so I put the new script into both of the only two profiles that I have on there. It still ran the old script.
Re: Script not updating. Please help.
« Reply #3 on: August 18, 2017, 06:57:11 AM »
You can confirm the location where the new macro should be. Look at the
box at the bottom right corner of the Mach4 screen and note the name
in the Profile box. Your updated macro must be in:

Mach4Hobby/Profiles/name from the profile box/Macros

If you still have the problem, the only thing I can think of is to delete
the file M6.mcc from your Macros folder. This will force Mach4 to
recompile your macro on the next startup. This normally happens
automatically.

Steve Stallings
www.PMDX.com
Steve Stallings
www.PMDX.com
Re: Script not updating. Please help.
« Reply #4 on: August 19, 2017, 06:26:19 AM »
OK. So it turns out that I wasn't following DazTheGaz's code to a T. I tried deleting and forcing to compile with no success either. What actually made it function was changing the name from 'm6' to 'M6' and subsequently changing the function name to the same to match. That actually got the code working.

While searching for solutions, I came across a piece of code for m6 in the lua script compilation. Around line 70 or so there is the code to display the tool change dialog box. In that display it is not editable though. Where can I find that piece of code so I can comment it out? I am using message boxes like in Daz's tutorial so I do not need that piece of script running.

I can post pics of this code later if need be.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Script not updating. Please help.
« Reply #5 on: August 19, 2017, 10:46:25 AM »
Post the code and I will look at it. The message box is in the master module if I'm not mistaken.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Script not updating. Please help.
« Reply #6 on: August 19, 2017, 11:37:53 AM »
Post the code and I will look at it. The message box is in the master module if I'm not mistaken.

Here is a pic of the script.
I might be able to just comment out Daz's message box and leave this one alone, but it still would be nice to know where this is located.