1 Reply Latest reply: Sep 18, 2013 6:57 AM by 4everJang RSS

    Finding the user settings directory

    4everJang Community Member

      Hi fellow scripters,

       

      I can easily find the user settings directory in FrameScript, via Session.UserSettingsDir, but there does not seem to be an equivalent in ExtendScript. I know that FrameMaker knows this directory as the application is using it all the time, and I can see that there is a Constants.UserSettingsDir in the FrameMaker Scripting Guide, but there is no reference to this constant anywhere else, nor is there anything in the FDK documentation.

       

      How do I read this value from an ExtendScript, does anybody know ?

       

      Thanks

       

      Jang

        • 1. Re: Finding the user settings directory
          4everJang Community Member

          OK, I found the answer myself.

           

          The property is available via app.GetProps ( ), which is what I expected in the first place. But the following code just gave an invalid object as result:

           

          var MyProps = app.GetProps ( ) ;

          var i = GetPropIndex ( MyProps, Constants.UserSettingsDir ) ;

          var TheProp = MyProps [ i ] ;

           

          It seems that the Constants.UserSettingsDir value is NOT defined in ExtendScript, or not correctly defined. Replacing it with the value 152 (which is listed in the Frame Scripting Guide) does give me access to the property:

           

          var MyProps = app.GetProps ( ) ;

          var i = GetPropIndex ( MyProps, 152 ) ;

          var TheProp = MyProps [ i ] ;

           

          Adobe, please get your documentation in order. It might also be useful to have a list of values translating to Constants.<Something>, so that we can at least track back from the numeric value in the Data Browser to a symbolic value to be used in the scripts.

           

          Ciao

           

          Jang