Save the file on the desktop

Hello

I created a script (see below) that alert unused style of character and paragraph in the active document.

////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////
My Script
////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////

myUnusedParagraphStyleName();
myUnusedCharacterStyleName();


function myUnusedParagraphStyleName()
{
myDoc var = app.activeDocument;
var myParStyles = myDoc.allParagraphStyles;
var foundPStyles = [];
for (I = myParStyles.length - 1; i > = 2; i--) {}
foundPStyles.push (myParStyles. ([i] .name);
}
Alert (foundPStyles.join ("\r"));
}
function myUnusedCharacterStyleName()

{
myDoc var = app.activeDocument;
var myCharStyles = myDoc.allCharacterStyles;
var foundCStyles = [];
for (I = myCharStyles.length - 1; i > = 1; i--) {}
foundCStyles.push (myCharStyles. ([i] .name);
}
Alert (foundCStyles.join ("\r"));
}
////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////

But I want to record my alert message as a file on my desktop. I have search and found an example (see below), but what I could not combine this code with my script.

Can someone please merge this code in my JS. For my script to save a log file to the desktop. I really appreciate your support.

////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////
Example from Adobe's Forum
////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////

myDoc var = app.activeDocument;
var myDocPath = myDoc.filePath;
var myDocName = myDoc.name;
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\b(\\w.+\\s000\\s000\\s00)"; "


mySearch var = myDoc.findGrep ();
var myFound = new Array()
for (var j = 0; j < mySearch.length; j ++)
{
myFound.push (mySearch [j] .silence);
}
Alert (myFound);
var inc = 0;
var myLogFile = new File (myDocPath.fsName + "/ Report_" + myDocName.split(".")) ([0] + '.txt');
If (myLogFile.open ("w", defined, undefined))
{
myLogFile.writeln ("the tool name: Report Builder for CS5");
myLogFile.writeln("***");
If (myFound.length! = 0)
{
myLogFile.writeln("");
for (var k = 0; k < myFound.length; k ++)
{
SERIALNO = k + 1;
myLogFile.writeln ("" + serialno + ".")  ' + myFound [k]);
}

myLogFile.execute ();
}

on the other
{
myLogFile.writeln ("no terms found");
}
}
////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////

Thanks in advance.
LUN


It is here.

var foundPStyles = [];var foundCStyles = [];var myDoc = app.activeDocument;var myDocPath = myDoc.filePath;var myDocName = myDoc.name;

myUnusedParagraphStyleName();myUnusedCharacterStyleName();myWrite2Log();

