Preloading macros issue

Product Compare Forums Multi-Edit Support Preloading macros issue

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2910
    MewUser
    Participant

    I have two *.s files that I want to have preloaded when MEW 11.04 starts.

    In C:\…\AppData\Roaming\Multi Edit Software\Multi-Edit\11\Config.04\Startup2.cfg, I have defined:

    LoadMac DXL
    LoadMac COMMON

    In C:\…\AppData\Roaming\Multi Edit Software\Multi-Edit\11\Config.04\Startup.cfg, I have defined:
    ;
    ; Load Macro Files
    ;

    LoadMac DXL
    LoadMac COMMON

    Originally, this worked as expected, but when I make a change to either *.s file, such as adding a new function, the new function does not get loaded. I have to recompile the *.s file to get MEW to recognize it.

    In my menu, when I call the macro, I use DXL^function… or COMMON^function….

    What is going on here on this Windows 7 system?

    The error message that I get from running a macro after starting MEW is as follows:
    Error #5001

    Macro or Macro file "" NOT Found in C:\Program Files\Multi-Edit 2008\ nor C:\Program Files\Mult-Edit 2008\MAC\.

    I compile the *.s files in C:\MultiEdit\Src\ directory(because of Windows 7 User Control)

    When I compile the *.s file, then I no longer get this message.

    This is extremely annoying.

    #9430
    Clay Martin
    Keymaster

    Hi,
    The pre-loading you are doing in the startup files gets the mac files preloaded into memory, and you are doing it as you should. BTW you only need to do that in startup2. But what this does is load the current version of the compiled .s file (.mac) into memory. On the load ME will search for the corresponding mac file first in the Mac directory in the user area(C:\…\AppData\Roaming\Multi Edit Software\Multi-Edit\11\Config.04\Mac), then in the Mac directory in the installed directory.

    When you run a macro function (abc^function), ME searches memory first, then user area, then install area. When you make a change to a .s file, that change is not reflected in the .mac file (what is actually run) until it is compiled. When you compile the .s file the mac version of it is updated in memory and in the user area. So when you change your .s file, you need to compile it for that change to be seen when you run the function.

    You can store your .s files anywhere on your harddrive, when you open the .s file, then compile it the compiled version (.mac) is stored in the Mac directory in the user area.

    Thanks,
    Clay

    #9431
    MewUser
    Participant

    Clay, Thanks for the fast response.

    I understand why a recompile is needed when I make a modification. The issue that I have, is that if I exit MEW, then restart it, I have to recompile to get MEW to recognize the macros.

    I thought that once the file is compiled, then the update is stored on the hard drive in the \mac folder, and subsequent recompiles should not be necessary.

    I look at C:\…\AppData\Roaming\Multi Edit Software\Multi-Edit\11\Config.04\Mac and find that the date modified of the *.mac is listed as 2012 dates of last modification, but I am daily compiling these.

    I understand the message, now that I see the files are not being updated as expected when compiling.

    Is there some setting internal to get this to work as expected?

    #9432
    Clay Martin
    Keymaster

    Hi,
    You are correct, that given your startup files, these should be loaded when you restart ME. Take a look in the other subdirectorys under
    C:\…\AppData\Roaming\Multi Edit Software\Multi-Edit\11\
    and see if there are other config directories with mac files with a correct date. Also you may want to check to make sure you are in the right user tree. A quick test might be to search your entire system for your specifically named .mac file and see if there are more than one location it can be found, and which location has the current copy.

    The last thing I can think of is if the compiler entry was different than what ships factory. Here is what the default CMac compiler entry looks like:
    "<ME_PATH>CMacWin.exe" "<FILE>.<EXT>" -P"<MAC_PATH>" -I"<ME_PATH>Src" -O"<MEERR>" -W

    Clay

    #9433
    MewUser
    Participant

    Clay, I have searched for both of my *.mac files on Windows 7, and it returns "no item found".

    I do not have other directories in the App data path.

    My compiler entry is listed as such:
    "C:\Program Files\Multi-Edit 2008\CMacWin.exe" "<FILE>.<EXT>" -P"C:\Program Files\Multi-Edit 2008\Mac" –
    I"C:\MultiEdit\Src" -O"<MEERR>" -W

    C:\Program Files\Multi-Edit 2008\Mac files are all dated 8/27/2009, and I do not see any of my compiled files there.

    I did look at the properties of C:\Users\…\AppData\Roaming\Multi Edit Software\Multi-Edit\11\Config.04\Mac and C:\Program Files\Multi-Edit 2008\Mac and found that they were both read only. Unset the read only, and changed -P to now read -P"C:\Users\…\AppData\Roaming\Multi Edit Software\Multi-Edit\11\Config.04\Mac" and see that the macro file is being updated, and now, when restarting MEW, I no longer have to recompile.

    #9434
    Clay Martin
    Keymaster

    Ok here is the problem
    "C:\Program Files\Multi-Edit 2008\CMacWin.exe" "<FILE>.<EXT>" -P"C:\Program Files\Multi-Edit 2008\Mac" –
    I"C:\MultiEdit\Src" -O"<MEERR>" -W

    Win 7 will not allow you to write to the program files directory tree. So the compiled mac files are never updated.

    You need to change the compiler entry to
    <ME_PATH>CMacWin.exe" "<FILE>.<EXT>" -P"<MAC_PATH>" -I"<ME_PATH>Src" -O"<MEERR>" -W

    Thanks,
    Clay

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.