AutoHotkey: Start Notepad In Lister: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
mNo edit summary
(Added category AutoHotkey scripts)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Pressing F4 in TC Lister starts Notepad with the active document.
Pressing F4 in TC Lister starts Notepad with the active document.


; If you want to start an alternative editor instead, replace '''''notepad.exe''''' to match yours.
If you prefer an alternative utility, replace '''''notepad.exe''''' with the appropriate path.
   
   
  ~F4::
  #IfWinActive, ahk_class TLister
  IfWinActive, ahk_class TLister
F4::
  {
  editor = notepad.exe
  WinGetTitle, title
  WinGetTitle, title
  left := InStr(title, "[")+1
left := InStr(title, "[") + 1
  right := InStr(title, "]")-left
right := InStr(title, "]") - left
  StringMid, listerpath, title, left, right
StringMid, listerpath, title, left, right
  WinClose, ahk_class TLister
WinClose
  Run, notepad.exe %listerpath%
Run, %editor% "%listerpath%"
}
  Return
  Return




Back to [[AutoHotkey]]
Back to [[AutoHotkey]]
[[Category:AutoHotkey scripts|Start Notepad In Lister]]
[[de:AutoHotkey: Starte Notepad im Lister]]

Latest revision as of 22:53, 1 June 2008

Pressing F4 in TC Lister starts Notepad with the active document.

If you prefer an alternative utility, replace notepad.exe with the appropriate path.

#IfWinActive, ahk_class TLister
F4::
editor = notepad.exe
WinGetTitle, title
left := InStr(title, "[") + 1
right := InStr(title, "]") - left
StringMid, listerpath, title, left, right
WinClose
Run, %editor% "%listerpath%"
Return


Back to AutoHotkey