Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: miket on January 09, 2011, 07:56:19 AM

Title: edit button script will not save in R3.042.040
Post by: miket on January 09, 2011, 07:56:19 AM
Hi,
I upgraded Mach3 recently to R3.042.040 from R2.0.065.
In the old version 'Edit button script' saved any changes to the button as expected but
in the new Mach3 version I just can't get it to change any key's VB script.
I also noticed that after a screen save within Mach3 the *.set file does not get updated (same old script contents)
but the date and time does.
Also, under XP the directory Mach3/macro attribute is 'read only' and can't be changed.

I must be doing something stupid - any ideas?
Thanks
Title: Re: edit button script will not save in R3.042.040
Post by: ger21 on January 09, 2011, 12:39:05 PM
If all your files are set to read only, then that's the problem. Did you copy them from a CD? That'll do that. You need to right click on the files, choose properties, and remove the read only attribute.
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 09, 2011, 01:26:04 PM
Thanks for the reply but resolved the problem.
It was a wrong startup script for the keygrabber and not the read only attribute.
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 14, 2011, 06:29:59 PM
HI,

I thought I had resolved this problem but alas NO.
If I start Mach3 with /p myprofile all is well. When I edit a macro under mach3/macro/myprofile
the file is modified and saved but when I start mach3 with the following
c:\mach3\keygrabber.exe /p myprofile the macro being edited does not show the modifications after a save
although the file under macro/myprofile has been modified and saved.

Keygrabber must be redirecting the file source directory or making it read only.

Again I ask the community for a resolution to this.
Thanks.
Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 14, 2011, 06:44:10 PM
Just tested here and it seems fine. Try clicking the File menu then save in the editor and see if that makes a difference, well thats if its not what you are already doing.
Hood
Title: Re: edit button script will not save in R3.042.040
Post by: ger21 on January 14, 2011, 06:58:52 PM
Are you saying the file is saved, but Mach3 is not reading that file, but an older version??
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 15, 2011, 06:02:41 AM
I tried again and it's confusing!

For example: I edit the Hiddenscript for Auto Z macro (in macros/myprofile using a Windows editor without Mach3 running
and confirm the changes. I then start mach3 using Keygrabber.exe /p myprofile  and open 'Zero Z macro' the file does not
reflect the previous changes!! So which file has it opened and from where?
The file I changed using a windows editor has now been changed back by Mach3.

When I start mach3 without keygrabber and modify hiddenscript prior to the run the file opens without the changes but
changing it in mach3 is fine.

Also, why is this file called Hiddenscript and why not have an unique macro file name for all programmable keys on mach3 screens?

Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 15, 2011, 06:26:51 AM
If I am understanding correctly what you are saying I think you are maybe getting confused. You mention Hidden Scripts , that is not really a macro, it just seems to be the last macro you edited but it wont actually change any macro.
If editing a button script the script is contained in the button and not in the macro folder so you can only ever change by using the Edit button scripts in Mach.
If I misunderstood what you are meaning then I appologise.
Hood
Title: Re: edit button script will not save in R3.042.040
Post by: ger21 on January 15, 2011, 08:01:29 AM
As Hood says, you're doing it wrong. In Mach3, go to Operator > Edit Button scripts. Click on the button, and edit the code. Then save "HiddenScript.m1s". This is the ONLY way to edit scripts in Screen buttons. This is actually saving the macro in the screenset, and NOT in HiddenScript.m1s.

Opening HiddenScripts.m1s from the \macros folder is NOT the same file.
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 15, 2011, 09:21:15 AM
OK. I agree the button macros are stored in the *.set file. When I run via Keygrabber as before and modify a key macro then modify and save the
named *.set file it has an updated time stamp as expected. The problem is when I search the *.set file using a hex file viewer the contents of that embedded macro has not changed. It only changes if I start mach3 without the initial Keygrabber preamble.
Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 15, 2011, 12:01:52 PM
The steps are,
open Mach,
choose Edit Button Scripts (from Operator menu)
 Click button you wish to edit,
 edit the script,
preferably use the save from file menu and close editor.

Is that what you are doing?
 If it is then I dont know why its not working for you as I am trying that here with the version you mention and using keygrabber.
If you attach your xml and .set I will test here with them and see if I get the problem.
But if you are doing it in a different manner then its not going to work.
Hood
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 15, 2011, 01:13:15 PM
Hi Hood,
Yes. I  edit the button in Mach3 using edit button script and it works if i dont use
the keygrabber. The files in question are attached.
Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 15, 2011, 02:06:29 PM
Can you also attach your .grab file that you have for the Keygrabber.
Hood
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 15, 2011, 02:31:11 PM
Here is the grab file
Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 15, 2011, 02:54:21 PM
Afraid I cant replicate your problem here, it works fine for me, each time I edit shut down and restart and look again and the script has stuck.

Hood
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 15, 2011, 03:39:05 PM
Thanks for you help Hood. I will now clean the Mach3 installation and start again and see what happens.
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 16, 2011, 12:32:49 PM
Today I uninstalled Mach3 and setup Windows XP to be as lean as possible.
Ran mach3.exe /p myprofile and the edit button script works. The macro file is saved
and the myprofile.set file is updated.

But again, running keygrabber.exe /p myprofile does not save the file and *.set file is not
updated. Even saving the *.set file within Mach3 and reopening the macro does
not work.

I then tried another computer running XP home edition. I get the same result!!!!!

Unfortunately I will just have to use mach3 without the keygrabber,

Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 16, 2011, 12:59:24 PM
That is very strange indeed, works fine for me with your xml, screenset and .grab file, cant understand why its not for you.
Dont think there are different versions of keygrabber but maybe there are, one I have is version 4.0.0.11

Hood
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 16, 2011, 01:10:37 PM
My keygrabber is the same version.

Just to remind you what I do:

run mach3 using keygrabber, edit button script, modify file, save, close.
Check *.set file for date change (NO) , edit button script again and no change to file.

All this works fine if I dont use keygrabber.
Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 16, 2011, 01:24:24 PM
Well I dont check in any way, open Mach via keybrabber, edit button, close, then can edit button scripts again and it shows it changed or can exit Mach and restart and again it has the changes.
How are you checking the changes when you say "Check *.set file for date change"
Maybe try missing that step out and see if it works.
Hood
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 16, 2011, 02:14:49 PM
With Mach3 active I just open explorer window to check if the date of the *.set file is being updated.
It's not with keygrabber.exe /p etc  mode and it is with mach3 /p etc
Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 16, 2011, 02:30:45 PM
Ok if you press Save Settings on the Config menu it should update the date stamp. Lots of  things you change in Mach are not updated until you shut Mach down, unless you actually save them whilst Mach is open by using that Save Settings option.

Hood
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 16, 2011, 03:54:15 PM
I did all that but no joy. I assume by the way that after editing a macro and opening it again the changes should be
visible without saving anything - not in my case with this keygrabber.
Also, i am pretty sure the last ime i used 'edit macro' with keygrabber was about a year ago and it worked then.
Title: Re: edit button script will not save in R3.042.040
Post by: Hood on January 16, 2011, 05:00:19 PM
Dont have a clue what could be going on, if I edit the button, save and close then go back in it has still got the changes. Occasionally if you dont go to File then Save in the editor it will not change but that can happen with or without keygrabber.
Hood
Title: Re: edit button script will not save in R3.042.040
Post by: miket on January 19, 2011, 02:40:14 PM
I have noticed the following:

Edit button script - change the file then 'File save' then exit window
Then, 'VB script editor' - opens the previous file with the correct changes
Then Edit button script - no changes in file

What's going on with the Keygrabber?