Dtermine tab size from within a macro

Product Compare Forums Multi-Edit Support Dtermine tab size from within a macro

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2939
    HumanPotato
    Participant

    Hello,

    Is there any way to determine the size of a file’s tabs from within a macro? I am talking about the value that is entered under "Tab Spacing" in the "Edit Filename Extension Setup" dialog.

    #9500
    Clay Martin
    Keymaster

    Hi,
    I’m guessing that there is a extension related global variable with this info. But barring that you could also look at your column position and then use one of these functions to move to the next tab spot, note the difference in column position then move back. From the CMac users guide:

    Tab_Left void function
    Moves the cursor one Tabstop to the left. No characters are inserted or deleted.
    The Tab macro in the Mesys.s file is a wrapper function for this macro
    command. Wrappers are typically used to facilitate execution of a function via keyboard hotkeys.
    rm("Tab /M=1");
    Tab_Right void function
    If Insert_Mode = TRUE, AND the System Variable Tab_Expand = TRUE, a virtual tab character is inserted at the cursor position and the text is moved one tab stop to the right; if Insert_Mode = TRUE AND Tab_Expand = FALSE, the text at the cursor is moved one tab stop to the right and spaces are inserted from the last position to the current position. If Insert_Mode = OFF AND Tab_Expand = TRUE, a tab character will OVERWRITE the character at the current cursor position; if Insert_Mode = OFF and Tab_Expand = FALSE, the cursor will simply move to the next tab stop.
    CMac Users Guide Standard Template Macro Reference • 221
    The Tab macro in the Mesys.s file is a wrapper function for this macro command. Wrappers are typically used to facilitate execution of a function via keyboard hotkeys.
    rm("Tab /M=0");

    Also you might look in the source code in mesys.s for these functions and see how they determine how far to go.

    Hope this helps,
    Clay

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