Download
(62Kb)
Download
Updated: 05-02-09 04:29 AM
Pictures
File Info
Updated:05-02-09 04:29 AM
Created:unknown
Downloads:15,237
Favorites:68
MD5:

Hack  Popular! (More than 5000 hits)

Version: 1.2.2
by: Mud [More]

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
<[email protected]>

1.2.2 Cosmetic changes (removed background texture, added grips to window corners, etc.)
1.2.1 Fixed bug in indent library.
1.2 Syntax highlighting can now be toggled on/off on a per page basis, or can be permanently disabled by deleting Indent.lua from the Hack folder. This required some fixes to the library, so Hack is no longer compatible with vanilla FAIAP.
1.1.2 Syntax highlighting no longer optional (until I can work out some bugs in the library which prevent it from being enabled/disabled on the fly).
1.1 Added "Send" button, fixed bug in Quest Query example, add/removed/improved a few examples.
1.0.6 Fixed error in Snap which caused edit window to disappear; changed ESC behavior (now clears focus from edit box). Bigger changes coming... *dun dun dun*
1.0.5 Updated to WotLK compatible, including a few necessary changes to the example pages (Quest Query and 'lib: event' in particular)
1.0.4 Update event lib and LuaSlinger importer
1.0.3 Added importers for other notebook addons, made Hack.lua WotLK compatible (Hack.xml will have to wait for release), various minor polish tweaks.
1.0.2 Added support for All Indents and Purposes
1.0.1 Update SavedVariables in TOC
Optional Files (0)


Post A Reply Comment Options
Unread 04-14-10, 09:33 AM  
Fodaro
A Cyclonian
 
Fodaro's Avatar
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 28
Uploads: 2
Re: Patch 3.3.3

Originally posted by Fodaro
Anyone having problems with this addOn since last patch?
Having looked at the problem myself, I think I may have solved it. A quick use of find and replace in hack.lua was all it took: replace VARIABLES_LOADED with PLAYER_LOGIN. Specifically, the following lines need changing:

Code:
-- Line 108 becomes:
self:RegisterEvent('PLAYER_LOGIN')

-- Line 126 becomes:
function Hack.PLAYER_LOGIN(self)

-- Line 127 becomes:
Hack.PLAYER_LOGIN = nil

-- Line 150 becomes:
Hack.PLAYER_LOGIN = nil
Hope this helps people. I've been using this for at least a week now, to check it works, and it seems to stop the problem altogether.
__________________
Fodaro
(Main: Fodaro-Bronzebeard (EU))
Author of CharNote and Consolid8
Last edited by Fodaro : 04-14-10 at 09:34 AM.
Report comment to moderator  
Reply With Quote
Unread 03-31-10, 09:29 AM  
Fodaro
A Cyclonian
 
Fodaro's Avatar
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 28
Uploads: 2
Patch 3.3.3

Anyone having problems with this addOn since last patch? When I log in with Hack enabled, sometimes WoW just freezes when the loading bar is full. Might be something else, but it hasn't happened since I disabled it.

Please upload an update

Thanks,
__________________
Fodaro
(Main: Fodaro-Bronzebeard (EU))
Author of CharNote and Consolid8
Report comment to moderator  
Reply With Quote
Unread 01-10-10, 03:26 AM  
tattooedpierre
An Aku'mai Servant
 
tattooedpierre's Avatar
AddOn Author - Click to view AddOns

Forum posts: 38
File comments: 95
Uploads: 4
Originally posted by sconley
Please post an update.
I like this addon and want to see the new additions.
I'll miss books but I'll get over it
I 2nd this, awesome addon, the removal of book organisation will be no terrible loss to me since - as stated - I like my pages to be there for every toon anyways.

Though perhaps flagging a page as archived or inactive to move it out to a 'storage' tab? This way the many (excellent) example pages wouldn't clutter up the main page? Just a thought.
Report comment to moderator  
Reply With Quote
Unread 12-29-09, 09:34 PM  
sconley
An Aku'mai Servant

Forum posts: 31
File comments: 98
Uploads: 0
Please post an update.
I like this addon and want to see the new additions.
I'll miss books but I'll get over it
Report comment to moderator  
Reply With Quote
Unread 10-11-09, 11:03 AM  
drosenhe
A Kobold Labourer
 
drosenhe's Avatar

Forum posts: 0
File comments: 2
Uploads: 0
Originally posted by Mud
My private copy of Hack has evolved a bit -- more efficient highlighting code, line numbers, per-page keybinds -- but I'm reluctant to release it because I removed books and I know that's going to piss people off.
Mud, I would recommend that you go ahead and release your current copy, with the stipulation that it doesn't support books anymore, and let folks give it a try. Me personally, I don't use books and there are probably a lot of other players who don't either and would very much like to give your latest changes a try.

