AutoHotkey Community

It is currently May 26th, 2012, 1:04 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: February 21st, 2008, 5:26 pm 
Offline

Joined: July 3rd, 2007, 6:04 am
Posts: 9
\since some might prefer Sort preset option, improved script below:
Code:
/*
; Subscript lists "Labels" (or "Tag" marks, according to settings) contained in an "ahk" script
; Select within the table, and program will use Editor (Active App) to locate
; Also operates on .BAT files, or (for :Headings . .) .txt,.txx files where Label has ":"
;   at start of line
; HotKeys:
;    !^esc: exitapp
;    F10:   exitapp
;   ^!f5:  sendRaw `;###########################################################################################`n;tag`n
;    +f5:   Restore program list of Labels

; As Long as the Editor "Title" carries the current .AHK extension, should work on most editors
;  Note allows .txt, .txx also, selecting :Heading . . with ":" at start of line.

; the GUI is looking for .AHK or .Txt or .txx in the title.
; Default: uses Label":" as the key to jump to a label     
;   OR from Setup, use ";tag" as the key to jump to a sub/routine
;   Ctrl+ALT+F5 will insert one wherever you need it
;   whatever is on the next line after ;tag is displayed in the subscript window
; Selecting "SORT List ON/OFF" at end of table will toggle list-SORT option, Default is SORT OFF
; This version includes a special variation to allow the hotkey Ctrl+R in EditPad Pro Editor
; Original program details from www.autohotkey.com:
; language:       english
; platform:       win9x/nt/xp
; author:         Trubbleguy <trubbleguy@trubbleguy.com>
; November 21 2007
; modified by TWmailrec  ; Feb 16, 2008
;    BIGNOTE removed
*/


#SingleInstance force
#WinActivateForce
;#Persistent
Persist_fast = 0
IfExist, %a_scriptdir%\subscript.ini
{
   IniRead,Persist_fast,%a_scriptdir%\subscript.ini,Settings,Persist_fast
   If Persist_fast=ERROR
   {
      Persist_fast := 2
      iniWrite,2,%a_scriptdir%\subscript.ini,Settings,Persist_fast
      #Persistent
   }
   Else
   {
      If Persist_fast
      {
   ;      TSR
         #Persistent
      }
   }
}
   
#Include Anchor.ahk
#NoEnv
AutoTrim, Off
Normal := A_BatchLines
OnExit, quit
SendMode Input

programname = subscript ; debug: to do
programversion = v1.001 ; debug: to do
programfullname = %programname% %programversion%
programauthor = trubbleguy ; debug: to do
progtitle = subscript
inifilename=subscript
_ini=%a_scriptdir%\%inifilename%.ini
Guinum=1
ifNotExist, %_ini%
{
   InitConfigini = 1
   iniWrite,1,%_ini%,Settings,InitConfigini
}
;InitInstall  - FOR FIRST TIME USE ON A NEW SYSTEM      ;;
IniRead,InitConfigini,%_ini%,Settings,InitConfigini
If InitConfigini=ERROR
   InitConfigini = 1
;Else
;   InitConfigini = 0
If InitConfigini!= 1
{
;   SysGet, mwa, monitorworkarea,1
   IniRead,ScreenHeight,%_ini%,Settings,ScreenHeight
   If A_ScreenHeight != %ScreenHeight%
      InitConfigini = 1
}

Font_TFace = MS sans serif
fontsize=10 ;initial set this to your preferences
;Font_TFace = Courier New
;Font_TFace = Lucida Console
IniRead,fontsize,%_ini%,Settings,fontsize
If fontsize=ERROR
{
   fontsize = 10
   iniWrite,10,%_ini%,Settings,fontsize
}

labelscout = 1
IniRead,labelscout,%_ini%,Settings,labelscout
If labelscout=ERROR
{
   labelscout = 1
   iniWrite,1,%_ini%,Settings,labelscout
}
SortLst := 0
IniRead,SortLst,%_ini%,Settings,SortLst
If SortLst=ERROR
{
   SortLst = 0
   iniWrite,0,%_ini%,Settings,SortLst
}
cliperror := 0

