Hello Guest it is December 06, 2021, 06:51:13 AM

Author Topic: script changes not aplied after saving  (Read 477 times)

0 Members and 1 Guest are viewing this topic.

script changes not aplied after saving
« on: April 06, 2019, 08:24:11 AM »
Mach4 v3804

When I make changes to Scripts with Notepad ++ and save the file via CTRL + S, they are not taken over in the current instance. m6 or other .mcs in Profile/Macro folder or .lua in Profile/Module folder.
I have to restart Mach4 so that the changes are taken over, very annoying.

In Mach4 v3481, the changes were accepted immediately after saving.

I also tried it with the Zerobrain editor via menu operator -> Edit / Debug scripts. or Open Script Editor.
Open Lua in Profile / Modules folder, make changes, save by Ctrl + S and Menu Project -> Compile show no changes in the current instance.
Re: script changes not aplied after saving
« Reply #1 on: April 06, 2019, 12:17:12 PM »
Menu Operator -> Edit / Debug scripts. and change a custom m-code script in the profile / Macros folder. Changes are immediately applied in the instance after saving.

At Files in Profile / Modules folder not.

Offline reuelt

*
  •  487 487
    • View Profile
Re: script changes not aplied after saving
« Reply #2 on: April 06, 2019, 04:06:02 PM »
restarting Mach4 after changes is always a PROPER thing to do.
Same with Windows, for registry changes, you have to reboot the PC.

Files or settings CURRENTLY in use CANNOT be changed instantly without restarting.

Some changes e.g. setting soft-limits - no restarting is necessary.
"the gift of God is eternal life through Jesus Christ our Lord"
Re: script changes not aplied after saving
« Reply #3 on: April 06, 2019, 04:25:15 PM »
Hi,
if you use a text editor like Notepad++ the newly edited macro will not be compiled.

In the Profiles/<your profile>/Macros directory you will find several files all relating to the macro you are working on.
The source file *.mcs, the complied code *.mcc and a backup file *.bak.

If you edit m6.mcs say, the original m6.mcc remains unchanged until you compile the newly edited source file.

The ZeroBrane editor does a pretty good job of compiling and updating the *.mcc file but is not infallible.

If you want to be sure that a change is going to be recognized delete the *.mcc file. Then Mach will have to compile a
new file and it will use the most current source *.mcs file to do so.

Craig
My wife left with my best friend...
     and I miss him!