function myUnusedParagraphStyleName(){          var myParStyles = myDoc.allParagraphStyles;          for (i = myParStyles.length-1; i >= 2; i-- )          {                    foundPStyles.push(myParStyles[i].name);          }          // alert(foundPStyles.join("\r       "));}function myUnusedCharacterStyleName(){          var myCharStyles = myDoc.allCharacterStyles;          for (i = myCharStyles.length-1; i >= 1; i-- ){                    foundCStyles.push(myCharStyles[i].name);          }          // alert(foundCStyles.join("\r       "));}function myWrite2Log(){          var inc=0;          var myLogFile = new File(Folder.desktop+"/Report.txt");          if(myLogFile.open("w", undefined, undefined))          {            myLogFile.writeln("Unused ParaGraph Styles\n=======================\n\r");            if(foundPStyles.length != 0)            {                      myLogFile.writeln("");                      for (var k = 0; k

I hope this helps you

Tags: InDesign

Similar Questions

  • How to save a file on my desktop

    I received a file which has been pdf d and can not save to a folder on my desktop. I don't want on the cloud, but that seems to be the only option.

    Thank you for your help but I finally understand.

  • Recurring icons the desktop and more by themselves!

    After you save a file on my desktop suretrack icons began copying their selves. I now have 70 copies of the file suretrack, and he began to copy the other icons of office such as word and documents ecel. Someone knows the answer?

    Hello

    Try to create a new profile and connect to check if the problem persists.

    Reference: http://support.microsoft.com/kb/811151

  • Save the file on the user's desktop

    Hi all, just a simple question (I hope!)

    I am writing a program and I want to save the file .txt output to the office. Of couse, different computers will have on their desktop to different directory paths (for example C:/Documents and Settings/Bob/Desktop - the user name will be different in all cases).

    Is there a specific command that you can use to specify what system you are looking for the office, regardless of the rest of the path of the directory? If it makes no sense at all.

    Thank you!

    Yes.Use get the system directory in a file i/o under file constants.

  • Unable to save the files on the desktop computer.

    After a restoration of the system, I am unable to save files on the desktop. Also, when I run that h & R Block software from my office, I get the following error

    "No permission to write to the directory. (see WinFileWriterImpl:open())

    No idea how I can fix this problem?

    Thanks in advance

    Why do you run the system restore?
    You had a problem before with saving files?

    You can save files to a folder on C:\?
    There are errors in the event viewer?

    Note

    To open Event Viewer: click on the Start button. In the search box, type and then event viewer from the list of results, double-click Event Viewer.

    Search in the application or system event logs and red error report.

    Thank you

    Marilyn

  • I was working on a doc Excel, open from my email account, I forgot to save the file on my desktop

    I was working on a doc Excel, open from my email account, I forgot to save the file on my desktop where the original file was. I kept while I was working, so where my file went?  saved on my profile Inbox or where?  Please I need for my work, tonight.  Help!

    Hi MelanieCline-Thera,

    Please take a look at a similar thread (substitute just Word for Excel):

    http://answers.Microsoft.com/en-us/Office/Forum/officeversion_other-word/lost-a-saved-file-that-i-worked-on-from-an-email/a07f5d65-2473-49C2-a6c3-64942d75662f

  • When I save a file (using "Save as" in Firefox) on the desktop the address bar reads: file:///C:/Users/Name/Desktop...

    ORIGINAL TITLE: File evil

    When I save a file (using "Save as" in Firefox) on the Office the address bar reads: file:///C:/Users/Name/Desktop...how can I fix it?

    Hi Goldie,

    1. not the problem only occurs when you save the file in Firefox?
    2. don't you make changes to the computer before the show?

    I suggest you try to save the file using Internet Explorer on the desktop and see if it works.

    If the problem is with the shortcut of Firefox, then I suggest you to post.
    https://support.Mozilla.org/en-us/questions

  • Save files on the desktop

    I have a couple of files saved on the desktop itself, and every time that I re - save the file, it moves the file to the 'next spot' on the left side of the screen, no matter where I placed icon. How to stop?

    Hello salex1988;

    We are not sure what you mean by 'save' the Word and Excel files on the desktop.
    If these files are projects on the desktop, they are already "saved to the desktop of" and it is not necessary to save them again.
    If you are still working with these files by adding data to them, change the filenames and then by recording your progress; then these Word and Excel icons can return to the default location on the desktop (top left corner).  Is this the case?
    I have always used "My Documents" for Word and Excel ongoing projects.  Use the Office for this purpose may cause changes in the location of the icons.  However, I have never experiemented with this, so I'm not sure.  I think it's how the work files saved to the desktop are supposed to react, and it maybe there's not a way to stop it without creating a subfolder of the "My projects" for them on the desktop instead of working, working with them directly from the desktop or "My Documents".

    Does that help?

    spacejunkie1

  • Desktop icons can be seen on the desktop, folders are not able to be open, content is not visible; File save option does not work!

    Recently, I tried to re - install samsung smarthru mfp program (already installed and working except the scan).

    at the end of the reinstall the Office is empty, desktop wallpaper and all records of icons could not be seen, I wasn't able to use windows Explorer.

    I tried restoring the system, but even after that the message that the restore system was not made completely.

    Now the problems are that (1) folders/icons on the desktop are not displayed on the desktop (I have added Office to taskbar and all office files can be accessed from there.

    (2) the big problem is that folder except option does not work: cannot save Web pages, also the documents/files are not able to be saved after having published a new name.

    (3) new folder names the names of the files are not created.

    I tried norton internet security 2010 full scan, there is no virus.

    kindly help

    Thank you

    Norton will be interefe with system restore.

    Read this info for problems with the system restore:

    http://Service1.Symantec.com/support/sharedtech.nsf/pfdocs/2005113009323013

    1. If you use Norton (Etc), disable it before using System Restore. info at the link above.

    2. try SR in safe mode:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    3 Malware will stop at the system restore:

    If necessary, do all the workSafe Mode with network.

     

    To get intoSafe Mode with network, press F8 at the Power On / boot and use key arrow upward to get intoSafeMode with networking from the list of options, and then press ENTER.

    http://www.Malwarebytes.org/MBAM.php

    Malwarebytes is as its name suggests, a Malware Remover!

    Download the free Version from the link above.

    Download, install, upgrade and scan once a fortnight.

    See you soon.

    Mick Murphy - Microsoft partner

  • Save the .txt file - works in a desktop not on device application

    Hello everyone. Im trying to save the text in a TextArea in a .txt file and have been able to do in a desktop Air application but cannot make it work for the BP. I made sure to make access_shared, the problem is in my code.

    private function saveFile():void
                {
                    if (currentFile) {
                        if (stream != null)
                        {
                            stream.close();
                        }
                        stream = new FileStream();
                        stream.openAsync(currentFile, FileMode.WRITE);
                        stream.addEventListener(IOErrorEvent.IO_ERROR, writeIOErrorHandler);
                        var str:String = mainTextField.text;
                        str = str.replace(/\r/g, "\n");
                        str = str.replace(/\n/g, File.lineEnding);
                        stream.writeUTFBytes(str);
    
                        stream.close();
                        dataChanged = false;
                    }
                    else
                    {
                        saveAs();
                    }
                }
    
    private function saveAs():void
                {
                    var fileChooser:File;
                    if (currentFile)
                    {
                        fileChooser = currentFile;
                    }
                    else
                    {
                        fileChooser = defaultDirectory;
                    }
                    fileChooser.browseForSave("Save As");
                    fileChooser.addEventListener(Event.SELECT, saveAsFileSelected);
                }
    
                private function saveAsFileSelected(event:Event):void
                {
                    currentFile = event.target as File;
                    saveFile();
                    dataChanged = false;
                    currentFile.removeEventListener(Event.SELECT, saveAsFileSelected);
                }
    

    I got the Save pop-up dialog box but nothing happens.

    Oops. turns out it was as simple as

    private function saveFile():void
                {
                    var fileRef:FileReference = new FileReference();
                    fileRef.save(mainTextField.text, "myfile.txt");
                }
    
  • Unable to save the files to the desktop, the error msg says I don't have permission to do this and to cantact admin but I m user having admin status.

    IN WINDOWS 7, cannot save the files to the desktop, the error msg says I don't have permission to do this and to cantact admin but I m user having admin status. ALL SUGGESTED SOLUTUTION? THE FILE in question is created with ms word 2007. I can record on other places lik e in drive D: etc.

    I could open your Explorer of files and go to C:\Users\Vanbee (or any folder of your user name), then right click on the folder on the desktop it there and go to properties.  On the Security tab, make sure that you have a full control on the folder.

  • When I save a shortcut on the desktop, I have 2 files.

    When I save a shortcut on the desktop, I have 2 files, the short cut and a second, the shortcut "files." If I delete the files, two shortcuts disappeared. Happened only a few months. Does anyone have a solution?

    I've been using Firefox. I click with the right button on the Web page, click Save as and save it on the desktop. I think that its code html in format "page"full Web", only other options are"html only", which translates to lose all the formatting and images,"text files"and"all files ". Thanks for the reply.

  • Small batch. Review, edit and save to the desktop file.

    I have 50 or more photos of the weekend. I have already created an Album called 'Birthday 2015' and all images imported into this Album.  I want to review them and keep the top 25 or more.  Then cultures, change and save these 25 only to a folder on my computer desk. I want to move this folder over to a SD card or USB key to send to a family member. They want just the photo files, not a slide show or anything like that.  I want to keep the originals of all 50, as well as the finite set of 25.   This will be my first time using Photoshop elements 13 for what that this or another can touch a single image to print at home.   What is the process for this?  It is an 'event', a 'project' I drop the unwanted, those of the Album (how I do that) or simply to 'save' the finished a separate desktop file I'll?  How do I "save under" the picture over to the desktop file? 

    Thank you

    Mike

    michaelg7242004 wrote:

    I have 50 or more photos of the weekend. I have already created an Album called 'Birthday 2015' and all images imported into this Album.  I want to revisit and keep the top 25 or more.  Then cultures, change and save these 25 only to a folder on my computer desk. I want to move this folder over to a SD card or USB key to send to a family member. They want just the photo files, not a slide show or anything like that.  I want to keep the originals of all 50, as well as the finite set of 25.   This will be my first time using Photoshop elements 13 for what that this or another can touch a single image to print at home.   What is the process for this?  It is an 'event', a 'project' I drop the unwanted album (how I do that) or just 'save' finishes to a file separate from the Office I'll?  How do I "save under" the picture over to the desktop file?

    Thank you

    Mike

    Mike,

    The two following tips should help you:

    -1- creating a new album of an existing

    An album in your current catalog is a list of files, just like a playlist for audio files. If you want a selection (a subset) of these files, you simply create an empty album. Select the view original album, select the required pictures (easy if you have assigned a given star) by the shortcut Ctrl A, and then drag and drop in the new album of emptiness.

    -2-hourly using 'Export' of the Organizer.

    What you want to do, who prepares the files to a new location or media selected, is called "exporter" in the elements or Lightroom.

    When you're in the Organizer, select the thumbnails (highlighted), you must use the menu file/export or the shortcut Ctrl E. The dialogue then you box will allow to choose not only the target medium or the folder where you want to copy your files. More important still, it allows you to choose the file format and size of the exported files and it can rename them in order to preserve the custom in the album sort order.

    Which is a bit more complex is to work with the original and edited versions if you have version ' sets ' and albums at the same time. If you do not use version sets, no problem. You export originals and files published in two different lots with different subfolders.

    If you use sets of version, which means that the edited versions are attached to the original and you have chosen the version to display at the top of the version set in the navigation area. It is only as the displayed version which is exported. People are generally perplexed when they create sous-albums as described above. Whether you have your album ready for export with the edited versions. You want to export the original separately in a different folder. This would mean that you change the display order of versions to show the original as "top version" for each image. The information about the item "top version" are independent albums: If change you in one album, if the photos are also included in a different album, the 'top' of the version will also change.

    The simple solution if you want to export original and edited separately versions would be to export original first, then do the editing and export the edited versions shown in your albums.

    Once you have the version sets in your albums, you can't easily get to the originals. This would mean using the menu edition/version the value to be converted into individual elements and lose the link between the original and edited version.

    I should mention that the use of the albums is a way to use the Organizer to export your selected objects.

    If you are using categories and keywords, you can select (highlight) your files and export as explained above.

    You can also use the menu file/export to media removable (Ctrl + Shift + O) to copy to flash drive or SD card.

  • Save the text file on the desktop

    Hello world

    See my code below. It saves the text file in the root folder. But I want to save my file of text of the report on the desktop in a folder called report.

    Secondly, when I run this script twice, he adds comments twice in the text of the report file and does not replace the text file report.

    Can someone please correct this JS script.

    function write (text) {}

    var myDocName = app.activeDocument.name;

    var myFilePath1 = + ' / ' + 'Report' + ".txt";

    var monFichierTexte = new queue (myFilePath1);

    If (myTextFile.exists)

    {

    myTextFile.open ("e");

    myTextFile.seek (0, 2);

    }

    else {}

    myTextFile.open ("w");

    }

    myTextFile.write (text + "\r");

    flag = true;

    myTextFile.close ();

    myTextFile.execute ();

    If (flag == false) {}

    Alert ("no error")

    }

    }

    Thank you

    You have contradicting wishes.

    Compare this sentence

    designmon79 wrote:

    I need a code JS that replace my office report text file (if the output) and write the cool comment text in the file.

    with this

    It replaces the report file, but also delete text in the file.

    It seems obvious that if you replace the previous file, the old content will be deleted.

  • How to save external files in the logical project?

    Didn't know how to phrase the question. Here's the question. Ex: someone sent me an audio file to add to my project of logic and I have it drag my desktop and everything is all fine and good. I save the project, and then proceed to remove the audio file from my office. I then go back to open my logical project and it says that it cannot find the file. In Garageband, once I recorded an audio file project, it is always there even if I deleted it from my office. But in the logic, it does not do this. Is it sort of permanently save/integrate a file in a project of logic, so that I can remove from my desk and there not try to pick him up every time at the opening?

    Hello

    You must have the logic to copy the files:

    For new projects, use file > save and make sure that "Copy the following files to your project" is enabled for audio files.

    For existing projects, or file > save as, then check the same box

    or

    File > project settings > active

    TDC