;--------------------------------------------------------------------
;@@   @@   @@    @@@@@@  @@   @@ @@@@ @@   @@   @@@@   @@   @@   @@  ;
;@@   @@  @@@@    @@  @@ @@@  @@  @@  @@@  @@  @@  @@ @@@@ @@@@ @@@@ ;
;@@   @@ @@  @@   @@  @@ @@@@ @@  @@  @@@@ @@ @@      @@@@ @@@@ @@@@ ;
;@@ @ @@ @@  @@   @@@@@  @@ @@@@  @@  @@ @@@@ @@      @@@@ @@@@ @@@@ ;
;@@@@@@@ @@@@@@   @@ @@  @@  @@@  @@  @@  @@@ @@  @@@  @@   @@   @@  ;
;@@@ @@@ @@  @@   @@  @@ @@   @@  @@  @@   @@  @@  @@                ;
;@@   @@ @@  @@  @@@  @@ @@   @@ @@@@ @@   @@   @@@@@  @@   @@   @@  ;
;--------------------------------------------------------------------;
;in the Vars AA1 thru AA8, the spaces are "NO-Break" and not normal spaces, use ALT+0160 to create one
;Vars; char width is WW1,the letters are then proportional due to the letters width

;WW1=24476773447736277666766666445666777777776477777777766667767575776777766774674766777657677666267
;;;; !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
;AA1=         @@     @  @     @@ @@    @@    @@@   @   @@@    @@       @@    @@                                                   @@  @@@@@    @@     @@@@    @@@@      @@@  @@@@@@    @@@   @@@@@@   @@@@    @@@@                      @@            @@      @@@@    @@@@@    @@    @@@@@@    @@@@  @@@@@    @@@@@@  @@@@@@   @@@@  @@  @@  @@@@       @@@@ @@@  @@ @@      @@   @@ @@   @@   @@@   @@@@@@   @@@@   @@@@@@   @@@@   @@@@@@  @@  @@  @@  @@  @@   @@ @@   @@ @@  @@  @@@@@@@  @@@@   @@       @@@@      @              @@            @@@                @@@            @@@           @@@      @@         @@  @@@     @@@                                                               @                                                        @@@  @@      @@@      @@@ @@        
;AA2=        @@@@    @  @     @@ @@   @@@@@  @ @  @   @@ @@   @@      @@      @@      @@  @@    @@                               @@  @@   @@  @@@    @@  @@  @@  @@    @@@@  @@       @@     @@  @@  @@  @@  @@  @@    @@      @@      @@              @@    @@  @@  @@   @@  @@@@    @@  @@  @@  @@  @@ @@   @@      @@      @@  @@ @@  @@   @@         @@   @@  @@ @@      @@@ @@@ @@@  @@  @@ @@   @@  @@ @@  @@   @@  @@ @@  @@    @@    @@  @@  @@  @@  @@   @@ @@   @@ @@  @@       @@  @@      @@        @@     @@@             @@             @@                 @@           @@ @@           @@                      @@      @@                                                              @@                                                       @@    @@        @@    @@ @@@         
;AA3=        @@@@            @@@@@@@ @@      @@@ @     @@@   @@      @@        @@      @@@@     @@                              @@   @@  @@@   @@        @@      @@   @@ @@  @@@@@   @@          @@  @@  @@  @@  @@    @@      @@     @@     @@@@@@     @@       @@  @@ @@@@ @@  @@   @@  @@ @@       @@  @@  @@      @@     @@      @@  @@   @@         @@   @@ @@  @@      @@@@@@@ @@@@ @@ @@   @@  @@  @@ @@  @@   @@  @@ @@@       @@    @@  @@  @@  @@  @@   @@  @@ @@  @@  @@      @@   @@       @@       @@    @@ @@             @@    @@@@    @@      @@@@       @@   @@@@    @@      @@@ @@  @@ @@  @@@         @@   @@  @@  @@     @@  @@  @@@@@    @@@@   @@ @@@   @@@ @@ @@ @@@   @@@@@  @@@@@   @@  @@  @@  @@  @@   @@ @@   @@ @@  @@  @@@@@@    @@    @@        @@                   
;AA4=        @@@@             @@ @@   @@@@      @     @@@ @@         @@        @@    @@@@@@@ @@@@@@@@        @@@@@@            @@    @@ @@@@   @@      @@@     @@@   @@  @@      @@  @@@@@      @@    @@@@    @@@@@                  @@                  @@     @@   @@ @@@@ @@  @@   @@@@@  @@       @@  @@  @@@@    @@@@   @@      @@@@@@   @@         @@   @@@@   @@      @@@@@@@ @@ @@@@ @@   @@  @@@@@  @@  @@   @@@@@   @@@      @@    @@  @@  @@  @@  @@ @ @@   @@@    @@@@      @@    @@        @@      @@   @@   @@                     @@   @@@@@  @@  @@   @@@@@  @@  @@  @@@@    @@  @@   @@@ @@  @@         @@   @@ @@   @@     @@@ @@@ @@  @@  @@  @@   @@  @@ @@  @@   @@@ @@ @@       @@     @@  @@  @@  @@  @@ @ @@  @@ @@  @@  @@  @  @@   @@@     @@         @@@                 
;AA5=         @@             @@@@@@@     @@    @ @@@ @@ @@@          @@        @@      @@@@     @@                            @@     @@@@ @@   @@     @@         @@  @@@@@@@     @@  @@  @@    @@    @@  @@      @@                   @@                @@     @@    @@ @@@@ @@@@@@   @@  @@ @@       @@  @@  @@      @@     @@  @@@ @@  @@   @@     @@  @@   @@ @@  @@      @@ @ @@ @@  @@@ @@   @@  @@     @@ @@@   @@ @@     @@@    @@    @@  @@  @@  @@  @@@@@@@   @@@     @@      @@     @@         @@     @@                            @@@@@   @@  @@ @@      @@  @@  @@@@@@   @@     @@  @@   @@  @@  @@         @@   @@@@    @@     @@@@@@@ @@  @@  @@  @@   @@  @@ @@  @@   @@  @@  @@@@    @@     @@  @@  @@  @@  @@@@@@@   @@@   @@  @@    @@      @@    @@        @@                   
;AA6=                         @@ @@  @@@@@    @  @ @ @@  @@           @@      @@      @@  @@    @@    @@             @@      @@      @@@  @@   @@    @@  @@  @@  @@      @@  @@  @@  @@  @@    @@    @@  @@     @@     @@      @@      @@    @@@@@@    @@            @@      @@  @@   @@  @@  @@  @@  @@ @@   @@      @@      @@  @@ @@  @@   @@     @@  @@   @@  @@ @@      @@   @@ @@   @@  @@ @@   @@      @@@@    @@  @@ @@  @@    @@    @@  @@   @@@@   @@@ @@@  @@ @@    @@     @@      @@          @@    @@                           @@  @@   @@  @@ @@  @@  @@  @@  @@       @@      @@@@@   @@  @@  @@     @@  @@   @@ @@   @@     @@ @ @@ @@  @@  @@  @@   @@@@@   @@@@@   @@         @@   @@ @   @@  @@   @@@@   @@@ @@@  @@ @@   @@@@@   @@  @    @@    @@        @@                   
;AA7=         @@              @@ @@    @@    @   @@@  @@@ @@           @@    @@                      @@              @@      @        @@@@@  @@@@@@  @@@@@@   @@@@      @@@@  @@@@    @@@@     @@     @@@@    @@@      @@     @@        @@            @@       @@     @@@@   @@  @@  @@@@@@    @@@@  @@@@@    @@@@@@  @@       @@@@@ @@  @@  @@@@     @@@@   @@@  @@ @@@@@@  @@   @@ @@   @@   @@@   @@@@       @@@  @@@  @@  @@@@     @@    @@@@@@    @@    @@   @@ @@   @@  @@@@   @@@@@@@  @@@@         @  @@@@                            @@@ @@ @@ @@@   @@@@    @@@ @@  @@@@   @@@@        @@  @@@  @@ @@@@    @@  @@  @@@  @@ @@@@    @@   @@ @@  @@   @@@@    @@         @@  @@@@    @@@@@     @@     @@@ @@   @@    @@   @@ @@   @@     @@  @@@@@@     @@@  @@      @@@                    
;AA8=------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------@@@@@@@----------------------------------------------------------@@@@--------------------@@@@-------------------------------------------@@@---------@@@----------------------------------------------------------@@@@-------------------------------------------
;;  1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 
;;  |32   |33 ! |34 " |35 # |36 $ |37 % |38 & |39 ' |40 ( |41 ) |42 * |43 + |44 , |45 - |46  |47 / |48 0 |49 1 |50 2 |51 3 |52 4 |53 5 |54 6 |55 7 |56 8 |57 9 |58 : |59 ; |60 < |61 = |62 > |63 ? |64 @ |65 A |66 B |67 C |68 D |69 E |70 F |71 G |72 H |73 I |74 J |75 K |76 L |77 M |78 N |79 O |80 P |81 Q |82 R |83 S |84 T |85 U |86 V |87 W |88 X |89 Y |90 Z |91 [ |92 \ |93 ] |94 ^ |95 _ |96 ` |97 a |98 b |99 c |100 d|101 e|102 f|103 g|104 h|105 i|106 j|107 k|108 l|109 m|110 n|111 o|112 p|113 q|114 r|115 s|116 t|117 u|118 v|119 w|120 x|121 y|122 z|123 {|124 ||125 }|126 ~/


