Save $55 when you upgrade UEStudio to the Suite! Offer ends in 00:00

Home » Downloads » Macros / Scripts

User-Submitted Macros and Scripts

If you have any macros or scripts you would like to share with other users, please email them to support@ultraedit.com.

Macros

Macro tutorials

Macros

Scripts

Scripting tutorials

Starter scripts for learning

  • Hello world
    A basic JavaScript to introduce you to scripting support in UltraEdit/UEStudio.
  • String var
    Demonstrates how to programmatically use a user-provided string

Scripts

  • ANSI/Unicode string to Perl regexp string
    Script to convert a selected ANSI or Unicode string to a Perl regular expression string in clipboard by replacing all characters with code value greater than 127 by their hexadecimal representations.
  • Backup single (active) file
    Creates a time-stamped backup file of the active file in the same directory
  • Backup/copy active file and open in new window
    Copies the active document to a new window and saves it as a new version of the original file with a quasi-versioning system (Note: requires FileNameFunctions script)
  • Columnizer
    Takes a multi-row selection and inserts spaces between the words, as necessary, to form columns.
  • Convert ASCII-represented hex to hex
    Takes a user selection of ASCII-represented hex data and converts it to actual hex data. For example, pasting "68 65 6C 6C 6F" into a new text file and running the script on it will convert it to "hello".
  • Convert all open files to DOS line terminators
    Converts all open files to DOS format (0D 0A line terminators)
  • Convert box-bracket function parameters to comments
    Changes open and close box brackets in function parameters in selected text with open and close comments
  • Convert files to UTF-8
    Converts all files in a folder or folder tree, or all open files, or all project files to UTF-8 while also updating the character set or encoding declaration of HTML, XHTML and XML files.
  • Copy file content
    Copies entire content of active file to active clipboard without changing the caret (cursor) position in the file
  • Count selected lines
    When invoked, returns a prompt of how many lines are currently selected
  • Count selected lines v2
    An updated selected line counter with automatic support for DOS, Unix, and Mac line terminators
  • CSV transposer
    Takes a csv file and transposes the data horizontally
  • Delete lines containing string
    Deletes lines containing user-specified string, then reports on what was deleted
  • File name functions
    Contains functions to get the file extension, or the file name with or without extension, or the file path from an opened document or a file name string
  • Filter lines
    Filters lines from file containing a specified string (like List lines containing string)
  • Find string with selecting block
    2 functions for selecting a block between 2 found strings or a found string and the cursor position
  • Find strings to new file
    Scripts to find strings with a regular expression and output the found strings to a new file line by line.
  • Fixed column to CSV
    Script with function to convert a fixed column file to a CSV file with separator and field widths entered by the user.
  • Get a list of files
    Function to get a file list into edit window based on various parameters for running a script on all files in the list
  • Get line terminator
    Function that will detect the line terminator of the active document, then store it in a variable "terminator" that may be accessed globally and used for other operations.
  • Getter/setter method generator
    Generates getter/setter methods (as typical in Java code)
  • Header
    Creates a header for all open documents
  • Hex Copy
    A function with examples for usage to get an ASCII string with hexadecimal values from text or binary data. It offers lots of parameters to determine input source, output destination and format of the output.
  • Hide Lines Not Containing String
    Hide all lines not containing a certain search string via hide/show lines.
  • Is Unicode file
    Function which detects if just opened text file is loaded as Unicode file or as an ASCII/ANSI file
  • Javadoc comment block for a function
    Creates a Javadoc comment block for a function signature with the function's parameters and return type parsed and included.
  • Join lines
    Automatically joins/combines selected lines
  • JSON Reformat
    Parses entire file (or selection, if it exists) and reformats JSON data to make it more human readable
  • Line randomizer
    Converts selected text into an array split at each line terminator, then randomizes the array and writes out each line randomly
  • Lorem ipsum generator
    Generates lorem ipsum placeholder text with options for paragraphs/words
  • Merge CSV files
    Script to merge / combine / copy the data of all files with extension CSV in a specified folder into a new file with special CSV related options
  • Merge text files
    Script to merge / combine / copy the content of all specified files in a specified folder or all open files into a new file
  • Remove Successive Lines With Duplicates
    Checks one line at a time. If the line contains a match of the specified regular expression, then the next line is checked as well. If both lines contain a match, and the matches are exactly the same, the second line is considered a duplicate and deleted from the file.
  • Reverse lines
    Takes a selection of lines and reverses the order
  • Snippets
    Emulates "snippets" via scripting engine when coding HTML
  • Sort Lines Based on Length
    Sorts entire file based on length of lines (Not for use on very large files)
  • Sort Strings
    Takes a set of selected strings and sorts them alphanumerically (assumes that the strings are separated by commas)
  • XML title save
    Finds the <title> value in an XML document, then saves the file as the title.xml in a user-specified directory
  • Zap Gremlins (remove non-printable characters)
    Removes non printable characters (known as "gremlins") from file. If a selection exists prior to the script being played, then it will remove non-printable characters from the selection (no reporting).

Back to Top