 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Trubbleguy
Joined: 20 Jan 2007 Posts: 96 Location: Melbourne
|
Posted: Tue Aug 28, 2007 3:56 pm Post subject: Programming Utility SubFinder Script |
|
|
UPDATED 3RD JAN 2009
ADDED NOTEPAD2 4TH JAN 2009
(notepad2 requires the window title display to be set to full pathname in settings tab)
This stemmed from the Big Notes code i posted earlier, an idea that seems to work very well now i have it running right.
I wanted to Jump to any SUB instantly while programming, Big Notes let me scroll there without missing it, but this is way way better....
Use in your scripts the following:
;tag
Whatever is immediately on the next line, (usually the Sub Name) is listed in SubScript's listview.
double clicking the item in listview instantly uses your editors CTRL F and jumps to the location in your code.
NO MORE SCROLLING LOOKING FOR SUBS....OR ANY OTHER ITEM YOU ;tag
I made it live vertically on the left side of the screen so all subs are easy to click on when you are using it.
previous version is here http://www.trubbleguy.com/SubScript.zip**UPDATED 11/21/2007**
Please Note Anchor.ahk is needed for resizing GUI, you will find all needed files in the ZIP
| Code: |
;--------------------------------------------------------------------------------------------
; @@@@ @@@ @@@@ @@ @ @@ @@ @@@@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ ;
;@@@ @@ @@ @@ @@@ @@@@ @@ @@@ @@@ @@ @@@ @@@@@ @@ @@ @@ @@ ;
; @@@ @@ @@ @@@@@ @@@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ ;
; @@@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@ @ @@@@ @@ @@ @@ @@ ;
; @@@@ @@@ @@ @@ @@@ @@@@ @@@@ @@@@ @@@@ @@ @@ @@ @@@@ @@ @@@@@@ ;
;
;With BigNotes...
;CTRL+ALT+B for placing a bignote...WARNING, USE A NON PROPORTIONAL FONT IN YOUR EDITOR WITH BIGNOTES
;This Version works with Crimson Editor, Notepad++ and Notepad2
;use ;tag as the key to jumping to a sub ALT+T will insert one wherever you need it
;whatever is on the next line after ;tag is displayed in the subscript window
;you can now switch between tag or subs by a mouseclick
; language: english
; platform: win9x/nt
; author: Trubbleguy <trubbleguy@trubbleguy.com>
;November 21 2007;StartSub Main ##################################################
Main:
#SingleInstance force
#WinActivateForce
#Persistent
#NoEnv
fontsize=8 ;set this to your preferences
AutoTrim, Off
Normal:=A_BatchLines
OnExit, quit
SendMode Input
;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= @@@@ @ @ @@ @@ @@@@@ @ @ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@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 @@ @@@@ @@ @@ @@@ @@ @@@@ @@ @@ @@ @@ @@@@ @@ @@ @@@@ @@@@@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@@ @@ @@@
;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 ~/
WinGetActiveTitle,_title
programname = subscript ; debug: to do
programversion = v3.001 ; debug: to do
programfullname = %programname% %programversion%
programauthor = trubbleguy ; debug: to do
inifilename=none
Guinum=1
Gosub getwinparams
SetTimer, onchange,500
SetTitleMatchMode,2
_ini=%a_scriptdir%\%inifilename%.ini
StringCaseSense,off
SysGet, mwa, monitorworkarea,
_y := A_ScreenHeight
_l := (_y-_winheightwaste)/_rowheight
Gosub traymenu
_w=160
_w1:=(_w-5)
Gui, Margin,2,2
Gui +LastFound +ToolWindow +Border +Resize
Gui, font, s%fontsize% W150, Lucida Console
Gui, add,ListView,vlist1 BackgRoundFFFFF9 -Hdr grid x0 y0 w%_w1% r%_l% gOK AltSubmit Default,Subs
DllCall("QueryPerformanceFrequency", "Int64P", freq)
Gui, show,x1 y1,Subscript/Bignote
Gosub getprog
WinActivate,%_title%
;StartSub About ##################################################
about:
MsgBox, 64, %programfullname%,
( ltrim
%programfullname%
%a_space%by %programauthor%
subscript jump to subs
utility
http://trubbleguy.com
use [alt]+[esc] to terminate the program.
)
Return
;StartSub Bignotes ##################################################
;tag
BigNotes:
;wingetactivetitle,_title1
SetBatchLines,-1
btop=
Loop 8
al%A_Index%=
_WORD=
InputBox,_WORD,WARNING!! Check Insert KEY,Make Sure Insert IS OFF`nThis only works with a FIXED WIDTH FONT like Lucida Console`nSystem Or Any NON Proportional Font Work Best`nI Use Lucida Console in my Editor`n`nType the word(s),,,Center
If ErrorLevel
Return
StringSplit,_letter,_WORD,,
Loop %_letter0%
{
lt:=_letter%A_Index%
Num := (Asc(lt)-32)*8+1
wd :=(Asc(lt)-32)+1
If lt=%A_Space%
Num :=0
Loop 8
{
StringMid,dw,WW1,%wd%,1
dw++
If lt=%A_Space%
StringMid,line,AA%A_Index%,%Num%,%dw%
If lt<>%A_Space%
StringMid,line,AA%A_Index%,%Num%,%dw%
line%A_Index%=%line%
}
If dw = 8
_B=--------
If dw = 7
_B=-------
If dw = 6
_B=------
If dw = 5
_B=-----
If dw = 4
_B=----
If dw = 3
_B=---
If dw = 2
_B=--
If dw = 1
_B=-
btop .=_B
al1 .= line1
al2 .= line2
al3 .= line3
al4 .= line4
al5 .= line5
al6 .= line6
al7 .= line7
al8 .= line8
}
ClipBoard=`;%btop%`n`;%al1%`;`n`;%al2%`;`n`;%al3%`;`n`;%al4%`;`n`;%al5%`;`n`;%al6%`;`n`;%al7%`;`n`;%al8%`n
WinActivate, %_title%
SendInput,{HOME}{HOME}%ClipBoard%
SendEvent,{HOME}{HOME}`;tag{Enter}
SendEvent,{HOME}{HOME}`;%_WORD%{Enter}
SetBatchLines,%Normal%
Sleep 250
Gosub getprog
Return
;-------------------------------
; @@@@ @@ @@@@@@ @@@@ ;
; @@ @@ @@@@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@@ ;
;@@ @@ @@ @@@@@ @@@ ;
;@@ @@@@@@ @@ @@@ ;
; @@ @@ @@ @@ @@ @@ @@ ;
; @@@@ @@ @@ @@@@ @@@@ ;
;
;tag
;CAPS
;StartSub Caps ##################################################
caps:
Return
;StartSub Exit ##################################################
exit:
;StartSub Getprog ##################################################
;tag
getprog:
winactivate newtitle
WinGetActiveTitle,_title
getprog1:
;Msgbox % _title
If _title not Contains.ahk
Return
If _title Contains Crimson Editor
{
Filename := SubStr(_title, 19)
stringreplace,Filename,Filename,]
clipbak := ClipboardAll
Clipboard=
WinActivate, %_title%
Send ^s
goto read
}
If _title Contains,Notepad2
{
StringTrimRight,Filename,_title,11
stringreplace,Filename,Filename,`*
clipbak := ClipboardAll
Clipboard=
WinActivate, %_title%
Send ^s
goto read
}
If _title Contains,Notepad++
{
StringTrimRight,Filename,_title,12
stringreplace,Filename,Filename,`*
clipbak := ClipboardAll
Clipboard=
WinActivate, %_title%
Send ^s
goto read
}
read:
ifnotexist,%Filename%
MsgBox %Filename%
sleep 100
FileRead, filevar, %Filename%
Clipboard := filevar
t=0
LV_Delete()
Sleep 100 ;make this variable bigger if not showing tags in list
Loop , Parse, Clipboard ,`n,`r
{
If t=1
{
StringUpper,namee,A_LoopField
If not A_LoopField
Continue
StringReplace,namee,namee,`;,,
LV_Add(" ",namee)
t=0
Continue
}
if allsubs
{
StringRight,hunt,A_LoopField ,2
if hunt=::
continue
StringRight,hunt,A_LoopField ,1
}
else
StringLeft,hunt,A_LoopField ,4
if allsubs
{
If hunt Contains:
{
If A_LoopField Contains`,,
continue
; If A_LoopField Contains,%A_Space%,
; continue
If A_LoopField Contains";",
continue
StringUpper,namee,A_LoopField
StringReplace,namee,namee,`;,,
StringReplace,namee,namee,%A_Tab%,,all
LV_Add(" ",namee)
Continue
}
}
else
If hunt Contains;tag
{
t=1
Continue
}
}
LV_ModifyCol(1,"Sort")
LV_Add(" ","-------------------")
LV_Add(" ","-------------------")
LV_Add(" ","ALT+T Tag")
LV_Add(" ","CTRL+ALT+B Bignote")
if not allsubs
LV_Add(" ","Show All Subs")
else
LV_Add(" ","Show Tags only")
LV_Add(" ","Reload TAGS")
WinActivate, %_title%
Clipboard =
Clipboard := clipbak
Return
;----------------------------------------------------------------------------------------
; @@@@ @ @@ ;
; @@ @@ @@ ;
;@@ @@@@ @@@@@ @@ @@ @@@ @@@@@ @@ @@@ @@@@ @@ @@@ @@@@ @@ @@ @@@@@ ;
;@@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ @@ ;
;@@ @@@ @@@@@@ @@ @@@@@@@ @@ @@ @@ @@ @@ @@@@@ @@ @@ @@@@@ @@@@@@@ @@@@ ;
; @@ @@ @@ @@ @ @@@ @@@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @ @@ @@ ;
; @@@@@ @@@@ @@ @@ @@ @@@@ @@ @@ @@ @@@ @@ @@@@ @@@ @@ @@ @@ @@@@@ ;
;
;tag
;Getwinparams
;StartSub Getwinparams ##################################################
getwinparams:
detecthiddenwindows,on
Gui, 16:+LastFound +ToolWindow +Border +Resize
Gui, 16:font, s%fontsize%, Lucida Console
Gui, 16:Add, ListView,r1,16| | | | | | | | |
Gui, 16:Add, Button, w1 h1 Hidden Default, OK
Gui,16:show,hide,one
Sleep 100
WinGetPos,GX,GY,GW,GH,one
Gui, 17:+LastFound +ToolWindow +Border +Resize
Gui, 17:font, s%fontsize%, Lucida Console
Gui, 17:Add, ListView,r2,17| | | | | | | | |
Gui, 17:Add, Button, w1 h1 Hidden Default, OK
Gui,17:show,hide,two
Sleep 100
WinGetPos,GX,GY,GW,2GH,two
_rowheight:=(2GH-GH)
_winheightwaste:=(GH-_rowheight)
Gui,16:Destroy
Gui,17:Destroy
Return
;StartSub Guiclose ##################################################
GuiClose:
ExitApp
Return
;StartSub Hotkeys ##################################################
hotkeys:
!t::
Send {home}
sendRaw ``n;tag`n
sleep 333
Gosub getprog1
Return
!f12::gosub getprog
!^esc::exitapp
!^b::Gosub BigNotes
!^m::SendRaw ControlSetText,,message,Status
Return
;StartSub Ok ##################################################
;----------------
; @@@ @@@ @@ ;
; @@ @@ @@ @@ ;
;@@ @@ @@ @@ ;
;@@ @@ @@@@ ;
;@@ @@ @@ @@ ;
; @@ @@ @@ @@ ;
; @@@ @@@ @@ ;
;
;tag
OK:
If A_GuiEvent=Normal
{
ControlFocus , SysListView321, subscript
LV_GetText(rowtext,A_EventInfo)
If rowtext=-------------------
Return
If rowtext contains Show All Subs,Show Tags Only
{
if allsubs
allsubs=
else
allsubs=1
WinActivate, %_title%
Gosub getprog1
Return
}
If rowtext=Reload TAGS
{
WinActivate, %_title%
Gosub getprog1
Return
}
If rowtext=CTRL+ALT+B Bignote
{
WinActivate,%_title%
Gosub bignotes
Return
}
If rowtext=ALT+T Tag
{
WinActivate,%_title%
send {home}
sendRaw ``n;tag`n
Return
}
WinActivate,%_title%
;send ^{home}
Send ^f%rowtext%{Enter}
sleep 50
Send {ESC}
; Send {home}{ESC}{down}{home}
Send {Shift up}{Ctrl Up}{Alt Up}{Click up} ;ensure all keys back to neutral standing after job
WinActivate,%_title%
}
;Listvars
Return
;StartSub Onchange ##################################################
;tag
onchange:
If GetKeyState("CapsLock","T")
{
SoundBeep, 990,30
SoundBeep, 550,30
SoundBeep, 130,30
}
WinGetActiveTitle, newtitle1
If newtitle1 ContainsSubscript/Bignote
Return
WinGetActiveTitle, newtitle
If newtitle not Contains,Crimson Editor,Notepad++,Notepad2
Return
If newtitle = *%_title%
{
_title:=newtitle
Return
}
If newtitle != %_title%
Gosub getprog
Return
;StartSub Quit ##################################################
;tag
quit:
ExitApp
Return
;StartSub Setup ##################################################
setup:
MsgBox setup routine here (FUTURE EDITION)
Return
;StartSub Traymenu ##################################################
;tag
traymenu:
; set tray tip
Menu, tray, tip, %programfullname%
; disable standard menu items
Menu, tray, add, &about, about
; separator
Menu, tray, add
; show setup message
Menu, tray, add, &setup, setup
; separator
Menu, tray, add
; terminate script
Menu, tray, add, &quit, quit
Return
|
Use this Code in your editor to try it out, the ;tag's are already in the Code.
This picture shows the Gui on the Left of Screen and one of the Editors it works with.
Double clicking any item in the list goes straight to the sub in your editor.

Last edited by Trubbleguy on Sun Jan 04, 2009 11:07 pm; edited 6 times in total |
|
| Back to top |
|
 |
Trubbleguy
Joined: 20 Jan 2007 Posts: 96 Location: Melbourne
|
Posted: Sun Sep 23, 2007 10:24 am Post subject: Updated version of Subscript. |
|
|
Just re-posted it, looks like some "HARD" spaces in the font got lost, could be from pasting here, ill check and if its due to cut and paste, ill store the whole file on my server for download
http://www.trubbleguy.com/subscript.zip
| Code: |
;--------------------------------------------------------------------------------------------
; @@@@ @@@ @@ @ @@ @@ @@@@ @@@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@@ @@ @@ @@ @@@@@ @@@@ @@ @@@ @@@ @@ @@@ @@@@@ @@ @@ @@ @@ @@ ;
; @@@ @@ @@ @@@@@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@@@ ;
; @@@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@ @ @@@@ @@ @@ @@ @@ ;
; @@@@ @@@ @@ @@ @@@ @@@@@ @@@@ @@@@ @@@@ @@ @@ @@ @@@@@@ @@ @@@ ;
;---------------------------------------------------@@@--------------------------------------;
;With BigNotes...
;CTRL+ALT+B for placing a bignote
;use ;tag as the key to jumping to a sub ALT+T will insert one wherever you need it
;whatever is on the next line after ;tag is displayed in the subscript window
; language: english
; platform: win9x/nt
; author: t. gowshall <trubbleguy@optusnet.com.au>
#singleinstance force
#WinActivateForce
#persistent
#Include Anchor.ahk
fontsize=7.5
AutoTrim, Off
normal:=A_BatchLines
#noenv
onexit, quit
sendmode input
WinGet, _pid,PID,Crimson Editor
;Dock_HostID := WinExist("ahk_pid " . _pid)
wingetactivetitle,_title
programname = subscript ; debug: to do
programversion = v1.001 ; debug: to do
programfullname = %programname% %programversion%
programauthor = trubbleguy ; debug: to do
inifilename=none
guinum=1
gosub getwinparams
SetTimer, onchange,500
settitlematchmode,2
_ini=%a_scriptdir%\%inifilename%.ini
stringcasesense,off
sysget, mwa, monitorworkarea,1
_y := A_ScreenHeight
_l := (_y-_winheightwaste-_rowheight)/_rowheight
gosub traymenu
;---------------------
; @@@@ @@ ;
; @@ @@ ;
;@@ @@ @@ @@@ ;
;@@ @@ @@ @@ ;
;@@ @@@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ ;
; @@@@@ @@@ @@ @@@@ ;
;---------------------;
;tag
;Gui:
_w=160
_w1:=(_w-5)
Gui, Margin,2,2
Gui +LastFound +ToolWindow +Border +Resize
gui, font, s%fontsize%, Lucida Console
Gui, add,listview,vlist1 x0 y0 w%_w1% r%_l% gOK AltSubmit Default,Subs
DllCall("QueryPerformanceFrequency", "Int64P", freq)
gui, show,x1 y1,Subscript
Gosub getprog
WinActivate,%_title%
;--------------------------------------------------------
;@@ @@ @ @@@ ;
;@@ @@ @@ @@ ;
;@@ @@ @@@@ @@@@@ @@ @@ @@@@ @@ @@ @@@@@ ;
;@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@@@ @@@@@@ @@ @@ @@@@ ;
;@@ @@ @@ @@ @@ @ @@ @@ @@ @@@@@ @@ ;
;@@ @@ @@@@ @@ @@@ @@ @@@@ @@ @@@@@ ;
;-----------------------------------------@@@@-----------;
;tag
hotkeys:
!t::sendRaw `;###########################################################################################`n;tag`n
!f12::gosub getprog
!^esc::exitapp
!^b::Gosub BigNotes
return
;----------------------------------------------
; @@ @@@ ;
; @@@@ @@ ;
;@@ @@ @@@@@ @@@@ @@ @@ @@@@ @@ @@@ ;
;@@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@@ @@ ;
;@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@@@ @@@ @@ @@@@ @@@@ ;
;----------------------------------------------;
;tag
;Anchor:
GuiSize:
DllCall("QueryPerformanceCounter", "Int64P", t0)
Anchor("list1", "w h")
GuiWidth := A_GuiWidth
DllCall("QueryPerformanceCounter", "Int64P", t1)
Return
;----------------------------------------
; @@ @@@ @ ;
; @@@@ @@ @@ ;
;@@ @@ @@ @@@@ @@ @@ @@@@@ ;
;@@ @@ @@@@@ @@ @@ @@ @@ @@ ;
;@@@@@@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @ ;
;@@ @@ @@ @@@ @@@@ @@@ @@ @@ ;
;----------------------------------------;
;tag
about:
msgbox, 64, %programfullname%,
( ltrim
%programfullname%
%a_space%by %programauthor%
subscript jump to subs
utility
http://trubbleguy.com
use [alt]+[esc] to terminate the program.
)
return
;------------------------------------
; @@@@ @ ;
;@@ @@ @@ ;
;@@@ @@@@ @@@@@ @@ @@ @@ @@@ ;
; @@@ @@ @@ @@ @@ @@ @@ @@ ;
; @@@ @@@@@@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @ @@ @@ @@@@@ ;
; @@@@ @@@@ @@ @@@ @@ @@ ;
;----------------------------@@@-----;
;tag
;Setup:
setup:
msgbox setup routine here
return
;-----------------------------------------------------------------------------------
; @@@@ @@ @@@ @@@ ;
; @@ @@ @@ @@ @@ @@ ;
;@@ @@@@ @@ @@@ @@@@@ @@ @@@@ @@@@ @@ @@ @@ @@ @@@@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@@@@ @@ @@ @@@@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
; @@@@ @@@ @@ @@ @@@@@ @@@@@@ @@@@ @@@@ @@@ @@ @@@ @@ @@ ;
;----------------@@@----------------------------------------------------------------;
;tag
;Caps Lock On:
caps:
return
;---------------------------------------------------------------
;@@@@@@ @@ @@ ;
; @@ @@@ @@@ ;
; @@ @@ @@@ @@@@ @@ @@ @@@@@@@ @@@@ @@@@@ @@ @@ ;
; @@ @@@ @@ @@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@@@@ @@ @@ @@ @ @@ @@@@@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@@@ @@@ @@ @@ @@ @@ @@@@ @@ @@ @@@ @@ ;
;------------------------@@@@-----------------------------------;
;tag
;Tray Menu:
traymenu:
; set tray tip
menu, tray, tip, %programfullname%
; disable standard menu items
menu, tray, add, &about, about
; separator
menu, tray, add
; show setup message
menu, tray, add, &setup, setup
; separator
menu, tray, add
; terminate script
menu, tray, add, &quit, quit
return
;------------------------------------------------------
; @@@@@@ @@ @ @@ ;
; @@ @@ @@@@ ;
; @@ @@ @@ @@@ @@@@@ @@ @@ @@ @@@ @@ @@@ ;
; @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@@ @@ @@ @@@@@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @ @@ @@ @@@@@ @@@@@ ;
; @@@@@@ @@ @@ @@@@ @@ @@ @@ @@ @@ ;
;--------------------------------------@@@-----@@@-----;
;tag
;Exit App:
exit:
quit:
exitapp
return
;----------------
; @@@ @@@ @@ ;
; @@ @@ @@ @@ ;
;@@ @@ @@ @@ ;
;@@ @@ @@@@ ;
;@@ @@ @@ @@ ;
; @@ @@ @@ @@ ;
; @@@ @@@ @@ ;
;----------------;
;tag
;DoubleClick:
;tag
;OK:
OK:
if A_GuiEvent=Normal
{
ControlFocus , SysListView321, subscript
lv_gettext(rowtext,A_EventInfo)
if rowtext=@RELOAD TAGS
{
winactivate,%_title%
send !fs
sleep 660
Gosub getprog
return
}
if rowtext=@TOP
{
winactivate,%_title%
send ^{home}
return
}
if rowtext=~BOTTOM
{
winactivate,%_title%
send ^{end}
return
}
winactivate,%_title%
;send ^{home}
send ^f%rowtext%{enter}
send {home}{ESC}{down}
send {shift up}{Ctrl Up}{Alt Up}{Click up}
}
;Listvars
return
;-----------------------------------------------------
; @@@@ @ @ ;
; @@ @@ @@ @@ ;
;@@ @@@@ @@@@@ @@@@@ @@@@ @@@ @@ @@@@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@@ @@@@@@ @@ @@ @@@@@ @@ @@ @@@@ ;
; @@ @@ @@ @@ @ @@ @ @@ @@ @@@@@ @@ ;
; @@@@@ @@@@ @@ @@ @@@ @@ @@ @@@@@ ;
;---------------------------------------@@@@----------;
;tag
;Getprog:
getprog:
wingetactivetitle,_title
If _title not contains.ahk
Return
clipbak := ClipboardAll
Clipboard=
WinActivate, %_title%
leftb := InStr(_title,"[",1)+1
rightb := InStr(_title,"]",1)
_titlelen :=(rightb-leftb)
_file := SubStr(_title,leftb,_titlelen)
t=0
LV_Delete()
lv_add(" ","@RELOAD TAGS")
lv_add(" ","@TOP")
lv_add(" ","~BOTTOM")
Loop, Read, %_file%
;loop , parse, clipboard, `n, `r
{
if t=1
{
stringupper,namee,A_LoopReadLine
StringReplace,namee,namee,`;,,
lv_add(" ",namee)
t=0
continue
}
stringleft,hunt,A_LoopReadLine ,4
if hunt contains;tag
{
t=1
continue
}
}
lv_modifycol(1,"sort")
WinActivate, %_title%
;send {home}
Clipboard := clipbak
return
;-----------------------------------------------------------
;@@@@@@ @@ @@ @@ @ ;
; @@ @@ @@@ @@ @@ ;
; @@ @@ @@@ @@@ @@ @@@@ @@ @@@@ @@@@@ @@@@ @@@@@ ;
; @@@@@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@@@@@ @@@@ ;
; @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @ @@ @@ ;
;@@@@@@ @@@@ @@ @@ @@ @@@@ @@ @@@@ @@@@@ ;
;--------------@@@@-----------------------------------------;
;tag
;tag
;BigNote:
BigNotes:
;wingetactivetitle,_title1
SetBatchlines,0
SetKeyDelay,1
btop=
loop 8
al%A_Index%=
;--------------------------------------------------------------------
;@@ @@ @@ @@@@@@ @@ @@ @@@@ @@ @@ @@@@ @@ @@ @@ ;
;@@ @@ @@@@ @@ @@ @@@ @@ @@ @@@ @@ @@ @@ @@@@ @@@@ @@@@ ;
;@@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@ @@@@ @@@@ ;
;@@ @ @@ @@ @@ @@@@@ @@ @@@@ @@ @@ @@@@ @@ @@@@ @@@@ @@@@ ;
;@@@@@@@ @@@@@@ @@ @@ @@ @@@ @@ @@ @@@ @@ @@@ @@ @@ @@ ;
;@@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@@ @@ @@ @@ @@@@ @@ @@ @@@@@ @@ @@ @@ ;
;--------------------------------------------------------------------;
;tag
;Warning:
;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 letter is above its width
;;;; !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
WW1=24476773447736277666766666445666777777776477777777766667767575776777766774674766777657677666267
AA1= @@ @ @ @@ @@ @@ @@@ @ @@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@ @@@ @@@@@@ @@@ @@@@@@ @@@@ @@@@ @@ @@ @@@@ @@@@@ @@ @@@@@@ @@@@ @@@@@ @@@@@@ @@@@@@ @@@@ @@ @@ @@@@ @@@@ @@@ @@ @@ @@ @@ @@ @@ @@@ @@@@@@ @@@@ @@@@@@ @@@@ @@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@ @@@@ @@ @@@@ @ @@ @@@ @@@ @@@ @@@ @@ @@ @@@ @@@ @ @@@ @@ @@@ @@@ @@
AA2= @@@@ @ @ @@ @@ @@@@@ @ @ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@
AA3= @@@@ @@@@@@@ @@ @@@ @ @@@ @@ @@ @@ @@@@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @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@@@ @@ @@ @@ @@ @@ @@@@@@@ @@@ @@ @@ @@ @@ @@ @@
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 ~/
_WORD=
InputBox,_WORD,WARNING!! CHECK INSERT KEY,Make Sure INSERT IS OFF`nThis only works with a FIXED WIDTH FONT like Lucida Console`nSystem Or Any NON Proportional Font Work Best`nI Use Lucida Console in my Editor`n`nType the word(s),,,center
If ErrorLevel
Return
StringSplit,_letter,_WORD,,
Loop %_letter0%
{
lt:=_letter%A_Index%
Num := (Asc(lt)-32)*8+1
wd :=(Asc(lt)-32)+1
if lt=%A_Space%
Num :=0
Loop 8
{
StringMid,dw,WW1,%wd%,1
dw++
if lt=%A_Space%
StringMid,line,AA%A_Index%,%Num%,%dw%
if lt<>%A_Space%
StringMid,line,AA%A_Index%,%Num%,%dw%
line%A_Index%=%line%
}
IF dw = 8
_B=--------
IF dw = 7
_B=-------
IF dw = 6
_B=------
IF dw = 5
_B=-----
IF dw = 4
_B=----
IF dw = 3
_B=---
IF dw = 2
_B=--
IF dw = 1
_B=-
btop .=_B
al1 .= line1
al2 .= line2
al3 .= line3
al4 .= line4
al5 .= line5
al6 .= line6
al7 .= line7
al8 .= line8
}
;tag
;SendEvent Bignote:
Winactivate, %_title%
SendEvent,{HOME}{HOME}`;%btop%{ENTER}
SendEvent,{HOME}{HOME}`;%al1%`;{ENTER}
SendEvent,{HOME}{HOME}`;%al2%`;{ENTER}
SendEvent,{HOME}{HOME}`;%al3%`;{ENTER}
SendEvent,{HOME}{HOME}`;%al4%`;{ENTER}
SendEvent,{HOME}{HOME}`;%al5%`;{ENTER}
SendEvent,{HOME}{HOME}`;%al6%`;{ENTER}
SendEvent,{HOME}{HOME}`;%al7%`;{ENTER}
SendEvent,{HOME}{HOME}`;%al8%`;{ENTER}
SendEvent,{HOME}{HOME}`;tag{ENTER}
SendEvent,{HOME}{HOME}`;%_WORD%:{ENTER}
SetBatchlines,%normal%
Sleep 250
LV_Delete()
Send !f
Send s
_title=nuttin
gosub onchange
;StringUpper,_WORD,_WORD
;_WORD=%_WORD%`:
;lv_add(" ",_WORD)
;lv_modifycol(1,"sort")
Return
;------------------------------------------------------------
; @@@@ @@@ ;
; @@ @@ @@ ;
; @@@@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@ @@ @@@@ ;
;@@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@@@@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@ ;
; @@@@ @@ @@ @@@@ @@@ @@ @@@ @@ @@ @@ @@ @@@@ ;
;----------------------------------------------@@@@----------;
;tag
;onChange:
onchange:
If GetKeyState("CapsLock","T")
{
soundbeep, 990,30
soundbeep, 550,30
soundbeep, 130,30
}
Process,Exist,%_pid%
If Errorlevel=0
Exitapp
WinGetActiveTitle, OutputVar
If OutputVar not containsCrimson Editor
Return
If OUtputVar<>%_title%
Gosub getprog
Return
getwinparams:
gui, 16:font, s%fontsize%, Lucida Console
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:font, s%fontsize%, Lucida Console
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
Return |
Work in Progress, but does work really great with Crimson Editor, havent tried any other editors yet,
Looks for the [] around ahk name in titlebar on any editor and uses whatever is between them to determine if the window has changed to another ahk or sub.
Last edited by Trubbleguy on Wed Sep 26, 2007 1:45 pm; edited 2 times in total |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Sun Sep 23, 2007 3:41 pm Post subject: |
|
|
Nice script! I wonder if a simpler approach could also be useful:
A hotkey copies the word under the caret to the clipboard, jumps to the beginning of the file and initiates a search for the clipboard content, in the beginning of lines.
(To easily distinguish between function definitions and calls, always write the definition at the leftmost position of a line, and indent calls.)
Of course, it is not as fancy: e.g. there is no tag list, but requires no explicit ;tags. |
|
| Back to top |
|
 |
Trubbleguy
Joined: 20 Jan 2007 Posts: 96 Location: Melbourne
|
Posted: Mon Sep 24, 2007 2:39 pm Post subject: it was gonna be like that, but!!!! |
|
|
i did think that way at the start but had to make a file with all the sub headers like
open:
getdata:
renamefile:
i had to create a seperate file for all the tags and then search for any line in the ahk file that matched the tag but ended the line with :
i did work that out, but when it came to changing scripts i was working on, it had to have the file changed to suit the new script, so a simple ;tag set in the ahk was easier and does it all on the fly.
have you tried it with any other editor? i only have Crimson and Notepad |
|
| Back to top |
|
 |
Zoulou Guest
|
Posted: Wed Sep 26, 2007 4:03 am Post subject: |
|
|
I tried with : | Quote: | | ;$%&'()*?-./01:;<=>?@AB[\]àb|~: |
and get :
| Code: | ;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; @ @@ @@ @@ @@@ @ @@@ @@ @@ @ @@@@@ @@ @@@@ @@ @@ @@@@ @@@@@ @@ @@@@@@ @@@@ @@ @@@@ @ @@ @@ @ @@ @@@ @@;
;@ @ @@ @ @@@@@ @ @ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@@ @@@;
; @@@@@@@ @@@ @ @@@ @@ @@ @@ @@@ @@ @@ @@@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@@@ @@ @;
; @@ @ @@@@ @ @@@ @@ @@ @@ @@@@@@@@@@@@@ @@@@ @@@ @@@@ @@ @@@ @@ @@ @@ @@ @@@@@@ @@ @@@@@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@ @@ ;
; @@@@@ @@ @ @@@ @ @@@ @@ @@ @@@@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @ @@@@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@;
;@@@@ @ @ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@@@@ @@ @ @ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @ @@ @@ ;
; @@ @@ @@ @ @@@ @@@ @@ @@ @ @@ @ @@@@@ @@@@@@ @@@@@@ @@ @@ @@ @@ @@@@ @ @@ @@@@@@ @@@@ @ @@@@@ @@@ @@ @ @@@ @@@@ @ @@;
;-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------@@@@@@@-------------------------------------------------;
;tag
;$%&'()*?-./01:;<=>?@AB[\]àb|~: |
What's wrong ?
(Same result in Notepad and PSPad)
Thanks. |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Wed Sep 26, 2007 6:23 am Post subject: |
|
|
check your autoTrim setting. I had some trouble with his code until I got the right settings figured out. _________________
(Common Answers) |
|
| Back to top |
|
 |
Trubbleguy
Joined: 20 Jan 2007 Posts: 96 Location: Melbourne
|
Posted: Wed Sep 26, 2007 1:41 pm Post subject: |
|
|
i tested the script again here, worked fine, copied to another pc and worked fine, i did find some missing "hard" spaces and replaced them again, the font is HARD spaced to try and overcome proportional fonts a little better, download the ahk from
http://www.trubbleguy.com/subscript.zip
if the code doesnt copy |
|
| Back to top |
|
 |
Trubbleguy
Joined: 20 Jan 2007 Posts: 96 Location: Melbourne
|
Posted: Sat Sep 29, 2007 5:40 am Post subject: |
|
|
i tested a version that looked for : at the end of a line and it did work beautifully but every damn sub listed, making subscript visually overloaded with subs.
thats one more handy thing in the way subscript shows SUBS in your ahk.
When you have a SUB working Perfectly and no longer needs changing or modding, simply delete the ;tag line and it stops listing in subscript.
I can have 30-40 subs in my ahk but only list 12-15 of the subs i am continually looking at or modding.
If anybody is interested in a version that also lists by subname: i will mod this one to do "subname:" or ";tag".
might be handy being able to switch to subname: if you need a non listed sub if in ;tag mode
i have to admit i cant program without subscript now, im so used to jumping to a sub in a split second without scrolling, it makes my programming time waste nearly nil.
Enguneer,
any chance you can help figure out why sometimes the single click fails on subscripts syslistview321 panel and it fails to jump to the required sub in the editor, is it something to do with focus?
Thanks. |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 561 Location: Galil, Israel
|
Posted: Mon Oct 01, 2007 2:34 am Post subject: |
|
|
great idea!!!
have some suggestions, maybe worthwhile, maybe not....
see if this gives any help (?)
for users of SciTE.... might really like this.... (ps: left vs. right side of function name click makes difference, as does placement of box over or outside of SciTE window, anyhows...)
have just thrown together... but *wow* trubbleguy what a great idea!!!! it works great!!!!
| Code: |
#NoEnv
;#MaxMem 128
settimer, test4redo,300
Gui +LastFound
WinSet, Transparent, 231
WinSet, AlwaysOnTop, On
gui, font, s10 CBlack norm,
Gui, Add, ListView, BackgroundFFFFF9 grid AltSubmit x1 r40 w150 gGotoit, Function |ID %a_space%
ctr = Scintilla1
win = ahk_class SciTEWindow
find_this = Universal
redolist:
WinGetTitle, OTitled, %win%
controlgettext,search_this, Scintilla1,ahk_class SciTEWindow
;if !shifted
if RegExMatchG(search_this,"(?<=\n|^)\s*"
. "([\w#?@$\[\]]+)"
. "\("
. "(?:[^"")]|""[^""]*"")*"
. "\)"
. "[\s\n]*\{","$","`n") {
loop % $0
LV_Add("", $%a_index%_1,a_index)
}
LV_ModifyCol(1,"310 ")
LV_ModifyCol(2,"30 Integer Sort")
gui show, w150
gotoit() {
global
gotoit:
if a_GuiEvent = Normal
{
LV_GetText(find_this, A_EventInfo,1)
gosub, doit
}
return
}
return
doit:
controlgettext,search_this, Scintilla1,ahk_class SciTEWindow
from := regexmatch(search_this,"(?<P>(?<=\n|^)\s*)(?<D>"
. regexQ(find_this)
. "\("
. "(?:[^"")]|""[^""]*"")*"
. "\))"
. "[\s\n]*\{",SKI) + strlen(skip) - 1
to := from + strlen(skid) ; + strlen(find_this) + 1
SendMessage 0xB1, from, to , %Ctr%, %Win%
controlsend, %Ctr%, +{right}+{left}, %Win%
MouseGetPos,OVX
if OVX < 60
winactivate %win%
;msgbox
return
#+F9::
LV_Delete()
gosub redolist
return
test4redo:
WinGetTitle, Titled, %win%
if (Titled <> OTitled)
gosub #+F9
return
guiclose:
exitapp
RegExMatchG(haystack,needle,var = "$",spacer = "", position = 1) { ; returns # matches ; var1_<namedmatches>,var2_<namematches>, etc ; var = total match var0 = count
global
local tmps, count
; local save$ := %var%
loop
if !(position := regexmatch(haystack, needle
, %var%%a_index%_
, position)
+ strlen(%var%%a_index%_) )
break
else {
tmps .= %var%%a_index%_ . spacer
++count
}
;%var% := save$
%var% := tmps
%var%0 := count
return count
}
regexQ(x) {
return "\Q" . x . "\E"
} |
edit: "([\w#?@$\[\]]+)" needed as \w not do the job! & wow, this idea was great... am using this now for many stuffs... and... its nICE!! _________________ Joyce Jamce |
|
| Back to top |
|
 |
Trubbleguy
Joined: 20 Jan 2007 Posts: 96 Location: Melbourne
|
Posted: Wed Oct 03, 2007 8:41 am Post subject: |
|
|
as long as it saves a lot of time NOT scrolling it works for me
as i said before, i now cannot live without it as its so handy to jump to a script sub.
btw, your coding is very neat and ten times deeper than mine, i have some basics but i do learn somthing new every day.
i loved the neat background and copied into my personal version. |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 561 Location: Galil, Israel
|
Posted: Wed Oct 03, 2007 3:37 pm Post subject: |
|
|
@Trubbleguy,
thanks... your tool is fantastic!
posted just in case might want to try out getting the control text directly (ex. use windows spy for control id) and maybe even using my RegExMatchG() Global match to parse for functions etc.. [more on it in another thread.. can forumsearch? for RegExMatchG ?]
but anyhow... am *really* enjoying using the tool.... the tool is super hepful! _________________ Joyce Jamce |
|
| Back to top |
|
 |
Trubbleguy
Joined: 20 Jan 2007 Posts: 96 Location: Melbourne
|
Posted: Wed Nov 21, 2007 10:46 am Post subject: Updated again to V3.0 |
|
|
Updated today 11/21/2007
Should now work with any editor that has .ahk in the Name at the top of the editor.
needs anchor to work correctly in resize but is included in the zip file in the first post. |
|
| Back to top |
|
 |
TWmailrec
Joined: 03 Jul 2007 Posts: 9
|
Posted: Thu Feb 21, 2008 12:41 am Post subject: subscript |
|
|
Fantastic program!
However i found it didnt cope with my editor/system, and made some MODS. Now works much faster, although since dont need BIG NOTES
I removed section from program. - but added various options:
Display "Labels:" in .ahk, or ":Labels" in .BAT, .txt
Select for Labels or ;Tag
Unsorted listview or select SORTED list
... other options detailed in Readme.txt
I will try to upload a zip to this site |
|
| Back to top |
|
 |
TWmailrec
Joined: 03 Jul 2007 Posts: 9
|
Posted: Thu Feb 21, 2008 3:41 pm Post subject: |
|
|
Since i cant upload zip, new code for subscript is
| 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
}
cliperror := 0
SortLst := 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= @@@@ @@@@@@@ @@ @@@ @ @@@ @@ @@ @@ @@@@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@ @@@@ @@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@@ @@ @@@@@@@ @@@ @@ @@ @@ @@ @@ @@
;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
SortLst := 0
Else
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
;###########################################################################################
-------------------------------------------------------------------------------
In the subscrip directory, subscript.ini is:
[Settings]
InitConfigini=0
Persist_fast=2
labelscout=1
fontsize=10
ScreenHeight=600
rowheight=17
winheightwaste=70
-------------------------------------------------------------------------------
crude Readme.txt file:
:Subscript Help:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Subscript creates a Table to lists "Labels" (or ";Tag" marks, according to settings)
contained in an "ahk" script.
If an Entry within the table is selected, the program will use the Editor (Active App) to
locate the Label (or ";Tag").
Also operates on .BAT files or (for :Headings . . ) .txt,.txx files, where Labels have a
colon ":" at the start of line.
Original program from www.autohotkey.com:
language: english
platform: win9x/nt/xp
author: Trubbleguy <trubbleguy@trubbleguy.com>
November 21 2007
modified by TWmailrec, to make it work correctly and faster, and offer additional facs.
"BIGNOTE" removed.
:HotKeys
ŻŻŻŻŻŻŻŻ
!^esc: exitapp
F10: exitapp
^!f5: sendRaw ;###########################################################################################
;tag`n
+f5: display list of Labels/";Tags" for Selection
As Long as the Editor "Title" carries the current .AHK extension, should work on most editors.
Default: uses Label":" as the key to jump to a Label
from Setup: use ";tag" as the key to jump to a sub/routine
Ctrl+ALT+F5 will insert one whereever it is needed
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
:HotKeys programmed into Subscript.ahk, (.exe)
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
[Alt]+[Ctrl]+Esc OR F10: exit
[Alt]+[Ctrl]+F5: Write ";Tag" + Separator line
[Shift]+F5: Show list of Labels / ";Tags"
Click on item in List to jump to Subroutine Label/";Tag"
Selecting "SORT List ON/OFF" will toggle list-SORT ON or OFF
For .ahk files, Sub/r labels end with ":"
For .txt / .BAT files, Sub/r labels start with ":"
SetUp: Recheck Screen settings & select listing of "Labels" or ";Tag" marks
Install:
ŻŻŻŻŻŻŻŻ
UNZIP zip file to the directory from which the program will be run.
Included in zip is "Anchor.ahk" which is needed by the program.
With the use of a hotkey management program to provide a program-specific macro set,
program [Shift]+F5 (under Editor), to run Subscript.exe, or if Editor permits programmable
Tools, call program within the Editor.
INI File:
ŻŻŻŻŻŻŻŻŻ
[Settings]
InitConfigini=0 (Default=0), if =1: Adjust Table height for font & Screen Res.
Persist_fast=2 if =2 (Deflt) prog is Persistant (TSR), with fast mode- no rescan
if =1 prog is Persistant (TSR), with fast mode- but no SetTimer-(autoExit)
if =0 prog is NOT Persistant, always rescan Editor, Exit after "Find"
labelscout=1 if =1 (Deflt), Use Labels ":", if = 0 - use ";Tag"
fontsize=10 Set according to preference
ScreenHeight=600 set by program
rowheight=17 set by program
winheightwaste=70 set by program
;###########################################################################################
i cannot upload .ico file, which isnt important.
|
|
|
| Back to top |
|
 |
TWmailrec
Joined: 03 Jul 2007 Posts: 9
|
Posted: Thu Feb 21, 2008 3:51 pm Post subject: |
|
|
whoops!
I added subscript.ini, and readme.txt to code section!
Corrected below:
subscript.ahk:
| 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
}
cliperror := 0
SortLst := 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[\]^_`abcdefghijklmnopqrstuvw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 @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@@@@ @@@@@ @@ @@ @@ @ @@ @@ @@@@ @@@ @@@ @@ @@ @@@@@ @@ @ @@ @@ @@
;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
SortLst := 0
Else
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
;###########################################################################################
|
subscript.ini file I use:
| Code: | [Settings]
InitConfigini=0
Persist_fast=2
labelscout=1
fontsize=10
ScreenHeight=600
rowheight=17
winheightwaste=70
|
Primitive Readme.txt:
:Subscript Help:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Subscript creates a Table to lists "Labels" (or ";Tag" marks, according to settings)
contained in an "ahk" script.
If an Entry within the table is selected, the program will use the Editor (Active App) to
locate the Label (or ";Tag").
Also operates on .BAT files or (for :Headings . . ) .txt,.txx files, where Labels have a
colon ":" at the start of line.
Original program from www.autohotkey.com:
language: english
platform: win9x/nt/xp
author: Trubbleguy <trubbleguy@trubbleguy.com>
November 21 2007
modified by TWmailrec, to make it work correctly and faster, and offer additional facs.
"BIGNOTE" removed.
:HotKeys
ŻŻŻŻŻŻŻŻ
!^esc: exitapp
F10: exitapp
^!f5: sendRaw ;###########################################################################################
;tag`n
+f5: display list of Labels/";Tags" for Selection
As Long as the Editor "Title" carries the current .AHK extension, should work on most editors.
Default: uses Label":" as the key to jump to a Label
from Setup: use ";tag" as the key to jump to a sub/routine
Ctrl+ALT+F5 will insert one whereever it is needed
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
:HotKeys programmed into Subscript.ahk, (.exe)
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
[Alt]+[Ctrl]+Esc OR F10: exit
[Alt]+[Ctrl]+F5: Write ";Tag" + Separator line
[Shift]+F5: Show list of Labels / ";Tags"
Click on item in List to jump to Subroutine Label/";Tag"
Selecting "SORT List ON/OFF" will toggle list-SORT ON or OFF
For .ahk files, Sub/r labels end with ":"
For .txt / .BAT files, Sub/r labels start with ":"
SetUp: Recheck Screen settings & select listing of "Labels" or ";Tag" marks
Install:
ŻŻŻŻŻŻŻŻ
UNZIP zip file to the directory from which the program will be run.
Included in zip is "Anchor.ahk" which is needed by the program.
With the use of a hotkey management program to provide a program-specific macro set,
program [Shift]+F5 (under Editor), to run Subscript.exe, or if Editor permits programmable
Tools, call program within the Editor.
INI File:
ŻŻŻŻŻŻŻŻŻ
[Settings]
InitConfigini=0 (Default=0), if =1: Adjust Table height for font & Screen Res.
Persist_fast=2 if =2 (Deflt) prog is Persistant (TSR), with fast mode- no rescan
if =1 prog is Persistant (TSR), with fast mode- but no SetTimer-(autoExit)
if =0 prog is NOT Persistant, always rescan Editor, Exit after "Find"
labelscout=1 if =1 (Deflt), Use Labels ":", if = 0 - use ";Tag"
fontsize=10 Set according to preference
ScreenHeight=600 set by program
rowheight=17 set by program
winheightwaste=70 set by program
;########################################################################################### |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|