If InitConfigini=1
   Gosub getwinparams
Else
{
   IniRead,_rowheight,%_ini%,Settings,rowheight
   IniRead,_winheightwaste,%_ini%,Settings,winheightwaste
}

If Persist_fast = 2
   SetTimer, onchange,500      ;=
SetTitleMatchMode,2
StringCaseSense,off
SysGet, mwa, monitorworkarea,1
_y := A_ScreenHeight
_l := (_y-_winheightwaste)/_rowheight
Gosub traymenu


;###########################################################################################
;tag
Restart:
WinGetActiveTitle,_title

;Gui:
_w=160
;If labelscout != 1
If _title Contains .txt,.txx
   _w=420
_w1:=(_w-5)
Gui, Margin,2,2
Gui +LastFound +ToolWindow +Border +Resize
Gui, font, s%fontsize% W150, %Font_TFace%
Gui, add,ListView,vlist1 BackgRoundFFFFF9 -Hdr -Hscroll grid x0 y0 w%_w1% r%_l% gOK AltSubmit Default,Subs
DllCall("QueryPerformanceFrequency", "Int64P", freq)
GuiControl, +Default, OK,
;WinActivate, %_title%      ;=
Gosub getprog
Gui, show,x1 y1,%progtitle%
WinShow %progtitle%
WinActivate, %progtitle%
WinWait,%progtitle%,,1
;Gui, 1:Show,, %progtitle%

