(239 Kb)
Updated: 08-28-12 09:45 AM
File Info
Updated:08-28-12 09:45 AM
Created:02-07-11 06:32 PM


by: Saiket [More]

_DevPad is an in-game text editor and addon authoring tool, inspired by Mud's Hack.

Keep notes with it, write Lua scripts, or prototype addon concepts in its trimmed down development environment. Organize your scripts into folders and share them with other _DevPad users. Scripts can run automatically on login like mini addons, and can call each other like libraries or dependencies.


When you first install _DevPad, it includes an “Instruction Manual” script with a quick reference to using the mod. Here's an even quicker reference to the simple UI:

List Window

  • Reorganize scripts and folders by dragging and dropping. Rename any folder or script by double clicking.
  • Set scripts to auto-run by clicking the arrow buttons next to their names in the list. They will then run right after _DevPad's ADDON_LOADED event in the listed order.
  • Search script contents using Lua patterns in the search bar below the list.

Editor Window
  • Adjust font and font size, toggle Lua mode per-script, and access other editing tools with buttons at the editor's top-right.
  • Scripts in Lua mode appear syntax-highlighted (courtesy of krka's ForAllIndentsAndPurposes) and reveal UI Escape Sequences for editing directly.
  • Without Lua mode, chat links in scripts become clickable, and text coloring tools appear at the editor's top-right.
  • Use line numbers to navigate code. Click a line number to select that line.
  • There is no save button; Script text is saved as you type.
  • Undo and redo changes with standard keyboard shortcuts, or with the left and right arrow buttons at the top-right of the editor.
  • Use familiar keyboard shortcuts to manipulate text:
    • <Ctrl+Z>/<Ctrl+Shift+Z>: Undo and redo.
    • <Ctrl+G>: Go to line number dialog.
    • <Ctrl+F>: Focus the list's search edit box.
    • <F3>/<Shift+F3>: Jump to next/previous search result.


There are two ways to open the list window: by keybind, or with the “/devpad” or “/pad” slash commands.

There are also two ways to run scripts as Lua code. With a script open, click the play button at the top-left of the editor window. Alternatively, you can run them by name if you include a Lua pattern with the slash command, like so: “/devpad Example Script”. You can use the slash command in a macro to bind keys to _DevPad scripts.

Sending and Receiving

You can send scripts, even entire folders, to others with the trumpet icon at the top of the list window. When you receive something, you'll hear a sound and see a chat message prompting you to open your _DevPad. Once opened, you can choose to keep or discard the new item. Remember to always inspect what you receive from others before you run it though!

  • For help writing scripts, see the default “Instruction Manual” and “Example Script” pages.
  • Some components of _DevPad can safely be deleted to trim the editor even further:
    • <_DevPad/_DevPad.DefaultScripts.lua>: Default scripts and folders.
    • <_DevPad.GUI/_DevPad.GUI.Editor.Color.lua>: Color editing tools for non-Lua scripts.
    • <_DevPad.GUI/_DevPad.GUI.Editor.History.lua>: Undo and redo history.
    • <_DevPad.GUI/_DevPad.GUI.Editor.LineNumbers.lua>: Line numbering.
    • <_DevPad.GUI/_DevPad.GUI.List.Search.lua>: Script text searching tools.
    • <_DevPad.GUI/Libs/ForAllIndentsAndPurposes>: Syntax highlighting.
  • By default, _DevPad comes with an “Importers” folder containing scripts to import pages from other notepad mods. WowLua, Hack, and TinyPad are currently supported. See the comments at the tops of these scripts for specific usage instructions.

  • / GUI: Moved editor line numbering into an optional module.
  • / GUI:
    • Added text coloring controls to the editor while not in Lua mode.
    • Added an IterateChildren method to folder objects, usable as `for Child in Folder:IterateChildren() do ... end`.
    • Folders that temporarily open while dragging a list entry now close afterwards if nothing was dropped into them.
    • Separated list's search functionality into its own optional module.
  • / GUI:
    • Added multiple undo and redo to the editor, controllable with <Ctrl+Z> and <Ctrl+Shift+Z> or left and right arrow buttons at the top-right of the window.
    • The editor now remembers cursor positions, so you can close or swap scripts without losing your place.
  • / GUI:
    • Added a new default library script named “Libs/RegisterForSave” to allow other scripts to save variables between sessions. See <_DevPad/_DevPad.DefaultScripts.lua> if you want to copy it into your existing pad.
    • While dragging an object in the list window, folders will only expand if you hold your mouse over them briefly.
    • Folders can now be opened and closed by simply clicking their names. Also, they now temporarily close while being dragged.
  • / GUI:
    • Slash command now only prints the run script's name if more than one match was found.
    • Added a faint line highlight to the editor.
    • Scripts and folders can now be broadcast over the guild officer channel.
  • / GUI: Fixed buggy scrollbar behavior in 4.1.
  • / GUI: The Lua syntax highlighting option now also controls “raw text” mode, allowing you to see and edit UI Escape Sequences. When disabled, chat links become clickable inside the editor.
  • / GUI: Initial release.
Optional Files (0)

Archived Files (7)
File Name
11-29-11 06:01 PM
08-07-11 05:53 PM
07-21-11 11:00 PM
06-28-11 02:27 PM
04-26-11 10:47 AM
02-12-11 04:50 PM
02-07-11 06:32 PM

Post A Reply Comment Options
Unread 06-09-12, 01:16 AM  
A Chromatic Dragonspawn
Saiket's Avatar
AddOn Author - Click to view AddOns

Forum posts: 152
File comments: 330
Uploads: 21
Re: questions

Originally Posted by spiralofhope
Can a script learn its own name?
lua Code:
  1. local NS = ...; -- Reference to the script's object
  2. print( "Name:", NS._Name );

Originally Posted by spiralofhope
Is there functionality for a script to read/write DevPad textfiles/notes?
lua Code:
  1. local Script = _DevPad:GetClass( "Script" ):New(); -- Creates an unused/unlisted script table
  2. Script:SetName( "Note" );
  3. Script:SetLua( false ); -- Disable syntax highlighting
  4. Script:SetText( "..." );
  5. _DevPad.FolderRoot:Insert( Script ); -- Add the script to _DevPad's list

Originally Posted by spiralofhope
Is there simple functionality to let me access savevariable-type stuff? (not for other addons - I know that's not possible) For example, if devpad maintained a save variable table for itself, then I could read/write arbitrary data which could survive a reload ui / restart.
I added a library called "RegisterForSave" to one of the more recent releases, but if you used _DevPad before then, you have to copy it in manually. Search <_DevPad/_DevPad.DefaultScripts.lua> for "RegisterForSave" and copy that script's contents into a new page in your list somewhere (it doesn't need to be under "Libs"). The library stores saved variables in a folder of script pages, to avoid tampering with _DevPad's raw saved variables. It behaves similarly to the old RegisterForSave API, with additional support for default values.
Report comment to moderator  
Reply With Quote
Unread 12-11-14, 11:35 AM  
A Deviate Faerie Dragon
spiralofhope's Avatar

Forum posts: 11
File comments: 214
Uploads: 0
Still using it

Although I took a break from WoW, I came back and I'm still using _DevPad. Since i found it all those years ago it's been an invaluable tool.


I'm even more rusty than my previous break, but I'm slowly getting back into things. Right now I hit a wall with having a script run on startup.

My previous solution was:
Lua Code:
  1. local frame = CreateFrame("FRAME", "SprialofhopeZoomFrame")
  2. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. local function eventHandler(self, event, ...)
  4.   -- do stuff
  5. end
  6. frame:SetScript("OnEvent", eventHandler)

My current work in progress is:
Lua Code:
  1. -- Create an anonymous blank frame
  2. local frame = CreateFrame('Frame')
  3. frame.RegisterEvents = RegisterEvents
  4. --  PLAYER_ENTERING_WORLD is fired when the player enters the world,  enters/leaves an instance, or respawns at a graveyard. Also fires any  other time the player sees a loading screen.
  5. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  6. frame:SetScript("OnEvent", function(self, event, ...)
  7.        -- do stuff
  8. end)

At this point I'm stealing code which is reported to work, but just doesn't work for me.

The code I'm running is interacting with the frames being created by another addon. It should still work, because the addon will have already loaded before PLAYER_ENTERING_WORLD is triggered. I can run it manually without any of the above autorun code, and it works. However, I cannot make it work on /console reloadui.

Is this an interaction with _DevPad?

If this is a misunderstanding with how to use event registration, I can check with the developer forums and have my hand held.

I did end up solving my problem by hacking the addon directly, but I'm still curious about solving this in a better way.
Last edited by spiralofhope : 12-11-14 at 11:52 AM.
Report comment to moderator  
Reply With Quote
Unread 07-24-16, 01:14 PM  
A Deviate Faerie Dragon
spiralofhope's Avatar

Forum posts: 11
File comments: 214
Uploads: 0
Report comment to moderator  
Reply With Quote
Unread Yesterday, 09:01 AM  
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Originally Posted by spiralofhope
Thank you. At this point I have so much invested in this addon.
Report comment to moderator  
Reply With Quote
Post A Reply

Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.