Can I control menu commands via script?

Can I control menu commands via script?

4
NewbieNewbie
4

    9:20 - 3 days ago#1

    I want to write a script in UltraEdit to output markdown and directly view in 'Browser view'.
    Is this possible?

    I need to take action:
    1. switch Syntax Highlighting Display language to Markdown
    2. switch Browser view

    6,680583
    Grand MasterGrand Master
    6,680583

      18:57 - 3 days ago#2

      The commands Live preview (Vertical) and Live preview (Horizontal) and Toggle browser view and the command to change the syntax highlighting language for the active file cannot be executed by script or macro. They are not available as scripting/macro commands.

      The Key mapping configuration offers the commands Live preview (Horizontal), Live preview (Vertical), Browser view and View as language 1 to View as language 20 for associating a hotkey or a chord (multi-key) for quick execution of these commands by keyboard. The task can be done for that reason with pressing two hotkeys/chords.

      The Markdown syntax highlighting is applied automatically if a file with Markdown formatted text is saved with the file extension md. There can be configured in the syntax highlighting wordfile %APPDATA%\IDMComp\UltraEdit\wordfiles\markdown.uew also a different file extension than MD (case-insensitive) or added other file extensions in addition to MD for Markdown syntax highlighting. An asterisk as file extension appended at the end of the first line (after a space) would result in syntax highlighting all files with Markdown syntax highlighting which are not explicitly according to the file extension (or file name) syntax highlighted with a different language. It is also possible configuring Highlight new files as Markdown at Advanced - Settings or Configuration - Editor display - Syntax highlighting to syntax highlight new files by default as Markdown files until the file is saved with a file extension (or file name) other than those configured for Markdown syntax highlighting.

      Then Markdown syntax highlighting must not be selected anymore by key or pointing device and toggling live preview or browser view can be done by pressing the configured hotkey or chord.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        4:16 - 3 days ago#3

        The scripting feature is quite weak. 😢

        6,680583
        Grand MasterGrand Master
        6,680583

          7:06 - 2 days ago#4

          The scripting feature is for automated data management in text files. It is not for automatic controlling the GUI of UltraEdit.
          Best regards from an UC/UE/UES for Windows user from Austria

          4
          NewbieNewbie
          4

            7:28 - 2 days ago#5

            In fact, I want to use ChatGPT to assist with writing.
            Since UltraEdit Scripting supports WebView2, the fetch() making it possible to call the OpenAI API.
            It returns markdown, and I want to make the presentation look better.