If FinishSub = 2
{
   FinishSub := 0
   Return
}

;###########################################################################################
;tag
hotkeys:

!^esc::exitapp
F10::exitapp
^!f5::sendRaw `;###########################################################################################`n;tag`n
;+f5::gosub getprog
$+f5::gosub Restoreprog
; !t::sendRaw `;###########################################################################################`n;tag`n
; !f12::gosub getprog
; !^b::Gosub BigNotes
; !^f6::Gosub BigNotes
; !^m::SendRaw ControlSetText,,message,Status

;If SubscriptEnter != 1
;{
;   #UseHook
;   Hotkey, Enter, SubscriptvuEnt, on
;   Hotkey, NumpadEnter, SubscriptvuEnt, on
;}

Return


;###########################################################################################
;tag
;Anchor:
GuiSize:
   DllCall("QueryPerformanceCounter", "Int64P", t0)
   Anchor("list1", "w h")
   GuiWidth := A_GuiWidth
   DllCall("QueryPerformanceCounter", "Int64P", t1)

Return
;###########################################################################################
;tag
;

setup:
   SubscriptEnter=
   Hotkey, Enter,, off
   Hotkey, NumpadEnter,, off
   #UseHook Off

   GoSub, getwinparams
   MsgBox, 260,Setup routine,OK to use "`;Tag`", NOT "Labels:"?
   IfMsgBox Yes
   {
      labelscout := 0
      iniWrite,0,%_ini%,Settings,labelscout
   }
   IfMsgBox No
   {
      labelscout := 1
      iniWrite,1,%_ini%,Settings,labelscout
   }