If you do decide to go this route (and I really hope you do), you might want to post how players who do use books can migrate to the latest version without losing their code.

Thanks for creating such a great little mod!
Last edited by drosenhe : 10-11-09 at 11:04 AM.
Report comment to moderator  
Reply With Quote
Unread 10-02-09, 07:12 PM  
Mud
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 23
Uploads: 4
Originally posted by Dulark
I love Hack! I can't wait for the next update.
My private copy of Hack has evolved a bit -- more efficient highlighting code, line numbers, per-page keybinds -- but I'm reluctant to release it because I removed books and I know that's going to piss people off. The implementation was just so anemic (e.g. no way to transfer between books), I kept vacillating between (1) leaving it half-assed, (2) fleshing out the implementation, (3) or removing it to simplify the code. I never used books, so I chose #3. I want Hack to be minimal, so everything included should be virtually necessary, and pages just weren't; you can organize pages other ways.

I've been thinking about restoring those tabs for global and character specific pages, but I'm not sure that's ideal either. I mean, what if you want a page for toons A, B, and C, but not X, Y and Z? I was thinking of having all pages visible to all users, but the autorun enable/disable be character-specific.

As for a forum, I really want that. I'd like something like this site, where you could rank and search Hacks, but I guess just throwing up some open source forum software would be better than nothing...

Last edited by Mud : 10-02-09 at 08:15 PM.
Report comment to moderator  
Reply With Quote
Unread 08-25-09, 07:29 PM  
Dulark
A Defias Bandit

Forum posts: 2
File comments: 3
Uploads: 0
I love Hack! I can't wait for the next update. I have some ideas that you might think about for your next release:
  1. wiki like links: Create a link to another page
  2. Profiles! I have druid code auto run on startup, and I can't tell you how many times I've forgotten to turn it off when I'm on my other toons. I think something like the macros screen, were there are global pages, and the current profile pages would be nice.
  3. A hack forum! A forum or something else where we can go and get more hacks to put in our books. I love the idea of the scaling, and never thought of how to do that.

Thanks again for this great addon! If you need help, let me know and I can do what I can.
Report comment to moderator  
Reply With Quote
Unread 06-26-09, 12:49 PM  
EVmaker
A Deviate Faerie Dragon
 
EVmaker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 14
File comments: 126
Uploads: 9
Originally posted by Mud
[b]Well, first let me say that -- at the moment, anyway -- books are removed. Of course I did that before reading your post -- you're the first person I've heard say they use them.
Well just to add another voice, I've posted down below as well that I find them quite useful.

And another question comes to mind, if you do decide to drop books for good, what is your policy on 'addons' to the mod? For example, would it be alright with you if I released a books addon to Hack to add them back or would that just not be alright?
Last edited by EVmaker : 06-27-09 at 01:43 PM.
Report comment to moderator  
Reply With Quote
Unread 06-16-09, 07:09 PM  
Mud
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 23
Uploads: 4
Well, first let me say that -- at the moment, anyway -- books are removed. Of course I did that before reading your post -- you're the first person I've heard say they use them.

My reasoning:
  1. Nobody I've asked says they use them (you're the first), I never use them, so I figured it was a superfluous feature. I want to keep Hack as simple and lightweight as possible, so as I added new stuff I wanted to prune anything which has proven unnecessary.

  2. It complicates adding new features. For instance, I added line numbers, and I want to make it so that errors would popup the appropriate Hack page, but that requires more code to deal with the possibility that the page is not in the current book. It's not a lot of code, but adds up when multiple parts of the code must deal with book handling.

  3. I originally added books because I was able to do it with very little code, in part because the implementation is half-assed. You should be able to turn autorun on/off for entire books, you should be able to easily move pages in between books, etc. In other words, if I'm going to do the feature right, I would need to add more code, and if few people use the feature, that's even more wasted space. I'd rather just not have the feature than have a half-assed implementation which complicates the rest of what I want to do.

  4. I never used books, and as it seems that Hack's audience is very small, I figured I might as well please myself. ^_^
But reading your post makes me feel guilty.

Different Characters, different hack book.
Does that even work? I mean, Hack autoruns all autoexec pages in all books when it starts up, so they may as well all be in the same book. The way I currently do character specific stuff is to have a page called 'character setup' where I have logic like:

Code:
local name = UnitName('player')
if name == 'Roguetacular' then
   HackRun 'custom combo points'
elseif name == 'Hunterorific' then
   HackRun 'auto tracking'
end
Not very sexy, I guess.

