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

implement Localstorage with Java in indesign

New Here ,
Apr 28, 2021 Apr 28, 2021

Hello community could you help me with some quiestions about indesign.

 

How to implement Local Storage with JavaScript in InDesign?

How to implement Session Storage with JavaScript in InDesign?

Is there a way to put an ID in a form within InDesign?

 

Thank You

 

TOPICS
EPUB , How to , Publish online , Scripting , SDK , Sync and storage
305
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
Community Expert ,
Apr 28, 2021 Apr 28, 2021

Hi

 

[I have assumed you are talking about an indesign ExtendScript script, and not a CEP script]

LocalStorage - You have access to pretty much the whole harddrive, so you could easily create some storage scripts that create and store information in a specific folder <somePath>/localStorage/docName/ store information here anyway you want.

 

SessionStorage - As above, but you could register for the DocClose event, and at that point go through the sessionStorage location and remove all the files.

 

These would probably have to be coded by yourself as I don't think there is anything out there that would enable this.

 

As for the ID, I am not sure what you are trying to achieve, is this from a script, or default value?

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
Community Expert ,
Apr 28, 2021 Apr 28, 2021
LATEST

Also, the Folder class has some cross platform properties, which might help:

 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Folder.html

 

 

$.writeln("User Desktop: " + Folder.desktop)
//~/Desktop

$.writeln("System Application Support Folder: " + Folder.appData.fsName)
//System Application Folder: /Library/Application Support

$.writeln("User Application Support Folder: " + Folder.userData.fsName)
//User Application Support Folder: ~/Library/Application Support

$.writeln("Target Application Folder: " + Folder.appPackage.fsName)
//Applications/Adobe InDesign 2020/Adobe%20InDesign 2020.app

$.writeln("Documents Folder: " + Folder.myDocuments)
//Documents Folder: ~/Documents

$.writeln("Application Startup Folder: " + Folder.startup.fsName)
//Application Startup Folder: /Applications/Adobe InDesign 2020/Adobe InDesign 2020.app/Contents/MacOS

$.writeln("System Folder: " + Folder.system)
//System Folder: /System

$.writeln("Temp Folder: " + Folder.temp)
//Temp Folder: /private/var/folders/w2/s1lk7d6d3m95v4pq7m4flscw0000gn/T/TemporaryItems

$.writeln("User Folder: " + Folder.trash)
//Trash Folder: ~/.Trash


var dt = Folder.desktop
$.writeln("Full Destop Path: " + dt.relativeURI)
//Full Destop Path: /Users/fishercat/Desktop

var uas = Folder.userData
$.writeln("Full Destop Path: " + uas.parent)

 

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