Autosave skip ?No-file? option

Product Compare Forums Multi-Edit Suggestions Autosave skip ?No-file? option

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #784
    jrevill
    Participant

    I would like an Autosave option to always ignore ?No-File? windows.
    This would save me from having to comment out the
    if( CAPS(File_Name) == ‘?NO-FILE?’ ) {

    }

    block in mesys^autosave after each update or re-install.

    Thanks

    John Revill

    #3069
    tpaynetx
    Participant

    I think it would be good to have that option but also have something on each window that turns off the autosave as well. I had requested that back while version 9 was in beta.

    #3253
    samej71
    Participant

    I’ve asked for this awhile back as well; I hope MESI will consider adding it as an option at least in 9.1?

    –James

    #5541
    markr
    Participant

    I tried the change that was recommended in the latest newsletter and then re-compiled the macros. The behaviour didn’t change.

    I then sent an email to support on May 1, but have not seen a response.

    Here’s the issue:

    I am a mew 9.0e licensee. I’ve hesitated upgrading because the main feature I need, ftp support for me, is still not available.

    I was also annoyed by the auto-save request for a “no filename” window. Therefore it was good to see that a solution was offered for it in your latest newsletter.

    I made the change to the indicated code, then ran the compiler, but for some reason the behavior is not fixed.

    Here’s what I did:

    Found mesys.s in the src/ directory
    Searched for Rm( “AutoSave” );
    Found it (line 2891)
    Changed it to Rm( “AutoSave /NF=1” );
    Then I selected Tools… Execute compiler.. And then Compile CMACWIN macro.

    The compile returned:
    Multi-Edit for Windows CMACW Macro Language Compiler V9.0e
    Output-File = C:\PROGRAM FILES\MULTI-EDIT\MAC\MEWSYS.MAC

    I closed and re-started ME then opened a new window. A few minutes later, the auto-save triggered.

    Did I do this properly?

    Code I changed is below:

    macro AutoSaveTimer trans2
    /*******************************************************************************
    MULTI_EDIT MACRO

    Name: AUTOSAVETIMER

    Description: Manages autosave timer events. The timer can be based on the amount of time that has passed since the last time the user pressed a key (or moved the mouse), or on an absolute interval. This macro is only intended to be run by assigning it as a timer event macro. EXAMPLE:
    Timer_Handle := SET_TIMER_EVENT(‘AUTOSAVETIMER /NOW=0/T=10/S=0’, 18, EDIT);

    Parameters:
    /NOW= If <> 0, will immediately autosave. This is for the absolute
    interval method. IF 0, then the keyboard inactivity method is used.
    /S= If <> 0, then the complete status of the editor is saved as
    well as the files.

    (C) Copyright 1991 by American Cybernetics, Inc.
    *******************************************************************************/
    {
    int BLine;
    int ELine;
    int BCol;
    int ECol;
    int SSearch_Highlight;

    if ( Global_Int( “Menu_Level” ) ) {
    // We don’t want to autosave in the middle of a menu or prompt
    return ( );
    }
    if ( Parse_Int( “/NOW=”, MParm_Str ) ) {
    goto Go_AutoSave;
    }
    if ( Global_Int( “!LAST_AUTOSAVE_TIME” ) < Last_Keypress_Time ) {
    if ( ( Last_Event_Time – Last_Keypress_Time ) >= Parse_Int( “/T=”, MParm_Str ) ) {

    Go_AutoSave:
    // Save search highlight info
    SSearch_Highlight = Search_Highlight;
    // if ( SSearch_Highlight ) {
    // Get_Highlight( BLine, BCol, ELine, ECol );
    // }

    Set_Global_Int( “!LAST_AUTOSAVE_TIME”, Last_Event_Time );
    Set_Global_Int( “@TEMP_RETURN_INT”, Return_Int );
    Set_Global_Str( “@TEMP_RETURN_STR”, Return_Str );
    Rm( “AutoSave /NF=1” ); // NF=1 parameter causes autosave to ignore nofile window
    if ( Parse_Int( “/S=”, MParm_Str ) && g_Restore ) {
    Rm( “Exit^Status” );
    }

    #5542
    David Morris
    Participant

    markr, you have to rebuild the macro library for any system macro changes to take affect after a restart.

    In the Start Menu program group there is a “Rebuild Macro Library” icon. You must run this after any system macro changes.

    #5543
    tlscales
    Participant

    This feature might not be available in 9.0e (I don’t know for sure, since I no longer have a copy of the old source) – check the autosave macro and see if “NF=1” is mentioned in the comment at the top of the macro (search in mesys.s for “macro AutoSave”; in the 9.10 source code, this is around line 2813).

    Did you rebuild the macro library after recompiling the macro source? You need to do this after exiting from MEW for the change to take effect.

    #5544
    markr
    Participant

    Solved!

    It was really stupid of me to forget about rebuilding the macro library (linking the compiled changes). But I very rarely make any changes to ME, so perhaps this is my good excuse?

    I think, for us programmer types, maybe naming these functions “compile” and “link” or combining them into a single operation would be nice.

    Thanks for your assistance!

    #5545
    Ken Walker
    Participant

    You mean people actually read my articles?? LOL

    #5546
    AndyColson
    Participant

    Huh? What article? :lol:

    -Andy

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