How to get the current path of file (jsx) running?

Hello.

I want to be saved in the path of the current running jsx file.

Is there a way?

Thank you.

Hi, is it ok for you?

It seems "app.activeScript" or "$.filename ' is what you wanted.

#target indesign
try {
  // not active in ESTK
  // return script path if run from ScriptPanel
  alert(app.activeScript);
}
catch(e){
  alert(e);
}

// return bridgetalk if run with double clicking jsx
// return script path if run from ScriptPanel
alert($.fileName);

alert($.includePath);

Thank you

mg.

Tags: InDesign

Similar Questions

  • How to get the Page Path in Webcenter at run time

    Hi all

    I want to get the path to the page of the current page which is consulted by the user at run time (rather, in the method of TF activity)... This path of the page will get the def page and do some operations above.

    We tried to get it from the context of Navigation, but node.path returns null.

    Guidance on how I can get the computer?

    Kind regards

    Siddharth

    SID,

    You can use the EL #{pageDocBean.pagePath} for the path of the page.

    K

  • How to get the current file name and & or path

    How can I get the current path or the file name?

    I have really found the answers in the net. This.Path or app.path have been proposed, but I couldn't make it work.

    Thanks in advance for your answer!

    LiveCycle Designer ARE 8.2.1.3144.1.471865

    Hello

    event.target.path.toString ();  will give the full path, including the file name.

    event.target.documentFileName.toString ();  will give the file name only.

    Good luck

    Niall

  • How to get the full path of the image open in a filter plugin file?

    Hello

    How to get the full path of the current file, including the directory, the file name with the extension. I need information to download the file on a webserver for a plugin. I found an example that can get the name of the document (title property) but without extension and directory. How can they?

    James

    There is no way to get the full path of the active document in a plug-in filter. A plugin automation has access to this information and the file format plug-ins.

  • Forms 6i: how to get the UNC path? SOLVED

    Anyone know how to get the UNC path of in Oracle Forms 6i

    For example, if the user enters an output file:
    j:\Data.txt

    How I translated that UNC path:
    \\serv-123\cfs\data.txt

    Basically, I need to pass the UNC path to a regular DB procedure that later would be to copy an output file at the location specified by the user. "J:" being a network drive mapped, the database server would not be able to copy the file.

    Thank you
    Jim

    It's perhaps easier: read the registry using WIN_API_ENVIRONMENT. READ_REGISTRY. The key is HKEY_CURRENT_USER\NETWORK\\RemotePath.

  • How to get the current timestamp in C++ to the BB10 project

    Please help me how to get the current timestamp in C++. Thanks for your help!

    Following your suggestion,

    QTime is only for a day.  http://developer.BlackBerry.com/Cascades/reference/QTime.html#details

    I found "QDateTime" of references of the API: http://developer.blackberry.com/cascades/reference/qdatetime.html#toTime_t

    QDateTime = now QDateTime::currentDateTime();
    timestamp long = now.toTime_t ();

    But I got an error. I searched but no results are clear:

    -variable 'QDateTime now' initializer has but
    incomplete type
    -type incomplete "QDateTime" used in the nested name
    specifier of

    I am a newbie. So thank you for your help

  • How to get the current wording of the BlackBerry device with the BlackBerry App?

    Hello!

    I'm new to BlackBerry,

    Can u tell me pls, how to get the current language of the device using the program...

    PLS, suggest me...

    Locale.getDefaultForSystem () will give you the regional settings currently selected.

  • How to get the JOINT-2 log file

    Hi, we installed in the 6500 system JOINT-2 cat. Anyone know how to get the syslog JOINT-2 file? and how config to send the log to syslog server? I know that these two questions are quite simple, but I've yet to find answers.

    Any help would be greatly appreciated.

    You can get the JOINT events to the CETS format. Using the Manager of IPS or other tool to collect these logs.

  • How to get the current position from the point of view

    can I know how to get the current position of the view?

    Edited by: anIdiot July 27, 2011 22:01

    1 - get belvedere of the universe:

    u = new SimpleUniverse (canvas3D);
    ViewPlat = u.getViewingPlatform (); view of the universe

    definition viewplat: ViewingPlatform ViewPlat;

    2 - get look a transform of the platform in an existing Transform3D

    ViewPlat.getViewPlatformTransform () .getTransform (t3d).

    3 - Look at the trandform: t3d.get (Quater1, vector1); orientation object Get and coords

    Kind regards.
    JFP

  • How to get the message to debug all to running page request OFA?

    Hello

    How to get the message to debug all to running page request OFA? do not use JDeveloper

    Thank you

    Renon,

    this.writeDiagnostics will be work AM and not CO. You mentioned that your code is AM, which is why I give (this.writeDiagnostics).

    You get an error when you use what to ? AM

    in CO, you must use pageContext. writeDiagnostics();

    You don't need to put any profile (other than DNF: Diagnostics), you just need to go to the Diagnostics - select the log on screen and choose the level that you used in the writeDiagnostics method.

    See you soon

    AJ

  • How to get the default path of the data of a table space file

    I used below the sql statement to create a table space:

    CREATE A TABLESPACE DATAFILE AAA BBB SIZE 10 M AUTOEXTEND OFF...

    Notice, I do not give a full path instead of a file name, and then ask questions relevant to tables

    get the full path of the data file, assume that it's path below:

    d:\oracle\...\BBB

    So I don't think that there is a default path that oracle can use it to create the data file. My question

    is how to get this default path before creating a table space.

    Thank you very much.

    Hello

    I did similar simulations for you, then it could be seen easily:

    SQL > Show parameter db_create_file_dest

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    db_create_file_dest chain

    SQL > SELECT NAME, VALUE OF V$ PARAMETER

    2 where lower (name) = "db_create_file_dest;

    NAME

    --------------------------------------------------------------------------------

    VALUE

    --------------------------------------------------------------------------------

    db_create_file_dest

    It has the value NULL. Then where my datafile is going?

    SQL > create tablespace TEST datafile 'test01.dbf' size 10 M;

    Created tablespace.

    SQL > select file_name

    2 of dba_data_files

    3 where nom_tablespace = 'TEST ';

    FILE_NAME

    --------------------------------------------------------------------------------

    /U01/app/Oracle/product/12.1.0/Db_1/DBS/Test01.dbf

    When you check the alert logs, it will not show you the location of the data file. It will tell you what exactly you ran.

    ..

    ..

    Completed: drop tablespace test whose content and data files

    create tablespace datafile 'test01.dbf' size 10 M TEST

    Completed: create tablespace TEST datafile 'test01.dbf' size 10 M

    ..

    ..

    You can not SQL user * more? Well, I would say that, when you run the CREATE TABLESPACE command, is where you run the command:

    SQL > select file_name

    2 of dba_data_files

    3 where nom_tablespace = 'TEST ';

    FILE_NAME

    --------------------------------------------------------------------------------

    /U01/app/Oracle/product/12.1.0/Db_1/DBS/Test01.dbf


    So, you should get the location of your data file. Alternatively, you can run the query in the parameter $ v so that you know your default data file location.

    I hope this helps.

    Thank you.

    Kind regards

    Gaetan

  • How to get the absolute path to a file in photoshop extended?

    Hello

    I try to send a file via an entry inside an extension of Photoshop. But how can I get the absolute path to this file inside the computer?

    Thanks in advance

    I don't know what you mean by sending a file. Do you want to open a file in PS or do I have to declare the path for support for the extension file? With javascript, you must define a variable. In Win it should look like:

    var file = new File('/c/images/myfile.psd');
    

    or

    var myScript = new File(app.path + '/Presets/Scripts/myJavascript.jsx');
    
  • How to get the .rbf and .through files?

    Hello I am currently working on the project, which provides for automatic deployment and launch programs everchanging.

    Ev3 are scattered in different schools. I wrote a simple script that can download a file and then send it to ev3 via wifi.

    But I'm currently stuck on how to get .rbf and Labview .through files.
    I know that I can deploy .vi using the target to ev3 and then upload these files to the PC, but I can't add script.
    Is it possible to compile .vi to the file?

    Sorry, try this

  • How to get the current state of the son process

    Hello

    If I know that the instance id of a child process.
    How can I get the current state of the child (e.g., completed, running, etc.) process in the code "PBL"?

    Thank you in advance.

    Hello

    Here's a way to display the status of children sub-process engendered by a process parent process creation activity. In this sense, the process id of the subprocedure is "ChildProcess. The id of the activity of creating processes in the parent process that causes the work item instance in the child process called 'SpawnChildren '. This logic is performed from inside the process parent in an activity downstream process creation activity, called "SpawnChildren".

    Display statements have been added just to see you return values (do) their leash not when going into production.

    display "Children: " + children + "\nKeys: " + children.keys + "\nLength: " + length(children) +
    "\nInstance id of child: [" + children["SpawnChildren"] + "]"
    
    if children["SpawnChildren"] = null or children["SpawnChildren"] = "" then
         display "Child is completed"
    else
    
         bp as BusinessProcess
    
         connectTo bp
                         using url = Fuego.Server.directoryURL,
                             user = "test",
                             password = "test",
                             process = "/ChildProcess"
    
         instance as Fuego.Papi.Instance
         instance = getInstance(bp, instance : children["SpawnChildren"])
         logMessage "run Instance: " + instance.id
                          using severity = DEBUG
    
         display "Status: " + instance.status + "; inside the child process in the activity: " + instance.activityName
    
         disconnectFrom bp
    end
    

    I downloaded the project I used this in to http://www.4shared.com/file/130890113/2d825960/ChildrenOfaParent.html.

    Hope this helps,
    Dan

  • How to get the current location in the event thread?

    Hello!

    Can U pls tell me how to get the location where the thread object, it is in method() execution of MenuItem. PLS, tell me-

    I also used the different thread for the getLocation() method. But I do not have the coords of geo location...

    PLS, suggest me-

    My code is as below:

        private MenuItem getGeoCodes=new MenuItem("Current Coords",100,1){
    
                                 public void run(){
                                     double[] coords=getLocationCoords();
                                     this.wait(12000);
                                     System.out.println("Latitude :"+coords[0]+" "+"Longitude:"+coords[1]);
                                 }
    
                     };
    
        private double[] getLocationCoords(){
            Criteria criteria = new Criteria();
            criteria.setHorizontalAccuracy(500);
            criteria.setVerticalAccuracy(500);
            LocationProvider locationProvider = LocationProvider.getInstance(criteria);
            Location location=null;
            new Thread(){
               public void run(){
                       locationProvider.getLocation(60);
               }
            }
            QualifiedCoordinates qualifiedCoordinates=location.getQualifiedCoordinates();
            double[] coords=new double[]{qualifiedCoordinates.getLatitude(),qualifiedCoordinates.getLongitude()}   ;
             return coords;
        }
    

    But I myself NullPointerException. Coordinates get successfully, if we run the location capability in different function, rather than the event thread.

    Please help me-

    In my opinion, which may be too complicate things a bit. I think he's trying to do is register a LocationListener with his object of LocationProvider. Callback methods, send a message to the UI event thread as follows (no need to spawn threads):

    UiApplication.getUiApplication().invokeLater( new Runnable() {
        public void run()
        {
            // This code will execute on the event thread
        }
    });
    

    EDIT: If your interval is short, you can consider implementing this executable as a class and store an instance in the front.

Maybe you are looking for

  • Why browsers plant them

    Hello community, Recently, I saved an old Macbook 5.1 (13 in 2008) of a parent. The laptop has been abused, dropped enough solidarity to fold the chassis; DVD Player cannot be used or installed replacement. But with the damage he still roared to life

  • Pioneer DVD for Satellite A300D - DVRTD08A or DVRTD08L?

    Hello! TEMPRO is designed me that two new drivers are available for my Satellite A300D. It turns out that the two are 'the same', but we apply DVD Pioneer DVRTD08A model (with the function 'Label Flash') and one for the DVRTD08L model (without 'Label

  • Where is the y500 SLI?

    Hi guys, long time reader, decided to register to ask a simple question! Sorry if I'm a complete jerk, but where is the option to buy the y500 Ideapad with SLI? I see messages on the internet about people who buy the y500 with SLI already included in

  • HP Pavilion x 360 has the white screen and LOCK SHIFT key flashes

    I recently got a new laptop from 13-inch HP Pavilion x 360 a week ago. It worked well and I loved. six days after that I started to use it the screen goes black while I watch a youtube video and the mahcine started his strange. I use the power button

  • Access Adobe Stock of Thailand

    Hello everyone!How to subscribe to Adobe Stock of Thailand?Thank you!