AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NoteTab as AHK Dashboard -- sample AHK.clb library

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
Wolfer



Joined: 08 Nov 2005
Posts: 14
Location: Chicago, IL

PostPosted: Sun May 04, 2008 9:06 am    Post subject: NoteTab as AHK Dashboard -- sample AHK.clb library Reply with quote

One app for editing AHK files I find very useful is NoteTab. I'm attaching a NoteTab clip library for other AHK users to try out, because I think the application has been overlooked.

Right up front I'll point out that NoteTab does not have context formatting, like Notepad++ and others, which is a drawback.

On the plus side, NoteTab can act like a "dashboard" for AHK.

To try out the possibilities, download the clip library I created (AHK.clb) from: http://www.autohotkey.net/~Wolfer/AHK.clb
(right click to "Save link as..." or copy and paste into Notepad, and save as 'ahk.clb').

NoteTab Light can be downloaded from: http://www.fookes.com/ftp/free/NoteTab_Setup.exe

After setting up NoteTab, add the AHK.clb file to your C:\Program Files\NoteTab Light\Libraries folder. (VISTA users may need to add it to the Virtual Appdata/Roaming directory)

Open NoteTab Light, then press F4 to open the Clip library. Choose AHK as shown here:


Right click over the clip list, and choose Auto-Replace.

Now try typing in a blank document: tab tab ctrl c

Instantly, NoteTab formats the code: {Tab}{Tab}{Ctrl}c

Go to a new line and hit the Esc key. A search box opens for the clip list. Type 'ct' and Ctrl will appear in the box.


Press the Down arrow on your keyboard, and NoteTab will cycle alphabetically through everything appearing in the clip list. Or press Alt + down (or click the black arrow at the end of the square box) and the full clip list can be scrolled through.


