Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Finding the user settings directory

Advocate ,
Sep 18, 2013 Sep 18, 2013

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

TOPICS
Scripting
791
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Sep 18, 2013 Sep 18, 2013

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 gi

...
Translate
Advocate ,
Sep 18, 2013 Sep 18, 2013
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines