Hawkee Extender (jail breaker)

By raccoon on May 02, 2010

Image
Written in AutoHotkey, not iPad. ;)

Hawkee Extender (jail breaker)

This script expands the width of a [co**de] block beyond the constraints of the comments boundary, by creating a solid line of underscores as the last line before the [/co**de] tag.

Inspired by Goochie who discovered this hack.

When Hawkee updated the site to make [co****de] blocks fixed-width (as a request), it caused code text to become 1.5x as wide on average... resulting in tighter word wrapping. This method will give you much more room to paste code snippets in comments.

Requirements:
You will need to download AutoHotkey (for Windows) to execute this script. AutoHotkey is a free, open-source derivative of Auto-IT 2.x, and is a fun scripting language much like mIRC script (but more powerful).

Installation:
Copy this code into a file with the extension .ahk
Execute the file.

Usage:
Type ~hawk to paste a [co****de] block.

Enjoy!

~ Raccoon/EFnet

; Hawkee Extender, written in AutoHotkey.

; Calculate the length of the widest line in the clipboard.
; Create a line of underscores that width + 2.
; Paste the clipboard contents, plus underscores, to Hawkee.

:*:~hawk:: ; 28-Apr-2010 by Raccoon
  VarSetCapacity(xstr,512,95)
  xlen := 0
  Loop, Parse, Clipboard, `n, `r
    if (ylen := StrLen(A_LoopField)) > xlen
      xlen := ylen
  StringLeft, xstr, xstr, % xlen+2
  clipsave := ClipboardAll
  Clipboard := "

" Clipboard "rn" xstr "

`r`n"
  SendInput, ^v
  Clipboard := clipsave
  Return

Comments

Sign in to comment.
Jonesy44   -  May 14, 2010

Ah neat, I'd definately request a horizontal scrolling bar for code at the minimum. Read wrapped code is virtually impossible and ruins the idea of indentation :L

:)

 Respond  
raccoon   -  May 12, 2010

If you don't know if you like the idea, do you know if you actually dislike the idea? :)

Thanks for adding AHK. I'll post more snippets here and probably attract a few more members.

 Respond  
Hawkee   -  May 11, 2010

I'm not so sure I like the idea of breaking the layout of the site by using this, but I did add an AutoHotkey section to the site none-the-less.

raccoon  -  Jan 05, 2015

My tank looks so ugly now (bottom comment) :p What have you done! ;)

Hawkee  -  Jan 05, 2015

Maybe it's the font?

raccoon  -  Jan 06, 2015

Maybe :p Interesting things you've done to the place btw -- pretty nice. Could really use a quick consolidated (thin) list of my "pages" though to navigate them easier.

Sign in to comment

raccoon   -  May 02, 2010

Let this day mark the first AutoHotkey script posted to Hawkee.

 Respond  
raccoon   -  May 02, 2010
=== Change Log ===

v1.1 -- 02-May-2010
* Includes code-tags with the paste, so typing
  ~hawk pastes the whole block of code now.

v1.0 -- 28-Apr-2010
* First public release of script for AutoHotkey.

If you decide to use this script, or write one like it, please let me know by clicking the "Like it" button near the top of this page.

I'm open to suggestions and feedback. Please comment below so I can make improvements.

Comments may be tidied up every now and then. Take no offense.

 Respond  
raccoon   -  May 02, 2010

Example:

                                                     _..----.._                                   
                                                    ]_.--._____[                                  
                                                  ___|'--'__..|--._                               
                              __               """    ;            :                              
                            ()_ """"---...__.'""!":  /    ___       :                             
                               """---...__\]..__] | /    [ 0 ]      :                             
                                          """!--./ /      """        :                            
                                   __  ...._____;""'.__________..--..:_                           
                                  /  !"''''''!''''''''''|''''/' ' ' ' \"--..__  __..              
                                 /  /.--.    |          |  .'          \' ' '.""--.{'.            
             _...__            >=7 //.-.:    |          |.'             \ ._.__  ' '""'.          
          .-' /    """"----..../ "">==7-.....:______    |                \| |  "";.;-"> \         
          """";           __.."   .--"/"""""----...."""""----.....H_______\_!....'----""""]       
        _..---|._ __..--""       _!.-=_.            """""""""""""""                   ;"""        
       /   .-";-.'--...___     ." .-""; ';""-""-...^..__...-v.^___,  ,__v.__..--^"--""-v.^v,      
      ;   ;   |'.         """-/ ./;  ;   ;\P.        ;   ;        """"____;  ;.--""""// '""<,     
      ;   ;   | 1            ;  ;  '.: .'  ;<   ___.-'._.'------""""""____'..'.--""";;'  o ';     
      '.   \__:/__           ;  ;--""()_   ;'  /___ .-" ____---""""""" __.._ __._   '>.,  ,/;     
        \   \    /"""<--...__;  '_.-'/; ""; ;.'.'  "-..'    "-.      /"/    `__. '.   "---";      
         '.  'v ; ;     ;;    \  \ .'  \ ; ////    _.-" "-._   ;    : ;   .-'__ '. ;   .^".'      
           '.  '; '.   .'/     '. `-.__.' /;;;   .o__.---.__o. ;    : ;   '"";;""' ;v^" .^        
             '-. '-.___.'<__v.^,v'.  '-.-' ;|:   '    :      ` ;v^v^'.'.    .;'.__/_..-'          
                '-...__.___...---""'-.   '-'.;\     'WW\     .'_____..>."^"-""""""""    fsc       
                                      '--..__ '"._..'  '"-;;"""                                   
                                             """---'""""""                                        
____________________________________________________________________________________________________
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.