AnsweredAssumed Answered

Command Line FM Defined Variable

Question asked by wacole1213 on Jan 28, 2017
Latest reply on Jan 28, 2017 by wacole1213

i have an application that accesses an external file using SendEvent and the Windows 10 command line.  It looks like this;


SendEvent [ open document/application : "cmd.exe /C swriter.exe" & Quote ($appfile) ] [Bring application to foreground]


I have a Settings page for the application in which I would like to include a place for the user to change the bolded variable in the above FM script entry.  [To get this to work you have to change the Windows Environmental Variable path entry to include the path that the referenced .exe file is on.]  I thought that if I give that field a global name in the Settings layout and tried exchanging swriter.exe for that FM data field name that would do the trick.  Didn't work.  The failed experiment looked something like this:


SendEvent [ open document/application : "cmd.exe /C Settings::htmleditor " & Quote ($appfile) ] [Bring application to foreground]


[Oh, the Setting option is to allow the user to chose which HTML editor that they would like.  The ($appfile) argument relates to the application defined by the bolded filename; allowing that application to directly open the file defined by $appfile variable.]


I have a feeling that this is probably not possible, but maybe someone out there has some idea about how to solve this.


Gratefully,  Bill Cole