|
Prev: Changing the configuration of Headers in Treeview
Next: tk_messageBox - text entry won't select after using this
From: Barry Farinet on 22 Jun 2008 11:41 In my Tcl scripts, I often use GhostScript to convert PS to PDF format. The main platform for these programs is Windows XP. The problem is that each time I install a new version of GhostScript the running directory name is modified to reflect the version number. To partially solve the problem I put the GS path into a parameter file. Is there a way (maybe through registry keys) to automatically locate the active version of GhostScript? Thanks for yours ideas.
From: Ron Fox on 23 Jun 2008 08:40 You can always glob the program files\gs\ directory and choose the highest version number's bin subdirectory. RF Barry Farinet wrote: > In my Tcl scripts, I often use GhostScript to convert PS to PDF > format. The main platform for these programs is Windows XP. The > problem is that each time I install a new version of GhostScript the > running directory name is modified to reflect the version number. To > partially solve the problem I put the GS path into a parameter file. > Is there a way (maybe through registry keys) to automatically locate > the active version of GhostScript? > Thanks for yours ideas. -- Ron Fox NSCL Michigan State University East Lansing, MI 48824-1321
From: keithv on 23 Jun 2008 09:49 On Jun 22, 11:41 am, Barry Farinet <a...(a)clix.pt> wrote: > In my Tcl scripts, I often use GhostScript to convert PS to PDF > format. If GhostScript is the handler for .ps files, then you can use the following: package require registry set app [registry get {HKEY_CLASSES_ROOT\.ps} {}] set cmd [registry get HKEY_CLASSES_ROOT\\$app\\shell\\open\\command {}] Cmd will contain the command string needed to open a .ps file. You will probably have to parse the result to remove switches, etc. Keith
From: Barry Farinet on 24 Jun 2008 08:57
Thanks! That's the solution I was looking for Barry |