Download
(62 Kb)
Download
Updated: 05-02-09 04:29 AM
Pictures
File Info
Updated:05-02-09 04:29 AM
Created:unknown
Downloads:5,669
Favorites:70
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
<erictetz@gmail.com>
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)


Archived Files (2)
File Name
Version
Size
Author
Date
1.2.1
67kB
Mud
04-29-09 01:47 AM
1.0.6
57kB
Mud
10-17-08 03:57 PM


Post A Reply Comment Options
Unread 07-25-11, 12:32 PM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 11
File comments: 207
Uploads: 0
http://wow.curseforge.com/addons/devpad

This addon is working perfectly for me. It even imported all of my Hack scripts without a problem!
__________________
spiralofhope.com
spiralofhope is offline Report comment to moderator  
Reply With Quote
Unread 07-21-11, 04:03 AM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 11
File comments: 207
Uploads: 0
Originally posted by bluechipps
huge huge fan of this addon, glad the xml file has worked for everyone!

since the author though has not returned, take a look at _DevPad which is pretty much a clone of this but is being updated and has a few different features
Thanks for the link, I'll check it out for sure.
__________________
spiralofhope.com
spiralofhope is offline Report comment to moderator  
Reply With Quote
Unread 02-25-11, 08:23 PM  
bluechipps
A Kobold Labourer

Forum posts: 0
File comments: 14
Uploads: 0
huge huge fan of this addon, glad the xml file has worked for everyone!

since the author though has not returned, take a look at _DevPad which is pretty much a clone of this but is being updated and has a few different features
bluechipps is offline Report comment to moderator  
Reply With Quote
Unread 12-18-10, 08:39 PM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 11
File comments: 207
Uploads: 0
Tired of the minimap mysteriously being zoomed-in every time you log in?

Code:
Minimap:SetZoom(0)
Hide the minimap clock:

Code:
LoadAddOn("Blizzard_TimeManager")
TimeManagerClockButton:SetScript("OnUpdate", nil)
TimeManagerClockButton:SetScript("OnEvent", nil)
TimeManagerClockButton:SetScript("OnShow", script)
TimeManagerClockButton:Hide()
At the commandline, this will show the minimap clock again:
Code:
/run TimeManagerClockButton:Show()
__________________
spiralofhope.com
spiralofhope is offline Report comment to moderator  
Reply With Quote
Unread 12-17-10, 12:31 PM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 11
File comments: 207
Uploads: 0
This is working fine with the updated xml file.

I hope the author returns to update this addon.

I think that I would use book support, but if it was removed I wouldn't mind.

If it is a concern to release the internal beta, then create a "Hack 2" with the new changes, and drop support for the old Hack.
__________________
spiralofhope.com
spiralofhope is offline Report comment to moderator  
Reply With Quote
Unread 10-27-10, 04:49 PM  
bluechipps
A Kobold Labourer

Forum posts: 0
File comments: 14
Uploads: 0
Thanks guys for the fix!!! Love this addon.

Here is an updated Hack.xml for any that want it
http://bluechipps.com/wow/Hack.xml
bluechipps is offline Report comment to moderator  
Reply With Quote
Unread 10-27-10, 08:46 AM  
kaimox
A Murloc Raider

Forum posts: 7
File comments: 90
Uploads: 0
I did as you suggested but only this change:

Open hack.xml
look for:
<OnEvent> Hack[event](self,arg1,arg2,arg3,arg4,arg5,ar6,arg7,arg9) </OnEvent>

Change the line to:
<OnEvent> Hack[event](self, ...) </OnEvent>

and it's errorfree. Thanks!
kaimox is offline Report comment to moderator  
Reply With Quote
Unread 10-23-10, 09:40 AM  
Odlaw
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 67
Uploads: 7
Originally posted by kaimox
The addon seems to work but I get the following error:

x Hack-1.2\Hack.lua:550: attempt to index local 'prefix' (a nil value)
<string>:"*:OnEvent":1: in function <[string "*:OnEvent"]:1>

Locals:
self = HackListFrame {
0 = <userdata>
numTabs = 2
selectedTab = 1
}
event = "CHAT_MSG_ADDON"

---
Open hack.xml
look for:
<OnEvent> Hack[event](self,arg1,arg2,arg3,arg4,arg5,ar6,arg7,arg9) </OnEvent>

Change the line to:
<OnEvent> Hack[event](self, ...) </OnEvent>


I also removed part of the xml at one point: (was a stupid button frame interfering with where I was clicking on the text to let me edit the text where I clicked)
Line 251-255 (Unless I edited something else):

<Frames>
<Button setAllPoints='true'>
<Scripts> <OnClick> HackEditBox:SetFocus() </OnClick> </Scripts>
</Button>
</Frames>

You can remove them, or comment them out such as:
<!--<Frames>
<Button setAllPoints='true'>
<Scripts> <OnClick> HackEditBox:SetFocus() </OnClick> </Scripts>
</Button>
</Frames>-->
Last edited by Odlaw : 10-23-10 at 09:55 AM.
Odlaw is offline Report comment to moderator  
Reply With Quote
Unread 10-21-10, 01:35 PM  
Contiki
A Kobold Labourer
 
Contiki's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 74
Uploads: 2
Nevermind, with some quick testing I thought I had a working version of Hack although the changes didn't make much sense. Hack error'd out shortly after posting. Sorry for any confusion the post might have caused. I've removed it.
Contiki is offline Report comment to moderator  
Reply With Quote
Unread 10-20-10, 07:38 AM  
kaimox
A Murloc Raider

Forum posts: 7
File comments: 90
Uploads: 0
I got my version from another site I think, it's 3 days older. I got the error on login withour opening the addon. I will check out this version as soon as I'm able to login again after todays server maintanance - which could take awhile :-(
kaimox is offline Report comment to moderator  
Reply With Quote
Unread 10-16-10, 10:11 AM  
Fodaro
A Cyclonian
 
Fodaro's Avatar
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 28
Uploads: 3
Originally posted by kaimox
The addon seems to work but I get the following error:
I find myself working on a fan update . It's probably a pretty easy error to solve. When is it happening? Is that all of the error report? And are you using the the latest version downloaded from this page?

Thanks,
__________________
Fodaro
(Main: Fodaro-Bronzebeard (EU))
Author of CharNote and Consolid8
Fodaro is offline Report comment to moderator  
Reply With Quote
Unread 10-14-10, 10:19 AM  
kaimox
A Murloc Raider

Forum posts: 7
File comments: 90
Uploads: 0
The addon seems to work but I get the following error:

x Hack-1.2\Hack.lua:550: attempt to index local 'prefix' (a nil value)
<string>:"*:OnEvent":1: in function <[string "*:OnEvent"]:1>

Locals:
self = HackListFrame {
0 = <userdata>
numTabs = 2
selectedTab = 1
}
event = "CHAT_MSG_ADDON"

---
kaimox is offline Report comment to moderator  
Reply With Quote
Unread 07-08-10, 08:22 AM  
sconley
A Fallenroot Satyr

Forum posts: 27
File comments: 67
Uploads: 0
Please post an update.
I love this addon.
sconley is offline Report comment to moderator  
Reply With Quote
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: 3
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.
Fodaro is offline 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: 3
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
Fodaro is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: