Importing macros to a new install

Home Forums Multi-Edit Support Importing macros to a new install

This topic contains 45 replies, has 14,733 voices, and was last updated by  klink 14 years, 7 months ago.

Viewing 15 posts - 16 through 30 (of 46 total)
  • Author
    Posts
  • #5238

    DanHughes
    Participant

    You didn’t specify which version of Multi-Edit you are trying to add these menu entries to.

    Creating an AddOn package to do what you want would probably be the best way to do this. Most of the information you need to create an AddOn package is in the 9.0 and 9.10 help files. There are a number of examples of AddOn packages released with both 9.0 and 9.10. For 9.10 these packages are located in the AddOns subdirectory of the main Multi-Edit 9.10 install.

    Your installer would copy all of the files of your AddOn package to the correct place, i.e. c:\Program Files\Multi-Edit 9.10\AddOns\yourPkgName, and then it would start Multi-Edit using something like the following:

    “c:\Program Files\Multi-Edit 9.10\Mew32.exe” -r “Update^Install /A=1/F=c:\Program Files\Multi-Edit 9.10\AddOns\yourPkgName\Install.lst”

    #5239

    klink
    Participant

    I have version 9.10.04, but I haven’t found any information on creating an install.lst file. I have a .upd file w/ the macros, what do I have to do to create an install.lst file and use my installer that way?

    #5240

    DanHughes
    Participant

    OK, take a look at the AddOns\WinList directory under the Multi-Edit 9.10 installation directory. This is a complete AddOn to add the Windows List dialog to the Navigation Pane. It contains an Install.lst file that you can uses as an example.

    In the Multi-Edit Help, the Install.lst information can be found at:

    Modifying Multi-Edit Startup | Update Script Reference | Add-On Package Installation Files | Install.lst (Required)

    #5241

    Clay Martin
    Keymaster

    Oh, I though you were running a macro out of the config file to do the deleteing. What I sugested is cmac code.

    With the update scripts you will need to include the metacommands for the ME directory <ME_PATH> and <LFN> for the long file name likely to be involved in the ME path with your call to DelFile.

    so try
    DelFile <LFN><ME_PATH>Startup2.cfg
    assuming the file is in the ME directory. You may want to download a copy of the ME doc in PDF form. I think it is in the downloads section of the site. It has explanations of the metacommands and update scripts.

    HTH
    Clay

    #5242

    klink
    Participant

    I tried placing that in the startup2.cfg file. Do you think it might be able to delete itself? This is the directory the startup.cfg files are under:

    C:\Program Files\Multi-Edit 9.10\Config

    So is this how I should have the delete in the Startup2.cfg file:??

    DelFile <LFN><CONFIG_PATH>Startup2.cfg

    #5243

    Clay Martin
    Keymaster

    Looks good. You may have a point about deleting istself, but that is beyond my keen, Dan will probably have to answer that one.

    #5244

    klink
    Participant

    I think that might be a problem, b/c I am not getting a delete to happen.

    Unless MEW recreates this file when it is not there.

    #5245

    Clay Martin
    Keymaster

    I don’t have a startup2.cfg so I don’t think it is being recreated.

    You could try enclosing all your startup2.cfg commands in a if statement that checks for a global variable

    If <~yourvar> != 1
    ….
    Endif

    and within the if block create that variable with
    GInt yourvar 1

    Thus your block of code would be skiped after it runs once. Yea its a bit cludgy :roll: but might get around the delete file problems.

    If that does not work ’cause the var does not exist then maybe:
    GInt yourvar
    If <~yourvar> != 1
    GInt yourvar 1
    ….
    Endif

    HTH,
    Clay

    #5247

    Michal Vodicka
    Participant

    Using run once guarded by a global variable can be a good idea but I’m affraid it would run again for any new session. The next possibility is to delete it using exit macro I described before. Deleting script from inside doesn’t seems reasonable to me.

    The most general way is to use Add-On package as Dan suggested.

    #5248

    klink
    Participant

    I’m completely new to MEW, and the install.lst, but I’m trying to figure it out. All I need in MyPackage folder is an install.lst and mymacro.upd??
    It also seems that the install.lst file only has one line in it? Is this correct? Do I need more files?

    If I install this to the directory will MEW update itself when it starts up next, or do I need to have the installer run those commands to open MEW and update itself?

    #5269

    ReidSweatman
    Participant

    I’m likely missing the whole point here, but I have kibitzing on both sides of my family. ;) Why not use the Import/Export facility on a machine configured as you want, to create the update files containing the custom configuration? Then use your installer or a batch file to run each user copy of Multi-Edit using the /R command-line flag to run the update macro? (On a side note, the documentation for the update facility is under the heading Adding Features to Multi-Edit in the online help.) Of course, as Michal noted, macros run that way execute before the program is fully initialized; whether that would be a problem for a macro only attempting to update the command map, I don’t know.

    More versatile, albeit more involved methods would use either Multi-Edit’s DDE or COM server to do pretty much the same thing. The documentation for that is in the section right after the update reference, titled Integrating External Applications. Overkill, perhaps, but not all that hard to do, if you’re even a little familiar with either interface. Besides, it’s useful to know for other things, as you can pretty much totally automate Multi-Edit that way, especially using the COM interface.

    I guess them’s my 0.02 Zorkmids.

    #5275

    klink
    Participant

    Where is the help online? I tried using the help supplied and seeing if there was a way to connect online, but it only goes to the forums. Is the help in the forum? This is not the easiest website to look around. Can somebody post the website? Thanks.

    #5276

    Clay Martin
    Keymaster

    The new ME manual is , seconnd entry from the top.

    #5277

    klink
    Participant

    Also is there a command to add to the line to close Multi-Edit once it has finished updating?

    #5278

    klink
    Participant

    The manual has the same line the help has on installing packages: “More information on setting up your own Add-On Packages or about the Update macro can be downloaded
    from our web site.”

    Where can it be downloaded from?

Viewing 15 posts - 16 through 30 (of 46 total)

You must be logged in to reply to this topic.