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

[AS] set Applescript-variable to a value from a text variable

Explorer ,
Apr 02, 2014 Apr 02, 2014

Hi.

I have a script that defines a text variable in the active document like this:

tell application "Adobe InDesign CS6"

          set myDoc to active document

          tell myDoc

                    try

                              set myOrdrenummerTxt to make new text variable with properties {name:"lowRes_DPI"}

                    end try

                    try

                              set contents of variable options of myOrdrenummerTxt to "72"

                    end try

          end tell

end tell

I need to write a new script that uses the stored text variable data.

How can I (with Applescript) store the new value in a Applescript-variable?

i guess something like this, but this is not working:

tell application "Adobe InDesign CS6"

          set myDoc to active document

          tell myDoc

                    set lowRes_DPI to contents of variable options of "LowRes_DPI"

          end tell

end tell

TOPICS
Scripting
1.3K
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

Enthusiast , Apr 02, 2014 Apr 02, 2014

Hi David,

You forgot text variable

tell application "Adobe InDesign CS6"

          set myDoc to active document

          tell myDoc

                    set lowRes_DPI to contents of variable options of text variable "LowRes_DPI"

          end tell

end tell

Regards

Translate
Enthusiast ,
Apr 02, 2014 Apr 02, 2014

Hi David,

You forgot text variable

tell application "Adobe InDesign CS6"

          set myDoc to active document

          tell myDoc

                    set lowRes_DPI to contents of variable options of text variable "LowRes_DPI"

          end tell

end tell

Regards

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
Explorer ,
Apr 02, 2014 Apr 02, 2014
LATEST

Thank you!

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