Help

Hack

Audio & Video Login to Add Favorites
  • 1 Like
  • World of Warcraft
  • 1,738 Downloads
  • Supports: 4.3
  • 1 Average Daily Downloads
  • Comments
  • Created 5/7/2009 3:03:05 PM
  • Updated 11/29/2011 8:59:01 AM
  • 22 Favorites
  • Project Site
  • License: Public Domain
  • Release Type: Mature
  • Newest File: release_v1.3.3
or

About Hack

Currently, until Mud decides otherwise, Vandesdelca32 is going to be maintaining this project.

Hack is a lightweight notebook and/or code development addon.

Hack makes it easy to manage a large collection of notes/scripts and share them with other Hack users. Pages containing Lua code can be run and/or flagged to auto-run on startup; they can call other pages, passing arguments and receiving return values. This lets Hack serve as an in-game file system for Lua scripts.

OPTIONAL:

Hack includes several example pages. They are easily deleted from within Hack, or you can prevent them from ever being loaded by deleting HackExamples.lua from the Hack folder.

Hack itself is lightweight (<60KB), but it includes a library for highlighting/indenting Lua code (FAIAP) which will add some additional memory usage and garbage generation. It's not a big deal, but if you just use Hack as a notebook and never edit Lua code, feel free to delete Indent.lua from the Hack directory.

IMPORT:

Hack's example pages include scripts to import pages from Tinypad, Nefpad, WowLua, and LuaSlinger. LuaSlinger supports triggering pages by events, and the importer shows how easily you can wire up the same functionality in Hack.

If you have another notepad addon you want to pull pages from, lemme know.

USAGE:

/hack toggle Hack UI
/hack <hack name> run a Hack page by name

The UI is mostly self-explanatory (mouse over buttons to see what they do), but a few things deserve special mention:

1. To run the current page as Lua code, click the 'play' button at the top of edit window (this one) or hit SHIFT+TAB from the editor.

2. To make a page run automatically when Hack loads, click the 'play' button next to it's name in the list window. This makes Hack useful for little tweaks that don't warrant a full-blown addon. For instance, I hate the mail font. It's easy to fix, but I don't want to write a whole addon for two lines of code, so I type the lines into a Hack page and flag it to execute. Done.

NOTES:

  • Pages are saved as you type and there is no undo, so be careful. If you really screw up a page, you can hit the Revert button, which will give you back the page as it was when you first opened it.
  • The list frame and edit frame are resizable. Just grab the little handle in the bottom right corner.
  • You can double-click a page name to rename it (in addition to using the rename button).
  • Page search is case insensitive. You use a subset of regex search patterns (^$.*-+?).
  • Autorun pages run in the order they appear, so you can control their execution order by moving them up and down the list.

EXAMPLES:

I included example pages to show how I use Hack. You can delete these quickly via the books tab. To speed Hack's loading, remove HackExamples.lua from the addon folder.

The "lib:" pages contain library code I find useful in many scripts. To facilitate the use of libraries, Hack contains one built-in function Hack.Require, which can be used to make sure a page you are dependent on is loaded, while preventing it from being loaded more than once.

The arg processing examples show how you can execute a page by name, optionally passing arguments and/or receiving return values.

The "timer lib" examples show how to use "lib: timer".

The "cmd:" examples add new slash commands to the game.

The "ui:" examples are various minor tweaks to the UI.

The "hack:" examples are bits of code I used to write Hack. Saves you a lot of reloading to develop with a tool like this.

FEEDBACK:

I'd love to get feedback about Hack. What you like, what you don't like, what you'd like to see in future versions (keeping in mind that my intention is to keep it as small as possible).

Cheers,
Eric Tetz
<erictetz@gmail.com>

------------------------------------------------------------------------
r9 | vandesdelca32 | 2011-11-29 14:58:58 +0000 (Tue, 29 Nov 2011) | 1 line
Changed paths:
   A /tags/release_v1.3.3 (from /trunk:8)

Tagging as release_v1.3.3
------------------------------------------------------------------------
r8 | vandesdelca32 | 2011-11-29 14:58:28 +0000 (Tue, 29 Nov 2011) | 2 lines
Changed paths:
   M /trunk/Hack.toc

Fix spelling error in ToC header...
Update ToC to 40300
------------------------------------------------------------------------

Comments

  • #12
    occasionally the last 6 or so characters i typed in Hack don't get saved. not sure how to reproduce the problem reliably
  • #11
    Thanks Vandesdelca32 for picking this up.
  • #10
    Please keep this up to date.
    It's working for me, but it's been a while since it was updated.
  • #9
    I use the books tab to organize notes. Example: Profession Leveling Guides, Talent Guides, Instance Guides, etc.

    Having clickable links in hack would be very, very nice. I like that part of TinyPad, but TinyPad doesn't let you name pages, have books (or categories).

    I hope you keep supporting this addon.
  • #8
    I've been looking for a replacement for NotesUneed.
    Hack is working well.
    I needed a way to store large amounts of info (like leveling guides for professions).

    I do plan to write some addons, but in the mean time, hack is a terrific text editor in-game.
  • #4
    any chance of adding line numbers to the display, just got a sytex error in line 12 in my code, no big deal on small things, but large files could be a pain without line numbers, not sure if it's possible
  • #5
    I've thought of doing that since version 1, but it turns out to be a PITA to account for wrapped lines properly. But I just came up with a technique that works. It'll be in the next version.

    Other changes I'm considering:

    * Adding link support. It's trivial to allow links to be inserted into the an editbox (I already have a Hack that lets me put links into macro). It's not much harder to allow links to be clicked within the edit window. I'm just very leery of adding code that few will use. I like to keep Hack very trim.

    * Getting rid of the "books" tab entirely, to simplify the code as I add new features. I've never had more than one book. Is there anyone that this would hurt?
  • #6
    as far as the line numbers, I would suggest looking at Prat, it has an option for 2 column chat for the timestamps in one column, chat text in the other, sort of mimics line numbers, might be an idea then you wouldn't have to worry about wordwrap, just have it enter a new number for each new line . . . at least in theory, but you know more about your addon than I . . .lol . . . just an idea tho
  • #7
    and oh yes forgot, the links would be cool, and I see no reason for a book tab, unless a person wants to orginize them by catagories, possibly an option there, an expandable catagories menu (ie.)

    UnitFrame Hacks
    Player
    Target
    Pet Hacks
    etc
    etc
  • #3
    I love how this works, I'm currently working on developing a decent size compilation UI, and rather than hack up my mods every time they are updated, this allows me to put lua in a sort of "OnLoad" toolbox.

    Love it, no more shutting down WoW just to see if two lines of code will do what I want, I pop it in hack, run and results . . .

    Thanks alot
  • #1
    I'd like to ask you to include importing from Endeavours_NotePad would be a big help

    BTW 1st
  • #2
    The following code will import from Endeavours_NotePad.

    local pages = HackDB.books[HackDB.book].data
    for i,text in ipairs(EndeNPad.db.global.pages) do
    pages[#pages+1] = { name='Endeavours Notepad page #'..i, data=text }
    end

    Just copy that code into a Hack page and run it. You only need to run it once (you'll see the imported pages appear at the bottom of the Hack list), then you can delete it.
  • To post a comment, please login or register a new account.
Learn how to disable ads
Learn how to disable ads
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster Addon Downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse.com Experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Minecraft 3D Print Giveaway

Enter Now!