Go to Page... |
Updated: | 05-02-09 04:29 AM |
Created: | unknown |
Downloads: | 15,322 |
Favorites: | 68 |
MD5: |
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]>
Comment Options |
thegabbert |
View Public Profile |
Send a private message to thegabbert |
Find More Posts by thegabbert |
Add thegabbert to Your Buddy List |
seebs |
View Public Profile |
Send a private message to seebs |
Find More Posts by seebs |
Add seebs to Your Buddy List |
Mud |
View Public Profile |
Send a private message to Mud |
Find More Posts by Mud |
Add Mud to Your Buddy List |
10-13-08, 11:43 AM | ||
A Kobold Labourer
Forum posts: 0
File comments: 2
Uploads: 0
|
Re: Re: thank you
|
|
|
ithilyn |
View Public Profile |
Send a private message to ithilyn |
Find More Posts by ithilyn |
Add ithilyn to Your Buddy List |
10-13-08, 07:40 AM | |
|
Real nice work. Been waiting for a notepad addon as good as this, and I never really wanted to bother to develop Nefpad further. Great job.
One little tick: The input page uses auto-focus, which is fine, but there's no simple way to clear the focus, since pressing escape just closes the page. It's a huge annoyance when I'm trying to multi-task between different things going on on my UI and the gameworld, and the page wants to steal all my keyboard input. Also, I find it a little annoying for For All Indents and Purposes to be applied to normal text pages. Any plans on adding a button to quickly disable it on individual pages?
Last edited by Nefarion : 10-13-08 at 08:06 AM.
|
|
Nefarion |
View Public Profile |
Send a private message to Nefarion |
Find More Posts by Nefarion |
Add Nefarion to Your Buddy List |
10-12-08, 09:38 PM | ||
|
Re: thank you
BTW: porting to 3.x appears to be pretty trivial, at least for our kinda app. I ported LuaSlinger for you (quick job, not thoroughly tested). Cheers! |
|
|
Mud |
View Public Profile |
Send a private message to Mud |
Find More Posts by Mud |
Add Mud to Your Buddy List |
10-12-08, 08:00 PM | |
A Kobold Labourer
Forum posts: 0
File comments: 2
Uploads: 0
|
thank you
This is the author of LuaSlinger. Hack looks awesome, and I look forward to switching to it. You just spared me the burden of nursing LuaSlinger through 3.x, many thanks!
~ Ithilyn |
|
ithilyn |
View Public Profile |
Send a private message to ithilyn |
Find More Posts by ithilyn |
Add ithilyn to Your Buddy List |
10-12-08, 02:23 PM | ||
|
|
|
|
Mud |
View Public Profile |
Send a private message to Mud |
Find More Posts by Mud |
Add Mud to Your Buddy List |
10-12-08, 08:47 AM | |
A Fallenroot Satyr
Forum posts: 24
File comments: 12
Uploads: 0
|
Display Lua Errors was already checked
i deleted the wtf folder (as hard as it was. It was full of info already. I just closed my eyes and deleted it. lol) I got the latest ver of hack on the last try. I dont know if this was the isue but last time I deleted the books before i made a new one. This time it told me I cant delete the last book. So i created a few books and then deleted the default ones. seems to be working like a charm now. I also added this to my favorites here so I can keep with any updates. THANKS for the great mod and quick support. Doc |
|
DrChaos |
View Public Profile |
Send a private message to DrChaos |
Find More Posts by DrChaos |
Add DrChaos to Your Buddy List |
10-12-08, 05:03 AM | ||
|
1) In WoW, make sure Interface -> Options -> Display Lua Errors is checked. 2) Shut down WOW or log out, then delete your wtf\account\*\SavedVariables\Hack.lua. 3) Make sure you have the latest version of Hack 4) Run WoW and try your experiment. Let me know if you get any error messages. |
|
|
Mud |
View Public Profile |
Send a private message to Mud |
Find More Posts by Mud |
Add Mud to Your Buddy List |
10-12-08, 04:29 AM | |
A Fallenroot Satyr
Forum posts: 24
File comments: 12
Uploads: 0
|
ok. ive done some testing. ill try to explain it.
char A can create a book and create a page and then can add text to the box that opens to the right for that page. no other char on my account can see the text that was added to the page (the page window wont even open). all chars can see the book and see the created page name, but no text in the page. If I create a new book on any other char, they are able to create a page name but the actual page that you put text in does not show. its like once you use the first char to make a book, it becomes their mod totally. The only thing ive done was to remove the test books that you noted and said to remove if I wanted to. I also stopped running all mods but this one for testing and still got the same results. |
|
DrChaos |
View Public Profile |
Send a private message to DrChaos |
Find More Posts by DrChaos |
Add DrChaos to Your Buddy List |
10-12-08, 12:18 AM | ||
|
The first version I uploaded had a goofed up TOC, which I fixed within a few hours. Can you pull the latest version and see if your symptoms still occur? It's important to me that Hack have absolutely no bugs, so please lemme know if you find anything.
Last edited by Mud : 10-12-08 at 03:38 AM.
|
|
|
Mud |
View Public Profile |
Send a private message to Mud |
Find More Posts by Mud |
Add Mud to Your Buddy List |
10-11-08, 06:25 PM | |
A Fallenroot Satyr
Forum posts: 24
File comments: 12
Uploads: 0
|
One question. I have several chars on the same account but only the account that im typing the info in can see it.
i create a book with char a and give it several pages. i log onto char b and can see the pages names but not the text that fills the pages made by char a. ive located the lua file in the wtf/account/myaccountname/savedvariables/hack is there a way so all my chars can access the data? |
|
DrChaos |
View Public Profile |
Send a private message to DrChaos |
Find More Posts by DrChaos |
Add DrChaos to Your Buddy List |
10-08-08, 04:35 PM | ||
|
|
|
|
Mud |
View Public Profile |
Send a private message to Mud |
Find More Posts by Mud |
Add Mud to Your Buddy List |
10-08-08, 12:16 PM | |
|
Would you be offended if I used this as just a normal notepad, rather then a tool to run scripts n' such?
Actually I'll probably end up running some scripts in it eventually but I like the way you set this up so I'll probably do both. Nice work! |
|
IceShadow |
View Public Profile |
Send a private message to IceShadow |
Find More Posts by IceShadow |
Add IceShadow to Your Buddy List |