Gosub getprog
Return

;tag
;Caps Lock On:
caps:
; NOT USED

Return

;###########################################################################################
;tag
;DoubleClick:

;tag
;OK:
OK:
;if (A_GuiEvent="F") OR (A_GuiEvent="f") OR (A_GuiEvent="I") OR (A_EventInfo=0)
;   Return
;      if (GetKeyState("Enter","P")) OR (GetKeyState("NumPadEnter","P"))
;      {
;MsgBox, Enter pressed
;      }

If A_GuiEvent=Normal
   Goto, SubscriptvuEnt
Return
;   {
SubscriptvuEnt:

   ControlFocus , SysListView321, subscript
   FocusedRowNumber := LV_GetNext(0, "F")  ; Find the focused row.
   if not FocusedRowNumber  ; No row is focused.
       return
      IfWinNotExist, %_Title%
         Goto, Quit

;      LV_GetText(rowtext,A_EventInfo)
      LV_GetText(rowtext,FocusedRowNumber)
      If rowtext=@Reload List
      {
         WinActivate, %_title%
         Gosub getprog
         Return
      }
      If rowtext=@TOP
      {
         WinActivate,%_title%
         Send, ^{home}
         Goto, SsClear
      }
      If rowtext=~Bottom
      {
         WinActivate,%_title%
         Send, ^{end}
         Goto, SsClear
      }
      If (rowtext = "~SORT List OFF") OR (rowtext = "~SORT List ON")
      {
         WinActivate,%_title%
         If SortLst
         {
            iniWrite,0,%_ini%,Settings,SortLst
            SortLst := 0
         }
         Else
         {
            iniWrite,1,%_ini%,Settings,SortLst
            SortLst := 1
         }
         Gosub getprog
         Return
      }

      WinActivate,%_title%
      send, ^{home}
;      If labelscout = 1
      If _title Contains .txt,.txx,.bat
         rowtext = :%rowtext%

;      If _title Contains Notepad
;         Send, ^{home}
      If _title contains EditPad Pro
      {
         GoSub, SsClear
         Send, ^r{Delete}%rowtext%^f
         Send, {ESC}{home}{down}{home}
         Send, {F8}{F7}{F7}{F8}^+{F9}
         Send, {ShiftUp}{CtrlUp}{AltUp}{ClickUp} ;ensure all keys back to neutral standing after job
      }
      Else
      {
         GoSub, SsClear
         Send, ^f%rowtext%
;         Send !o
         Sleep, 50
         IfWinExist, Find
               Send, {Enter}
         Else
         IfWinExist, Search
               Send, {Enter}
         Send, {ESC}{home}{home}{down}{home}{home}
         Send, {ShiftUp}{CtrlUp}{AltUp}{ClickUp} ;ensure all keys back to neutral standing after job
      }
;   }
   ;Listvars

If Persist_fast = 0
   Goto, Quit
   
Return

SsClear:
;If SubscriptEnter = 1
;{
   SubscriptEnter=
   Hotkey, Enter,, off
   Hotkey, NumpadEnter,, off
   #UseHook Off
;}
Return


;###########################################################################################
;tag
;Restoreprog:

Restoreprog:
;   Goto, RestoreprogXX
If Persist_fast = 0
   Goto, Getprog
   
   SetTitleMatchMode,2
   IfWinNotExist, %_title%
   {
      FinishSub := 1
      Loop, Parse, _title, %A_Space%
      {
         SetTitleMatchMode,2
         IfWinExist, %A_LoopField%
         {
;            editor still Active
;            WinActivate, %A_LoopField%
            FinishSub := 0
         }
      }
      If FinishSub = 0
      {
         WinGetActiveTitle,_title
         If _title not Contains .ahk,.txt,.txx,.bat
         FinishSub := 1
      }
      If FinishSub = 1
      {
;         editor not Active
         Goto, Quit
      }
      Else
      {
;         editor with Next/Previous file
         FinishSub := 2
         Gui, Destroy
         Goto Restart
      }
   }