This is a great way to put in the variables for my addon that I would like to allow others to be able to modify, so I have a UI Settings Book, a Class Specific set of books, Pally Book, Hunter Book, I don't wanna see all the Hunter codes I use on hack while I'm logged in as my priest.
Hmmm.. I'm not sure what you mean here, are you using Hack as the configuration panel for your addon? In that case, I guess books would be nice.

Now I'm conflicted again. *sigh*

Just gotta remind myself that simpler = better, and despite your heroic example, very few people actually use the books.
Last edited by Mud : 06-16-09 at 10:23 PM.
Report comment to moderator  
Reply With Quote
Unread 06-12-09, 08:25 PM  
Tearstar
A Cyclonian
 
Tearstar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 29
Uploads: 2
requested feature

Could you add a "run page" button on the main list. I keep one bit of code ready and need to run it often, yet opening the page everytime just to run the code is getting tiring. If I have it highlighted on the list, I'd like to just click a button on that page and have it run without needing to open the other window

Love this addon, I've added just about everything I can find in the loot filter and I never have to open my bags to trash or open anything . . . thanks
__________________
Author of Mini-Targ

Magelo Profile
My Myspace
My Youtube Channel

My First Video I made for my kids - please comment and/or rate

Last edited by Tearstar : 06-12-09 at 08:27 PM.
Report comment to moderator  
Reply With Quote
Unread 06-07-09, 01:13 AM  
Tearstar
A Cyclonian
 
Tearstar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 29
Uploads: 2
I actually have discovered a couple reasons to leave books in . . .

1.) My entire interface is scaled at .65 exept every addon that doesn't have scalability in the code and also Blizz's default frames (bank, Guildbank, character, etc) So I took a list of viewable frames I had that were too big and in hack put:

FrameName:SetScale(.65);

for each frame, set it to run on load and now my interface is 100% scaled . . . now the need for books in this situation . . . Different Characters, different hack book. My other character I may have other addons and can put there frames in to do the same thing, Cause if I do it on one character and the frame hasn't been shown or the addon isn't loaded, it breaks the whole page after the error.

2.) I'm developing an addon and it is my first, I don't know lua or xml . . . just basics. Using Hack I have been able to do so much that my lists on the left are getting long for each character. This is a great way to put in the variables for my addon that I would like to allow others to be able to modify, so I have a UI Settings Book, a Class Specific set of books, Pally Book, Hunter Book, I don't wanna see all the Hunter codes I use on hack while I'm logged in as my priest.

3.) I can make books like, "UI Tips & Tricks", "FAQs", "Settings" some text, some code, would be cool if you could set a book to run when you open the tab.

4.) I have managed to find alot of uses for books, although pages have the same effect, I simply like having the tabs down there for easy orginization . . . and I was one person who at first said we didn't need books.

hope you keep em, if you don't need em, don't use em, but would be nice if they stayed for those of use who do use em.
__________________
Author of Mini-Targ

Magelo Profile
My Myspace
My Youtube Channel

My First Video I made for my kids - please comment and/or rate

Report comment to moderator  
Reply With Quote
Unread 04-24-09, 01:36 PM  
Zanyth0x42
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Originally posted by Mud
I have some higher priority stuff at the moment, but I'll consider that for future revs.

In the meantime, if you accidentally screw up a page, you can hit the Revert button to get the page's original text back.
Oh wow! I must have missed that one when I was looking for a lock button, thanks, that will definitely do the job for now
Report comment to moderator  
Reply With Quote
Unread 04-24-09, 10:35 AM  
Mud
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 23
Uploads: 4
Originally posted by Zanyth0x42
Any chance we could get a 'lock' button for the pages? There are many times when highlighting text to copy and paste, I accidentally hit a key and then lose it all with the overwritten one >.>
I have some higher priority stuff at the moment, but I'll consider that for future revs.

In the meantime, if you accidentally screw up a page, you can hit the Revert button to get the page's original text back.
Report comment to moderator  
Reply With Quote
Unread 04-24-09, 08:10 AM  
Zanyth0x42
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Any chance we could get a 'lock' button for the pages? There are many times when highlighting text to copy and paste, I accidentally hit a key and then lose it all with the overwritten one >.>
Report comment to moderator  
Reply With Quote
Unread 04-12-09, 02:26 AM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
Re: Re: Great addon

Originally posted by Mud
Glad you like it, man. You're using it exactly the way I am. I keep meaning to update it (line numbers would be nice), but it does what I need as-is so I've been lazy.

If I got rid of the Books tab (which I never use), would that affect you? Just curious.
No, I only have a single book.

I kind of section it off like:

lib: aaaa
lib: bbbbb
-------------------------------
ui: whatever
ui: something else
--------------------------------


with the '-----------------' as non-exec pieces... just makes it easier to read.

I don't use it for notes or anything... just code.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: