1 USING: editors io.files io.launcher kernel math.parser
2 namespaces sequences make io.directories.search
3 io.directories.search.windows ;
6 : textpad-path ( -- path )
7 \ textpad-path get-global [
8 "TextPad 5" t [ "TextPad.exe" tail? ] find-in-program-files
9 [ "TextPad.exe" ] unless*
12 : textpad ( file line -- )
14 textpad-path , [ , ] [ number>string "(" ",0)" surround , ] bi*
15 ] { } make run-detached drop ;
17 [ textpad ] edit-hook set-global