INSERTING SCRIPTLETS:
Double-click on "Autoreload script" in the Clip list (by dale3h at http://www.autohotkey.com/forum/viewtopic.php?t=135&postdays=0&postorder=asc&highlight=autoreload&start=15), and the script is pasted into the file you are working on. To view the scriptlet, right click on "Autoreload script" and choose "Edit Clip". Now you can view any script or code of any clip by clicking on that clip. To close the 'Clips' pane, just middle-click on that tab. In this way, a library of short scripts used often can be listed alphabetically in a cliplist (new cliplists can be easily made by right-clicking on the 'AHK' cliplist title and choose 'New'). If you leave the Edit Clip window open, you can quickly view what's stored in each clip.

FORMATTING CODE:
Type a name for a hotstring, then double-click the 'Hotstring' clip and double colons will be added fore and aft.

Highlight any section of text you want to 'hide' with comment mark code, and double-click the 'Comment' clip, and '/* */' will pasted around the text.

RUNNING WIZARDS:
To put in the code for a different icon for an .ahk file, double-click the clip named 'Tray Icon Wizard'. This box appears:

Place the icon path in the upper box (shell32.dll is default) and put the icon number after the comma on the second line (if necessary). Press OK, and the correct code is pasted at the cursor in the file you are working on.

The 'TrayTip Wizard' can similarly be double-clicked to insert the code for a text balloon to appear when you mouseover an ahk tray icon.

Wizards like these need to be programmed using the Clip programming feature in NoteTab.

STARTING OTHER PROGRAMS or AutoHotkey script files:
To insert a message box, I like to use Thalon's MessageBox Creator (http://www.apeboys.com/~sacredvault/viewtopic.php?t=65) which I saved simply as 'Msgbox.ahk', saved in my C:/Program Files/AutoHotkey directory. If Msgbox.ahk is in that location, just double-clicking the 'Msgbox' clip will open the Thalon's GUI, and the code will be pasted into the NoteTab file when you are done. You do not even have to click the clip. Hit the Esc key and start typing 'msgbox'. As soon as 'Msgbox' appears, press Enter and the file will open.

Similarly, any .ahk script or other program can be called from a cliplist in NoteTab.

The NoteTab programming is not perfect. For instance, I like majkinetor's Isense.ahk (http://www.autohotkey.com/forum/viewtopic.php?t=12985&highlight=isense) but the ^!Shell call from the NoteTab clip does not start it properly: several .ahk sub-files that are called by Isense.ahk do not start. This can probably be fixed by the NoteTab programmers if someone calls attention to it. Isense works pretty well with NoteTab using the PSPad editor method.

I am sharing all this because I think NoteTab has great possibilities which no one else in the forum seems to have paid any attention to. My hope is that someone with more talent and time than me will program a good part of the AHK code. This would make NoteTab an almost ideal programming tool, and turn it into a sort of "dashboard" from which you can pull in almost anything you need to code your scripts.

Now, if I can just persuade Fookes Software to program context formatting into NoteTab, it would be almost perfect...

What say ye?
Back to top
View user's profile Send private message
BoBo²
Guest





PostPosted: Thu May 08, 2008 10:49 am    Post subject: Reply with quote

Thanks for sharing it! Seems worth to have a look at it. Cool
Back to top
Wolfer



Joined: 08 Nov 2005
Posts: 14
Location: Chicago, IL

PostPosted: Thu May 08, 2008 5:46 pm    Post subject: One more benefit of NoteTab - very easy hyperlinking Reply with quote

There's one more feature in NoteTab I just learned about, and want to share: it's a very quick and easy way to create a "table of contents" for a script or series of scripts. All you need to do is enclose a search term between square brackets, exactly one space on each side. Double-click anywhere within the brackets, and NoteTab jumps to the next instance of that term in the file. This can be used to create a very quick and functional Table of Contents.

To explain a little more...
I prefer to keep most of my scripts in one file, and keep a few accessory utility files separate, like autocorrect.ahk. Since my work (Family Medicine) requires working on the electronic records from home, I need to synchronize a home and work Autohotkey.ahk file (home runs VISTA with a larger screen resolution, so Mouseclicks have to be recalibrated). I finally organized my scripts alphabetically under subheadings, so if I decide to add a script at work, I can easily copy it to the work file, etc...

I tried using a NoteTab outline (see figure below).


This seemed like a way to run a NoteTab outline file and .ahk file simultaneously, but unfortunately, the leading code that tells NoteTab that it is loading an outline (.otl) file starts with ' = V4 Outline Multiline ... ' and AutoHotkey just won't load it, and there's no way to work around it.

However, there is a simple alternative, which is to make a table of contents at the top of the script, as shown here:


NoteTab has a simple hyperlink system, using square brackets. I won't explain web links and file links, just linking within a file. To search within the same file, just use the words you want between two square brackets with exactly one space on either side of the word sequence, or preface the word sequence with a double colon ::. However, there are too many double colons in AutoHotkey, so I have defaulted to [<space>Search term<space>]. Ctrl-Double Click inside the brackets and you jump to the next instance of that term. You can simplify this to a simple double-click if you set the menu option "Tools | Quick Open Links", which removes the need to press the Ctrl key.

To get to 'TOP' I instead use a line search method, in which you follow the line number with '^L' (NoteTab Light displays the line number in the status bar in the lower left-hand corner; the Pro version shows line numbers in front of each line). This is necessary because a search for 'TOP' would not be unique if I used this after each heading further down in the file. Since my table of contents is at the top of the script, the line number won't change over time. Putting other words after the line number code does not affect this type of search.

Here's an example, showing what happens when I double-clicked inside the heading '[ BIT & PIECES ]': NoteTab jumped to that heading near the end of the script.


Double-clicking inside '[ 21^L "Directory" ]' shoots me back up to the Directory (of course, I could press Ctrl + Home, but I'm lazy and I want to keep my right hand on the mouse). By putting
'[ 21^L ]' after each heading further down in the file, I can quickly get back to the Directory.

NoteTab does not have everything. I still use Notepad++ for comparing files (NoteTab has a 2 file window, but it does not have vertical synchonization). The NoteTab Pro version has bookmarks, but this hyperlinking method is superfast and works better.

Combining AHK with two great programs other AHK'ers tipped me off to: SlickRun (http://www.bayden.com/SlickRun/) and NirCmd (http://www.nirsoft.net/utils/nircmd2.html), my computer is cookin' !

Anyway, that's my 2¢.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group