Wordpad - automatic path

release
Doug Coleman 2007-12-09 10:49:39 -06:00
parent ef70996128
commit 451f9b430f
1 changed files with 6 additions and 4 deletions

View File

@ -2,12 +2,14 @@ USING: editors hardware-info.windows io.launcher kernel
math.parser namespaces sequences windows.shell32 ;
IN: editors.wordpad
: wordpad-path ( -- path )
\ wordpad-path get [
program-files "\\Windows NT\\Accessories\\wordpad.exe" append
] unless* ;
: wordpad ( file line -- )
[
\ wordpad get-global % drop " " % "\"" % % "\"" %
wordpad-path % drop " " % "\"" % % "\"" %
] "" make run-detached ;
program-files "\\Windows NT\\Accessories\\wordpad.exe" append
\ wordpad set-global
[ wordpad ] edit-hook set-global