Download
(239 Kb)
Download
Updated: 08-28-12 09:45 AM
Pictures
File Info
Compatibility:
Mists of Pandaria (5.0.4)
Updated:08-28-12 09:45 AM
Created:02-07-11 06:32 PM
Downloads:2,317
Favorites:52
MD5:
DevPad
Version: 5.0.0.1
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.

Details

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.


Usage

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!


Notes
  • 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.
  • 5.0.0.1 / GUI: Moved editor line numbering into an optional module.
  • 4.3.0.1 / 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.
  • 4.2.0.3 / 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.
  • 4.2.0.2 / 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.
  • 4.2.0.1 / 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.
  • 4.1.0.1 / GUI: Fixed buggy scrollbar behavior in 4.1.
  • 4.0.6.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.
  • 4.0.3.1 / GUI: Initial release.
Optional Files (0)


Archived Files (7)
File Name
Version
Size
Author
Date
4.3.0.1
238kB
Saiket
11-29-11 06:01 PM
4.2.0.3
232kB
Saiket
08-07-11 05:53 PM
4.2.0.2
229kB
Saiket
07-21-11 11:00 PM
4.2.0.1
228kB
Saiket
06-28-11 02:27 PM
4.1.0.1
228kB
Saiket
04-26-11 10:47 AM
4.0.6.1
227kB
Saiket
02-12-11 04:50 PM
4.0.3.1
227kB
Saiket
02-07-11 06:32 PM


Post A Reply Comment Options
Unread 07-26-11, 03:58 PM  
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view AddOns

Forum posts: 152
File comments: 329
Uploads: 21
Re: Pack not working as expected

Originally posted by spiralofhope
I'm expecting the following script to print out useful information, but it doesn't!

Code:
for _,o in ipairs( _DevPad:GetAbsObject( 'test' ) ) do
  class,name,text,autorun,lua = o:Pack()
  print( class,name,text,autorun,lua )
end
I get things like:

Code:
table: 1A94DE98 nil nil nil nil
I'm expecting something perhaps like

Code:
table: 1A94DE98 ScriptName print( 'hello world' ) true true
Pack returns all of the script's fields in a table, so you could print them like this:
Code:
local t = o:Pack()
print( t.Class,t.Name,t.Text,t.AutoRun,t.Lua )
I don't suggest getting info about scripts through Pack though, since it creates a new table every time you call it which generates garbage. Pack and Unpack are meant for generating saved variables, but if you just need to look at a few fields in a script, you can read them like this instead:
Code:
print( o._Class,o._Name,o._Text,o._AutoRun,o._Lua )
Saiket is offline Report comment to moderator  
Reply With Quote
Unread 07-25-11, 11:52 PM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 11
File comments: 207
Uploads: 0
Pack not working as expected

In _DevPad.lua, I see:

Code:
    --- @return Table containing unique settings for this script.
    function ScriptMeta.__index:Pack ()
        return {
            Class = self._Class;
            Name = self._Name;
            Text = self._Text;
            AutoRun = self._AutoRun or nil;
            Lua = self._Lua or nil;
        };
    end
  1. Make a folder called 'test' .
  2. Within that folder, make a script. Give it any name and any content.
I'm expecting the following script to print out useful information, but it doesn't!

Code:
for _,o in ipairs( _DevPad:GetAbsObject( 'test' ) ) do
  class,name,text,autorun,lua = o:Pack()
  print( class,name,text,autorun,lua )
end
I get things like:

Code:
table: 1A94DE98 nil nil nil nil
I'm expecting something perhaps like

Code:
table: 1A94DE98 ScriptName print( 'hello world' ) true true
My basic code structure seems to be ok. I know this works:

Code:
local function test()
  return 1, 2, 3
end
a, b, c = test()
print( a, b, c )
I assume I'm using Pack() incorrectly, but I'm not sure what's wrong. Could I please get a pointer?
__________________
spiralofhope.com
spiralofhope is offline Report comment to moderator  
Reply With Quote
Unread 05-22-11, 08:45 AM  
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view AddOns

Forum posts: 152
File comments: 329
Uploads: 21
Originally posted by Ahm
Freakin love this addon. I've never been good at finishing addons, but I've got like 20 little scripts and counting written in this that run on startup to customize my UI.

There's a bit of a bug with the vertical scrollbar on the folder/script list window. When the addon first loads with it, it overlaps the auto start arrows. If you make the window big enough to fit them all so that the scrollbar hides, then shrink the window back down, then the window adjusts things properly so they show side-by-side.
I'm glad you like it!
About the scrollbars, are you using version 4.1.0.1? It was supposed to fix that very glitch, but maybe it isn't working.
Saiket is offline Report comment to moderator  
Reply With Quote
Unread 05-22-11, 03:04 AM  
Ahm
A Fallenroot Satyr
AddOn Author - Click to view AddOns

Forum posts: 20
File comments: 83
Uploads: 7
Freakin love this addon. I've never been good at finishing addons, but I've got like 20 little scripts and counting written in this that run on startup to customize my UI.

There's a bit of a bug with the vertical scrollbar on the folder/script list window. When the addon first loads with it, it overlaps the auto start arrows. If you make the window big enough to fit them all so that the scrollbar hides, then shrink the window back down, then the window adjusts things properly so they show side-by-side.
Ahm is offline Report comment to moderator  
Reply With Quote
Unread 04-16-11, 01:08 PM  
rakkarage
A Murloc Raider