RestoreprogXX:
IfWinExist, %progtitle%
{
   SubscriptEnter = 1
   Hotkey, Enter,, on
   Hotkey, NumpadEnter,, on
   GuiControlGet, focusControl, 1:Focus

   If focusControl = SysListView321
      Return
   Else
   {
      Send, ^{Home}
      Send, {Home}
      WinShow %progtitle%
      WinActivate, %progtitle%
      ControlFocus , SysListView321, %progtitle%
      Return
   }
}
;Else
;   Goto, getprog
;Return



;###########################################################################################
;tag
;Getprog:

getprog:
;;   WinGetActiveTitle,_title ;=
;MsgBox, At getprog`n_title=%_title%
   SetTitleMatchMode,2
   WinActivate,%_title%
   If _title not Contains .ahk,.txt,.txx,.bat
      Goto, Quit
   clipbak := ClipboardAll
;   Goto, progprocs

progprocs:
   Clipboard=
   GuiControl, 1:Disable, List1
   WinActivate, %_title%
   WinWait, %_title%,,1
   Send, ^a
   sleep, 100
   Send, ^c
   clipwait,1
; Clear BLOCK (Selection)
   If _title contains EditPad Pro
      Send, {F8}{F7}{F7}{F8}^+{F9}
   Send, ^{Home}
   Send, {Home}
   t=0
   LV_Delete()
   LV_Add(" ","@Reload List")
   LV_Add(" ","@TOP")
   Sleep 200                        ;make this variable bigger if not showing tags in list
   If labelscout = 1
      Goto, labelchk

   If ClipBoard = %Null_var%
   {
      If cliperror < 2
      {
         cliperror += 1
         Goto, progprocs   
      }
;      Else
;      MsgBox, ERROR: No Contents
   }
   Loop , Parse, ClipBoard,`n,`r
      {
         If t=1
            {
               StringUpper,namee,A_LoopField
               StringReplace,namee,namee,`;,,
               LV_Add(" ",namee)
               t=0
               Continue
            }
         StringLeft,hunt,A_LoopField ,4
         If hunt Contains;tag
            {
               t=1
               Continue
            }
      }
   If SortLst
   {
      LV_ModifyCol(1,"Sort")
      LV_Add(" ","~SORT List OFF")
   }
   Else
      LV_Add(" ","~SORT List ON")
      
   LV_Add(" ","~Bottom")
;   If labelscout != 1
;   If _title Contains .txt,.txx
;   {
;      GuiControlGet, pos_Now, Pos, List1 ; retrieve listview dimensions/position ; for auto-sizing (elsewhere)
;      pos_NowW = %pos_NowW% + 120
;      GuiControl, Move, List1, W%pos_NowW%
;   ;   LV_ModifyCol(1, 320) ; Make the First column a little narrower
;   }

      GuiControl, 1:Enable, List1
   Gui, 1:Show,x1 y1, %progtitle%
   WinShow %progtitle%
   WinActivate, %progtitle%
   WinWait,%progtitle%,,1
;   WinActivate, %_title%      ;=
   Clipboard := clipbak
;If SubscriptEnter != 1
;{
   #UseHook
   Hotkey, Enter, SubscriptvuEnt, on
   Hotkey, NumpadEnter, SubscriptvuEnt, on
;}
Return
; Use Labels NOT ;Tag
labelchk:

   If ClipBoard = %Null_var%
   {
      If cliperror < 2
      {
         cliperror += 1
         Goto, progprocs   
      }
;      Else
;      MsgBox, ERROR: No Contents
   }