Maybe you are looking for

  • The iPhoto v8.1.2 update

    I understand to get iPhoto to work on El Capitan, I need to upgrade to the latest version. My problem seems to be that the version I have is the original that came preinstalled on my macbook pro (v8.1.2). I can not find the new version of the App Sto

  • Implemented two-sided printing on Envy 5532

    I must say that documentation that accompanies my desire 5532 was pretty non-existent.  I use the printer with a HP Pavilion laptop wireless, an Apple MacBook laptop and an Apple iPad.  I have several questions about printing with my Envy 5532 printe

  • Error: could not find c:\windows\idew321.dll in the beginning upward

    This error at the end of the boot.  Cannot find any references to this dll through Google searches.  I got infected with a virus called system tool and wonder if the virus is still there, looking for this dll.

  • Internet connection not working is not wireless, connected to two networks

    I have a problem connecting to the internet via the wireless connection. With a cable, I can connect to the home network and the internet. However with the radio, I have local access to the home network. In the network and sharing Center, it shows th

  • Impossible to activate windows 10, because my windows 7 is OEM

    Microsoft is a MONOPOLY.   My computer had a Windows XP pro top, which worked well. I didn't want a new computer.  Therefore, I went out and bought a new hard drive and bought a windows 7 pro. Installed the hard drive and windows 7 (OEM) edition, rec