Record file in the folder of the local settings of the current user in windows and Mac.

Hello

Could you please help me for the following:

We need to write javascript to read some data Indesign file and save it as a file text in the local folder for the current user in Windows and Mac.

We use the CS4 version.

1. how to get the path of the local folder of the current user to save the file in both windows and Mac?

2. we need to write a javascript for Windows and Mac code. How to identify the operating system in the script?

Concerning

Khathija,

Through the file class, you can get the current user data folder.

This example will point to / create "My Custom Folder" inside the user data folder.

var userFolder = Folder ( Folder.userData.absoluteURI + "/My Custom Folder" );

if ( !userFolder.exists )
    userFolder.create ();

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Tags: InDesign

Similar Questions

  • PLEASE, I BEG YOU! How can I have a label dynamically see the current user loggedin FirstName and LastName in my database?

    I have a HBox that becomes visible when a user is valid. The HBox contains a logout button, and a label. How can I get the label dynamically see the current user loggedin FirstName and LastName in my database? Below, I have included my element HBox and ColdFusion. ANY helpwould be appreciated!



    < < < < < < MY component LoginHBox.mxml starts HERE > > > > > > >
    < mx:HBox
    ' xmlns:MX =' http://www.adobe.com/2006/mxml '
    Width = '100% '.
    height = "28".
    horizontalAlign = "right."
    verticalAlign = "middle".
    paddingRight = "10" >

    "" < mx:Script source = "... / actionScript/logout.as" / >

    <!-App connects to ColdFusion using Flash Remoting STARTS->
    < mx:RemoteObject
    ID = "cfService_LoginCFC".
    destination = "ColdFusion".
    source="WebsiteApplication.CFC.LoginCFC"/ >
    <!-App connects to ColdFusion using Flash Remoting END->

    < mx:Label id = "welcomeLabel".
    Text = "Welcome"... "/ > < < < < HOW can I get the text dynamically see the users registered in FirstName and LastName?

    <! - logoutResultHandler() of the points of function in the file logout.as - >
    < mx:Button id = "logoutButton.
    label = "Log" Out
    Click = "logoutResultHandler ()" / >

    < / mx:HBox >
    < < < < < < MY component LoginHBox.mxml ends HERE > > > > > > >



    < < < < < < MY component LoginCFC.cfc starts HERE > > > > > > >
    < cfproperty >

    <!-function loginUser STARTS->
    < name cffunction = "loginUser" access = "remote" returntype = "WebsiteApplication.cfc.UserCFC" >
    < cfargument = 'user name' name type = "string" required = "true" >
    < name cfargument = "password" type = "string" required = "true" >

    <!-the default user is not logged in->
    < cfset var user = createObject ("component", "UserCFC") >

    < cfquery name = "loginQuery" dataSource = "TheChurchOnFire" >
    SELECT the name of user, password, AccessLevelID, FirstName, LastName
    FROM dbo. MembershipInfo
    WHERE
    Username = "#username #
    AND password = ' #password #
    < / cfquery >
    <!-the cfif instructionsuivante is absolutely fundamental in the achievement of the
    fully functional authentication-> process
    < cfif EQ loginQuery.Username ' #username # ' loginQuery.Password AND EQ ' #password # ' >
    < cfset user .loggedin = true >
    < cfset user .username = "#username #" >
    < cfset user .roles = "#loginQuery.AccessLevelID #" >
    < cfreturn user >
    < cfelseif > #username # EQ 'username' AND #password # EQ 'password '.
    < cfset user .loggedin = true >
    < cfset user .username = "#username #" >
    < cfset user .roles = "6" >
    < cfreturn user >
    < cfelse >
    < cfreturn user >
    < / cfif >

    < / cffunction >
    <! - function loginUser ENDS - >

    < / cfproperty >
    < < < < < < MY component LoginCFC.cfc ends HERE > > > > > > >

    Thank you

    John

    I finally thought to it! PRAISE BE TO GOD!

    I had to add...

    welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';

    .. .for my loginResultHandler.

    function loginResultHandler
    private void loginResultHandler(event:ResultEvent):void
    {
    currentUser = event.result as a user;
    If (currentUser.loggedIn)
    {
    If successful login
    If (currentUser.roles == '5')
    {
    this.currentState = 'Youth';
    welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
    }
    Else if (currentUser.roles == '4')
    {
    this.currentState = 'Member';
    welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
    }
    Else if (currentUser.roles == '3')
    {
    this.currentState = 'PowerMember';
    welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
    }
    Else if (currentUser.roles == '2')
    {
    this.currentState = 'AssistantAdministrator';
    welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
    }
    Else if (currentUser.roles == '1')
    {
    this.currentState = 'SeniorAdministrator';
    welcomeLabel.text ='Welcome, you are currently logged in as + currentUser.fullname + '!';
    }
    on the other
    {
    currentUser.roles == "6";
    this.currentState = 'Visitor';
    welcomeLabel.text = 'Welcome, you are currently logged in as visitor!';
    }
    }
    on the other
    {
    If unsuccessful login
    Alert.Show ("unsuccessful Login", "Server authentication");
    }
    }

    Michael_ramirez44 thanks for your help!

    John

  • Cannot create a PDF file after the upgrades: Adobe 9.2 and Mac OS 10.6.2

    After the upgrade to Adobe Professional 9.2 and Mac 10.6.2 I lost the ability to create PDF files.

    The printer Adobe (display says that the printer is v. 9.0) indicates the status of the job as "Mistake" and has the following message; "You must install the software to use this printer. To install the software, choose software update from the Apple menu. If the software for your printer is not available in software update, contact the manufacturer of your printer. »

    I get errors when I try to create a PDF from a Web page.

    I get the following error when I try to create a pdf from a word file: "Acrobat cannot open 'AAA.docx' because it is not a type of supported file or because the file has been damaged (for example, it was sent as an attachment to e-mail and has not been correctly decoded).

    To create an Adobe PDF document, go to the source application. Then print the document in Adobe PDF format".

    (I can create a PDF from jpg files... but I never really have a need to do this...)

    I uninstalled Adobe Professional by using the uninstall program (then emptied the trash and restart), then reinstalled Adobe Professional from disk (and restarted).  After the reinstallation, I always get the same problems, even if I get no error message until Adobe Professional updates from 9.0 to 9.2.  Before the upgrade Adobe, v9.0 attempts to print to pdf just act as the pdf is created (no error message), but I do not get a backup fast, nor is a new pdf no matter where the document is located.

    Help, please!

    With OSX.6.x, the possibility of using the Adobe PDF printer has been lost. See the ad at the top of this forum (known issues with Snow Leopard).

  • Transfer files to the new user account [was: new user]

    We went from Windows XP forum>

    How to transfer files from the current user to a user name

    Is that what you really want to do and why?

    In particular, you want to create a user account completely new to replace an old account may be corrupt, or you want to just copy some files?

    If you want to copy the user profile, see http://windows.microsoft.com/en-us/windows/fix-corrupted-user-profile#1TC=windows-7

    If you just want to copy files from the ALICE user to user BOB,

    1. Connect you as a user with "Computer administrator" privileges (this could be ALICE, BOB or another account)
    2. Go to C:\Users\Alice\Documents, right click on desired folders or files and select copy
    3. Go to C:\Users\Bob\Documents and paste files or folders you copies

    Always use 'Copy' rather than 'move '.  After you have determined that the files were copied successfully to their new location, you can go back and delete them from the old location.

    For other than documents files, replace

    C:\Users\\Music

    C:\Users\\Pictures

    C:\Users\\Videos

    etc.

  • Cannot open the file PDF as computer Mac tells me to accept the end user license agreement and to relaunch the browser... How can I do this? URGENT!

    Cannot open the file PDF as computer Mac tells me to accept the end user license agreement and to relaunch the browser... How can I do this? URGENT!

    With closed drive, open your Applications folder and double click (left) on the drive icon.

  • How to stop the generation of the trace of the files concern the particular user

    Dear all,

    Please advice:

    Is it possible to stop the trace file that is created by a user for a particular job (sql/exp)

    For example:
    Create trace files whenever the user has run the sql/exp command from the application server.
    Which created a large files and caused the file system is full (not in bdump but it's generation in the home directory of the user application).
    Is there a method to stop the generation of trace records relate to the particular user base on this job.

    Thank you
    Nathalie

    Dear GEORGE

    This trigger will be created for that specific user by dba or anyone with sysdba privileges. It will be triggered at the time of login of this user and edit the sqltrace.

    for example, we write a trigger in our database for each ddl operation in the database.

    CREATE OR REPLACE TRIGGER "SYS." "' SYS$ DDLTRIG" after the DDL on the database
    declare
    v_machinename VARCHAR2 (100);
    v_osuser VARCHAR2 (100);
    v_dbuser VARCHAR2 (100);
    v_host VARCHAR2 (100);
    v_program VARCHAR2 (100);
    v_instance VARCHAR2 (100);
    T_DATE VARCHAR2 (100);
    Start
    Select to_char (sysdate, ' dd-mm-yyyy HH24:MI:SS), user, sys_context (' userenv ',' OS_ ")
    USER'), sys_context ('userenv', 'HOST'), (select instance_name of v$ instance), (se
    You can select program session $ v where sid = (select distinct sid from v$ mystat)), (se
    machine READING of session $ v where sid = (select distinct sid from v$ mystat)) int
    o T_DATE, v_dbuser, v_osuser, v_host, v_instance, v_program, v_machinename of double;
    IF ora_sysevent = 'DROP' or ora_sysevent = 'CANCEL' or ora_sysevent = 'GRANT' or
    ora_sysevent = 'CREATE' or ora_sysevent = 'TRUNCATE' or ora_sysevent = 'CHANGE '.
    Then
    insert into ddl_log_new (T_DATE, v_dbuser, v_osuser, v_host, v_instance, v_program, v_m
    achinename, V_EVENT, V_OBJECT_NAME, V_OBJECT_TYPE, V_OBJECT_OWNER) values (T_DATE, v_
    dbuser, v_osuser, v_host, v_instance, v_program, v_machinename, ora_sysevent, ora_dict_
    obj_name, ora_dict_obj_type, ora_dict_obj_owner);
    END IF;
    END;

    I hope that above example will be useful to you,

    Concerning
    Evelyne

    Published by: ambrishr24 on 5 December 2012 17:02

    Published by: ambrishr24 on 5 December 2012 17:05

    Published by: ambrishr24 on 5 December 2012 17:20

  • I can view is no longer the video files to the format AVCHD using Windows Media Player on my desktop

    I can view is no longer the video files to the format AVCHD using Windows Media Player on my desktop.

    I could at some point... but now all I get is audio, no video.  The files open and work on

    my laptop that also uses Windows Media Player... but for some reason now... nadda.  Seemed

    This all started when I upgraded Windows more late service CAP and also installed Real Player.

    Help!

    Hello

    • What version of Windows are you using?

    1. it is possible that you are missing the codec to play the file or it is clashing with other codec files.

    2. the link provided below lists supported by Windows Media Player file format.
    It does not list the AVCHD or. MTS files supported file format directly:
    http://support.Microsoft.com/kb/316992

    3. yet we cannot be sure at this point that the issue is due to interference with some files.

    Method 1:
    Alternatively, you can perform a restore of the system to a previous point, when the issue was not present. The System Restore tool uses points of restore to return the system files and settings to an earlier point in time. You can use it to restore the operating system to a point in time where you have not experienced the problem.

    Note: When you use System restore to restore the computer to a previous state, programs and updates that you have installed are removed.

    To do this, there must be a restore point from the system in which the connection was successful.

    Please refer to the below of the help links on performing a system restore.
    http://Windows.Microsoft.com/en-us/Windows7/what-is-system-restore
    http://Windows.Microsoft.com/en-us/Windows7/system-restore-frequently-asked-questions

    Method 2:
    You can determine which codec was used with a specific file; read the file in the player, if possible. When the file is playing, right-click the file in the library, and then click Properties. On thefile tab, look at the Audio codec and Video codec sections.

    Then you can uninstall any installed codec and install that you need to do the job file.

    If you have several codec for the single file to work they can clash and cause problems.


    You can check the link for assistance on the issue - below

    http://Windows.Microsoft.com/en-us/Windows7/codecs-frequently-asked-questions

  • Impossible to copy files to the Sansa Fuze using Windows 7 (drag and drop, or Windows Media Player)

    Hello

    Yesterday, I bought the Sansa Fuze and I have problems copying files to the device using either Windows Media Player (Sync) or Drag and Drop (Explorer).

    The symptoms are:

    (1) the device is recognized and available in Windows 7 (Series USB MSC - sorry don't have it with me right now)

    (2) took me to upgrade to the latest firmware, which has worked flawlessly

    (3) when I try to drag and drop a file on the device (I use Windows 7, 64-bit), it starts, but doesn't seem to calculate the size of the files or waiting time to download correctly.  It is followed by a slow progressive, until the computer crashes, resulting in a constant 100% of the CPU.  The only solution is a hard reboot

    (4) when you use Windows WM, the device is recognized, okay and the synchronization starts, but it then stops without reason.  Once again, the processor springs and requires a reboot

    (5) using the results 3 and 4 in 1-5 files being copied across, but not more.

    (6) I tried several albums and one album at a time, but cannot determine if that makes a difference.

    Help, please!

    See you soon,.

    Richard

    It may be a bug in Windows 7. But one thing to try is to go to the Device Manager (assuming that Windows 7 still has), uninstall the "rocket" (under USB controllers), and then run add hardware to find and reinstall the driver.

    Use the MTP with Windows Media Player mode, MSC mode without.

  • audio and video synchronization on a file in the library media player Windows 7 Home Premium 64-bit

    How can I synchronize audio and video on a file in the library media player Windows 7 Home Premium 64-bit
    video play about a second faster than the audio, the download is good, cause it works on another computer on a flash drive...

    How can I synchronize audio and video on a file in the library media player Windows 7 Home Premium 64-bit
    video play about a second faster than the audio, the download is good, cause it works on another computer on a flash drive...

    Set up a device to sync in Windows Media Player

    Sync manually in Windows Media Player

    Windows Media Player sync: frequently asked questions

  • Windows 8.1 in Adobe Illustrator, I tried to copy my design &amp; tried to paste it, but after sticking the image (file), now the color looks different, drive and lighter. So, kindly inform how to paste the file with 100% same resolution / color / appeara

    Windows 8.1 in Adobe Illustrator, I tried to copy my design & tried to paste it, but after sticking the image (file), now the color looks different, drive and lighter. So, kindly inform how to paste the file with 100% same resolution / color / appearance. Thank you.

    Hi GANESHKUMARAPILLAI CHRYSTELLE,.

    Here is a link for color management workflows in Illustrator.

    It is best to place the image instead of paste into Illustrator. When you paste the images they are in RGB color format. Make sure your document is a RGB file

    Click on these links for more information.

    Understand the workflow of the CC of individual course Illustrator color management: Advanced

    Creative Suite * keeping colors consistent

    Implement the print color management workflow. Illustrator, InDesign, Photoshop

    Concerning

    Scott

  • OMB * Plus the command to the list of files in the current directory

    UNIX-based OMB * more customer supports the command 'ls' for a list of the files in the current directory (OS).

    Does OMB non-windows * more customer have a similar command? I tried the two 'ls' and 'dir' without a bit of luck.

    I use the Windows OMB 11.2.0.2 version * more customer.

    Thank you.

    Use tcl commands to get the platform independence, so, for example, you can use
    glob *.
    to list all the files or
    *.XML glob
    for all XML files in the directory.

    See below for details of the glob command
    http://www.tcl.TK/man/tcl8.4/TclCmd/glob.htm

    You can use cd to change directories because I think that the version of TCL used is older and does not support the - directive of the directory on the glob command.

    See you soon
    David

  • How can I get rid of the top of the case. offers4u and "go around the web" pop-up windows and unwanted when links pop up windows is already turned off on my laptop

    I tried this software ad/malware and tried the launchdaemon corrections responsible extensions suggested and still can't find where they are hiding on my computer.  One of them adds unwanted links with green circular arrows on other Web pages and advertising windows with offers for similar products pop - up on Safari and Chrome.  They are driving me crazy, I even paid for the software adblocking, which serves to block the sites I want to open and still allows popups!

    You may have installed ad-injecting malicious software ("adware").

    Do not use any type of product, "anti-virus" or "anti-malware" on a Mac. It is never necessary for her, and relying on it for protection makes you more vulnerable to attacks, not less.

    Save all data first.

    Some of the most common types of adware can be removed by following the instructions from Apple. But before you follow these instructions, you can try an automatic removal.

    If you are not already running the latest version of Mac OS X ("El Capitan"), update or upgrade in the App Store you could adware to automatically remove. If you are already using the latest version of El Capitan, you can still download the current update of the Apple Support downloads page and run it. Still, some types of malware will be deleted, not all. There is no such thing as the automatic removal of all possible malware, either by OS X third party software. That's why you can't rely on software to protect you.

    If the malware is deleted in your case, you will still need to make changes to the way you use your computer to protect you from new attacks. Ask if you need advice.

    If the malware is not automatically deleted, and you cannot remove yourself by following the instructions from Apple, see below.

    This simple procedure to detect any type of adware that I know. Disabling is a procedure distinct and better still.

    Some legitimate software is funded by advertising and may display advertisements in its own windows or in a web browser while it is running. It's not malware and it may not appear. In addition, some Web sites display advertising intrusive popup that can be confused with adware.

    If none of your web browsers work well enough to carry out these instructions, restart the computer in safe mode. Allows to temporarily disable the malware.

    Step 1

    Please triple - click on the line below on this page to select it, and then copy the text to the Clipboard by pressing Control-C key combination:

    ~/Library/LaunchAgents

    In the Finder, select

    Go ▹ go to the folder...

    from the menu bar and paste it into the box that opens by pressing command + v press return. Open a folder named "LaunchAgents", or you will get a notice stating that the file cannot be found. If the file is not found, proceed to the next step.

    If the folder opens, press the combination of keys command-2 to select the display of the list, if it is not already selected. Please don't skip this step.

    There should be a column in the update Finder window. Click this title two times to sort the content by date with the most recent at the top. If necessary, enlarge the window so that all the content show.

    Follow the instructions in this support article under the heading "take a screenshot of a window." An image file with a name starting in 'Screenshot' should be saved to the desktop. Open the capture screen and make sure it is readable. If this isn't the case, capture a small part of the screen indicating that what needs to be shown.

    Start a reply to this message. Drag the image file in the editing window downloading. Alternatively, you can include text in the response.

    Leave the case open for now.

    Step 2

    Do as in step 1 with this line:

    /Library/LaunchAgents

    The record which can open up will have the same name but is not the same as in step 1. In this step, the folder does not exist.

    Step 3

    Repeat with this line:

    /Library/LaunchDaemons

    This time the file will be called "LaunchDaemons."

    Step 4

    Open Safari preferences window and select the tab 'Extensions'. If the extensions are listed, post a screenshot. If there are no extensions, or if you cannot launch Safari, skip this step.

    Step 5

    If you use Firefox or Chrome browser, open the list of extensions and do as in step 4.

  • Retrieve the current user info

    Hello

    I have a dynamic form created using the LC Designer. Is it possible to extract the details of the current user who looks at the form in the form itself?

    Hi Pierre,.

    If you create a file with the following code .js and place in the JavaScripts folder under the directory of installation of the reader (or Acrobat), it's C:\Program Files (x 86) \Adobe\Reader 11.0\Reader\Javascripts on my machine and I called my getIdentityLoginName.js file, then all defined functions will be available as a global function in your JavaScript forms and will also have access to secure items such as identity.  The code is so;

    var getIdentityLoginName = app.trustedFunction (function () {}

    app.beginPriv ();

    return (identity.loginName);

    app.endPriv ();

    });

    And can be called from a form as;

    App.Alert (getIdentityLoginName ());

    Concerning

    Bruce

  • Why Wizard does not start when the current user?

    Program does not RUN. Wizard does not open after you select the Option for the current user

    P.S. If you can't always install Firefox, even using the FULL Installer:

    Reinstalling but this time download the file on your computer. When the download is complete, install it as an administrator by right clicking the configuration file and select "Run as Administrator".

  • What are the current versions of Labview and Teststand

    Hello

    I currently am downlading the current versions of teststand and labview for evaluation.

    The Teststand-link I saw that it is called "Teststand" 2012.

    1 but there is no version information in the Labview download. Is also 2012 version?

    2 is the two 32-bit-software things?

    3. After installing the evaluation-downloads - can they be activated with a key, or what I need to install again when the CDs arrive in my office?

    Thanks for help

    Iliale wrote:

    Thx for the links.

    I am using Windows 7 64 bit - I'd rather then also Labview 64? (Links to download NOT only provides 32-bit for download)

    There will be problems with my existing 8, 5 - screw Labview conversion to the new Labview2012?

    Thank you

    You can have as many 32-bit and 64-bit installed.  Don't forget your target when you generate an exe file.  64-bit compiled programs can run on 64-bit computers.

    You should have no problem upgrade your code of 8.5.

Maybe you are looking for

  • Activity of sharing data is displayed

    So I just recently upgraded to iOS 10 and watch OS 3 all is well on this side, however, I'm not able to see someone 'Activity' when its being shared with me. My activity is however be shared and seen very well on the other end of people. I deleted an

  • Installation of MS8.12 in VS2008 (only possible for 2005)

    Hello I want to install Measurement Studio for Visual Studio2008 8.12. The problem is the installer says there is no VS2005 installed. Y at - it a tip to install with only VS2008 installed? Markus80

  • Fix valid security or phishing?

    Last night (5/14) when I stopped my XP computer I got the shield of security code and the message not to shut down the computer as it would thus automatically after updates have been installed. Since it was assumed no updates for XP any more I was af

  • I have Windows XP Home Edition and Windows XP Professional on my computer. I would like to delete the XP Home.

    I have Windows XP Home and XP Professional on my computer at home. It creates a nuisance for me and almost every time I restart the computer I need to boot from the CD of XP Professional. I would like to reformat the drive and install only XP Profess

  • DV6-6135dx-bat software missing

    This morning I discovered that my helmet on my dv6-6135dx shots were not working properly. They only work if I plugged the headset partially in. Plug them all the way only would give me low sound through the computer's speakers. So I uninstalled the