3 Replies Latest reply on Dec 17, 2015 11:58 AM by John Wilheim

    Set path to reference "current user"

    John Wilheim

      Is there a way to set a path in a script so it sets a path for the current user? I want to set the path for the User Dictionary, added.txt, to be C:\Users\(current username)\AppData\Roaming\Adobe\Linguistics\UserDictionaries\Adobe Custom Dictionary\en_us\added.txt. Doing this in a script would mean I would not have to change this in Edit --> Preferences --> Dictionary for every individual user.

        • 1. Re: Set path to reference "current user"
          Ronald63 Level 4



          May be this can help you ...


          /* A Folder object for the folder containing the user's application data.
          In Windows, the value of %USERDATA% (by default, C:\\Documents and Settings\\username\\Application Data) 
          In Mac OS, ~/Library/Application Support. */
          var _UserDataFolder = Folder.userData;
          • 2. Re: Set path to reference "current user"
            John Wilheim Level 1

            Thank you for replying, Ronald63.

            So, how can I set the path to the Added.txt file in the .jsx script?

            This section of code is in a .jsx script that we now run:


            //Dictionary preference panel


                composition = ComposeUsing.both;    // Hyphenatin Exceptions, Compose Using

                mergeUserDictionary = false;    // Merge User Dictionary into Document

                recomposeWhenChanged = true;    // Recompose All Stories When Modified



            I want to add an entry that would set the location of the UserDictionary to %appdata%\Adobe\Linguistics\UserDictionaries\Adobe Custom Dictionary\en_us\added.txt

            (%appdata% is the Windows system variable that equates to C:\Users\(current user)\AppData\Roaming)

            • 3. Re: Set path to reference "current user"
              John Wilheim Level 1

              Looks like it may not be possible to do this via scripting.

              I found a site on the web that lists every option for each preference in InDesign that can be set via scripting, and there is no entry in the Dictionary subsection for the path to the UserDictionary.