;   Loop , Parse, ClipBoard,`n,`r
   Loop , Parse, ClipBoard,`n
   {
      StringLeft,hunt,A_LoopField,24
      IfNotInString, hunt, :
         continue

      If _title contains .ahk,.bat
      If hunt Contains %A_Space%
         continue
      If hunt Contains http,mailto,\,=,::
         continue
      If _title not contains .ahk
      {
         StringGetPos, pos, hunt, :
             if pos >= 2
         continue
      }
      StringReplace,huntchk,hunt,`;,,
      If huntchk != %hunt%
         continue
;      If hunt Contains `,
      StringReplace,huntchk,hunt,`,,,
      If huntchk != %hunt%
         continue

;      {
         t=1
;         Continue
;      }
      If t=1
      {
;         StringUpper,namee,A_LoopField
         namee = %A_LoopField%
         If _title Contains .txt,.txx,.bat
            StringReplace,namee,namee,:,,
         LV_Add(" ",namee)
         t=0
         Continue
      }
   }
   If SortLst
   {
      LV_ModifyCol(1,"Sort")
      LV_Add(" ","~SORT List OFF")
   }
   Else
      LV_Add(" ","~SORT List ON")

   LV_Add(" ","~Bottom")
      GuiControl, 1:Enable, List1
   Gui, 1:Show,x1 y1, %progtitle%
   WinShow %progtitle%
   WinActivate, %progtitle%
   WinWait,%progtitle%,,1
;   WinActivate, %_title%      ;=
   Clipboard := clipbak
;If SubscriptEnter != 1
;{
   #UseHook
   Hotkey, Enter, SubscriptvuEnt, on
   Hotkey, NumpadEnter, SubscriptvuEnt, on
;}
Return


;###########################################################################################
;tag
;onChange:
onchange:
; NOT USED: Editor can switch to Next/Previous file
   SetTitleMatchMode,2
   WinGetActiveTitle, OutputVar
   If OutputVar contains %programname%
      Return
   If OutputVar contains tray,Program Help
      Return
   If OutputVar = %progtitle%
   {
      SetTitleMatchMode,2
      IfWinExist, .ahk
         WinGetTitle, OutputVar, .ahk
      IfWinExist, .txt
         WinGetTitle, OutputVar, .txt
      IfWinExist, .txx
         WinGetTitle, OutputVar, .txx
      IfWinExist, .BAT
         WinGetTitle, OutputVar, .BAT
   }
   If OutputVar Contains .ahk,.txt,.txx,.bat
      Goto, onchangeAct
   Else
   {
      Goto, Quit
   }
   
   Return
onchangeAct:

   If OUtputVar<>%_title%
   {
      FinishSub := 2
;         Gosub getprog
;      Gui, Destroy
;      Goto Restart
   }
Return

; OBSOLETE
   If GetKeyState("CapsLock","T")
   {
      SoundBeep, 990,30
      SoundBeep, 550,30
      SoundBeep, 130,30
   }

;###########################################################################################
;tag
;getwinparams:
;this following code compares two gui's to get true rowheight then creates the listview accordingly using Current FONT SIZE
getwinparams:
   Gui, 16:+LastFound +ToolWindow +Border +Resize
   Gui, 16:font, s%fontsize%, %Font_TFace%
   Gui, 16:Add, ListView,r1,16| | | | | | | | |
   Gui, 16:Add, Button, w1 h1 Hidden Default, OK
   Gui,16:show,,one
   Sleep 100
   WinGetPos,GX,GY,GW,GH,one
   Gui, 17:+LastFound +ToolWindow +Border +Resize
   Gui, 17:font, s%fontsize%, %Font_TFace%
   Gui, 17:Add, ListView,r2,17| | | | | | | | |
   Gui, 17:Add, Button, w1 h1 Hidden Default, OK
   Gui,17:show,,two
   Sleep 100
   WinGetPos,GX,GY,GW,2GH,two
   _rowheight:=(2GH-GH)
   _winheightwaste:=(GH-_rowheight)
   Gui,16:Destroy
   Gui,17:Destroy
   iniWrite,%A_ScreenHeight%,%_ini%,Settings,ScreenHeight
   iniWrite,%_rowheight%,%_ini%,Settings,rowheight
   iniWrite,%_winheightwaste%,%_ini%,Settings,winheightwaste
   iniWrite,0,%_ini%,Settings,InitConfigini
   InitConfigini := 0
   
Return

;###########################################################################################
;tag
;Tray Menu:
traymenu:
;    disable standard menu items
;   Menu,Tray,NoStandard
;   Menu,Tray,DeleteAll
   ; set tray tip
   Menu, tray, tip, %programfullname%
   ; separator
   Menu, tray, add
   Menu, tray, add, &About, about
   Menu, tray, add, &Help, ProgHelp
   ; setup messageBox
   Menu, tray, add, &Setup, setup
   Menu, tray, add, &List Label..., Restoreprog
   ; separator
   Menu, tray, add
   ; terminate script
;   Menu,Tray,Add,&Pause-Tgl..,PSuspend
   Menu, tray, add, &Quit, quit
   Menu,Tray,Default,&List Label...
Return

;Exit App:
exit:
quit:
   FinishSub=
   SetTimer,onchange,off
; ;         Send, +f5
   Gui, Destroy
   ExitApp

Return


;tag
about:
   MsgBox, 64, %programfullname%,
      ( ltrim
         %programfullname%
         %a_space%by %programauthor%

         subscript jump to subs utility

         http://trubbleguy.com

         use [alt]+[esc] or F10 to terminate the program.
      )
Return

ProgHelp:
; SetTimer, onchange,off // allow program Help
;If Persist_fast = 2
;   SetTimer, onchange,off
   
GoSub, SsClear

;Gui,Destroy
Gui, 15:+LastFound +ToolWindow +Border +Resize
Gui, 15:Add,Picture,Icon1,%programname%.exe
Gui, 15:font, s%fontsize%, %Font_TFace%
Gui, 15:Font,Bold
Gui, 15:Add,Text,x+80 yp+10,%programname%.exe v1.0
Gui, 15:Font
Gui, 15:Add,Text,xm,HotKeys programmed into Subscript.ahk, (.exe)
Gui, 15:Add,Text,xm+10,[Alt]+[Ctrl]+Esc  OR  F10: exit
Gui, 15:Add,Text,xm+10,[Alt]+[Ctrl]+F5: Write "Tag" + Separator line
Gui, 15:Add,Text,xm+10,[Shift]+F5: Show list of Labels / "Tags"
Gui, 15:Add,Text,xm y+15, Click on item in List to jump to Subroutine Label/"Tag"
Gui, 15:Add,Text,xm,Selecting "SORT List ON/OFF" will toggle list-SORT ON or OFF
Gui, 15:Add,Text,xm,For .ahk files`, Sub/r labels end with ":"
Gui, 15:Add,Text,xm,For .txt / .BAT files`, Sub/r labels start with ":"
Gui, 15:Add,Text,xm,Settings: select listing of "Labels" or "Tag" marks
Gui, 15:Add,Text,xm,Made using AutoHotkey -
Gui, 15:Font,CBlue Underline
Gui, 15:Add,Text,x+5 GAUTOHOTKEY,http://www.autohotkey.com
Gui, 15:Font
Gui, 15:Add,Button,GHELPOK Default xm+220 y+20 w75,&OK
;Gui, 15:Show,,%programname% Help
Gui, 15:Show,,Program Help
about=
Return

AUTOHOTKEY:
Gui,15:Destroy
Run,http://www.autohotkey.com,,UseErrorLevel
Return

HELPOK:
Gui,15:Destroy
If Persist_fast = 0
   Goto, Quit
Return

PSuspend:
Gui,15:Destroy
Suspend            ; Assign the toggle-suspend function to a hotkey
Return

;###########################################################################################



Report this post
Top
 Profile  
Reply with quote  
 Post subject: Updated
PostPosted: January 3rd, 2009, 4:49 am 
Offline

Joined: January 20th, 2007, 1:29 pm
Posts: 96
Location: Melbourne
UPDATED 3rd JAN 2009

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Added Notepad2
PostPosted: January 5th, 2009, 4:46 am 
Offline

Joined: January 20th, 2007, 1:29 pm
Posts: 96
Location: Melbourne
Added Notepad2 4th Jan 2009

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: DataLife, IsNull and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group