Forum posts: 6
File comments: 100
Uploads: 1
maybe a '/reload' button? or maybe i should just create a reload script... thanks
rakkarage is offline Report comment to moderator  
Reply With Quote
Unread 03-31-11, 01:48 PM  
Fodaro
A Cyclonian
 
Fodaro's Avatar
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 28
Uploads: 3
At last, someone's adopted Hack! I was starting to think I'd have to do it myself...
__________________
Fodaro
(Main: Fodaro-Bronzebeard (EU))
Author of CharNote and Consolid8
Fodaro is offline Report comment to moderator  
Reply With Quote
Unread 02-18-11, 01:50 PM  
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view AddOns

Forum posts: 200
File comments: 87
Uploads: 21
Originally posted by rakkarage
this looks kinda similar?
http://wow.curseforge.com/addons/hack/
First line of the description of this AddOn:

"_DevPad is an in-game text editor and addon authoring tool, inspired by Mud'sHack."
Waky is offline Report comment to moderator  
Reply With Quote
Unread 02-17-11, 08:40 AM  
rakkarage
A Murloc Raider

Forum posts: 6
File comments: 100
Uploads: 1
this looks kinda similar?
http://wow.curseforge.com/addons/hack/
rakkarage is offline Report comment to moderator  
Reply With Quote
Unread 02-15-11, 06:13 PM  
willgk
An Aku'mai Servant
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 153
Uploads: 3
I would love to see a wiki page with some examples of usage for _DevPad scripts that people have written, come on i know there's people out there :P
willgk is offline Report comment to moderator  
Reply With Quote
Unread 02-14-11, 01:09 PM  
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view AddOns

Forum posts: 200
File comments: 87
Uploads: 21
Originally posted by Seerah
One feature of WoWLua that I absolutely love is the command line. Being able to run single lines quickly (when testing syntax, getting return values for functions, etc) and then use the up/down arrow to change between them is a boon when I'm coding in-game.

If you find time to add something like that to DevPad, you may just have me sold!
I concur with Seerah, this is one thing I loved about WoWLua, but after looking at functionality I found _DevPad better!

Edit: I love the run on StartUp ability of this addon. I was able to recreate a KGPanels with just normal frames, but using 50kb compared to 500kb to show 7 frames. Thanks!
Last edited by Waky : 02-15-11 at 09:00 AM.
Waky is offline Report comment to moderator  
Reply With Quote
Unread 02-13-11, 08:40 PM  
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 9589
File comments: 586
Uploads: 25
One feature of WoWLua that I absolutely love is the command line. Being able to run single lines quickly (when testing syntax, getting return values for functions, etc) and then use the up/down arrow to change between them is a boon when I'm coding in-game.

If you find time to add something like that to DevPad, you may just have me sold!
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

[SIGPIC][/SIGPIC]
Seerah is offline Report comment to moderator  
Reply With Quote
Unread 02-13-11, 05:24 AM  
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1191
File comments: 783
Uploads: 82
Thanks, it's on favorites so updated the moment it was posted
Dridzt is offline Report comment to moderator  
Reply With Quote
Unread 02-12-11, 05:54 PM  
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view AddOns

Forum posts: 152
File comments: 329
Uploads: 21
Re: Very nice

Originally posted by Dridzt
Any chance link handling could be added?
Version 4.0.6.1 now shows links when in plain text mode, and shows their raw escape sequences when in Lua syntax highlighting/raw text mode. Links in plain text are now clickable, too.
Saiket is offline Report comment to moderator  
Reply With Quote
Unread 02-08-11, 07:09 PM  
EVmaker
A Deviate Faerie Dragon
 
EVmaker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 14
File comments: 123
Uploads: 8
Thank you

I just wanted to say thank you, thank you very much for releasing this addon. I have used Hack for quite awhile for coding and testing and the author has not been around for awhile since it broke pretty good in the last patches.

It's nice to be able to have a good replacement which also has 'books/folders' without needing to 'hack' hack (har har).

But thanks again.
EVmaker is offline Report comment to moderator  
Reply With Quote
Unread 02-08-11, 06:05 PM  
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view AddOns

Forum posts: 152
File comments: 329
Uploads: 21
Re: Very nice

Originally posted by Dridzt
As a long time user of TinyPad I'm especially appreciative of the fact DevPad can import pages.

There's a ton of useful additions to this one (I'd switch just for the ability to organize pages in folders)
but there is also 1 feature that I'm missing a lot from TinyPad; the ability to save itemlinks.

One of the uses I had for TinyPad was to construct gear plans for my leveling alts (mostly).
It is not limited to itemlinks only as well.
An example entry in a gearplan page might look like this:
HeadSlot
[Helm of Uber Healing] (<- this would be an itemlink showing the tooltip when clicked) Source: [Escort Quest of Doom] (<- this would be a quest link).

Any chance link handling could be added?
I'll need to make non-syntax-highlighted pages allow color and link codes, but I think that's doable. That's a pretty neat feature of TinyPad though; I didn't think clickable links in editboxes were possible. Double clicking to select words is a really nice feature too.
Saiket is offline 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.