News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

A general purpose code editor with scripting support

Started by hutch--, November 29, 2022, 10:24:38 AM

Previous topic - Next topic

hutch--

Over time a number of people have wanted a coding editor that they can modify and develop for their own personal preference. The attached zip file has a reasonably simple editor that supports calling a tweaked version of a script engine that can read the script form used in the MASM64 SDK to build working templates.

It is intentionally under developed so that it can be individually customised to personal preference, it just does the main hack stuff, File IO, search and replace, about box etc ....

hutch--

A simple mod to add your own "Tools" menu and call any tools of your choice.

Open the "rsrc.rc" file and add the following script to it. This gives you a new menu on the menu bar.

    POPUP "&Tools", , , 0
    BEGIN
        MENUITEM "Run Color Picker", 350
        MENUITEM "", , 0x0800 /*MFT_SEPARATOR*/
        MENUITEM "Run Get Color", 351
    END

In the .data? section, add the following two (2) items.

      pBuffer   db 260 dup (?)  ; allocate a buffer for the app path
      pPath     dq ?

In the entry_point procedure, add the line,

    mov pPath, rv(GetAppPath,ADDR pBuffer)              ; get the editor path for later use

In the "WndProc" procedure within the .switch block for WM_COMMAND, add the following two ".case" items.

          .case 350
            mov pBuf, ptr$(buff)                        ; get pointer to 260 byte buffer
            mcat pBuf,pPath,"cpicker.exe"               ; add file name to path
            exec pBuf

          .case 351
            mov pBuf, ptr$(buff)                        ; get pointer to 260 byte buffer
            mcat pBuf,pPath,"getcolor.exe"              ; add file name to path
            exec pBuf

If you have copied the two (2) small apps cpicker.exe and getcolor.exe into the same directory as the editor, selecting them from the menu will work correctly. The reason for the editor path prefixing the buffer is so the apps on the menu can be called from any location on the computer.

The two small apps are only used as test pieces, with this simple mod, you can set up as many tools as you want on one or more menus and extend the editor to fit what you require.

HSE

Equations in Assembly: SmplMath

daydreamer

Great hutch :thumbsup:
I think i will be forced to use hll for the kind of editor i want to try make: Android simplest code editor

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding


Gunther

Steve,

that's a very useful tool. Thank you very kindly for this.  :thumbsup:
You have to know the facts before you can distort them.