Generate the log file for the dialog box

Hi all


I'm generating information for the dialog box as a .txt log file format. That means that if the box is checked, the log file will be give ' checkbox1 - 01.»   Check the report, sizes against the information on tickets and slug jobs"is checked


If the checkbox is not checked, the log file will be give ' checkbox1 - 01.»   Check the report, sizes against ticket and slug information on employment"is not checked


and also the entry "myText2" also needs to generate the log file


Can someone help on this... Help would be appreciated!



var l is new window ('dialogue');.

myGroup1 var = w.add ("panel", undefined, ' P & & G check the list ');

myGroup1.alignChildren = 'left ';

CheckBox1 var = myGroup1.add ("checkbox", not defined, '01.   (Check the ratio, size against the information on tickets and slug jobs");

CheckBox2 var = myGroup1.add ("checkbox", not defined, '02.   "" "Check images are linked");

var checkbox3 = myGroup1.add ("checkbox", not defined, '03.   Visually check the progress of KV/model/CP images");

var checkbox4 = myGroup1.add ("checkbox", not defined, '04.   Visually check the progress of other elements such as Logo and bottle");

var checkbox5 = myGroup1.add ("checkbox", not defined, '05.   Check the positioning of the markup language");

var checkbox6 = myGroup1.add ("checkbox", not defined, '06.   Ensure that all measures are calculated Live based area");

var checkbox7 = myGroup1.add ("checkbox", not defined, '07.   After that the resizing of the picture KV frame open to cut and bleed");

var checkbox8 = myGroup1.add ("checkbox", not defined, '08.   Complete Magenta if there is insufficient image');

var checkbox9 = myGroup1.add ("checkbox", not defined, '09.   ("To ensure that the document's bleed, crop gutter and slug information brands ');

var checkbox10 = myGroup1.add ("checkbox", not defined, '10.   Make sure that the final work is updated on the server");

var checkbox11 = myGroup1.add ("checkbox", not defined, '11.   ("Enter time cmd");

var myGroup2 = w.add ('panel', undefined, 'The operator name');

var myText2 = myGroup2.add ("edittext", undefined, "");

myText2.characters = 25;

myGroup2.orientation = 'left ';

var buttons = w.add ("group");

Buttons.Add ('button', undefined, 'Export to PDF', {name: 'ok'});

Buttons.Add ('button', undefined, 'Cancel');

w.Show ();

~ group();

~ If (myGroup1.alignChildren.value! = true) {}

~ alert ('yes')

//~ }


myDoc = app.activeDocument;

w = [];


DESCRIPTION: Make a TXT file

myDoc = app.activeDocument;

Log1 = makeLogFile (app.activeDocument.name.split('.') ([0], myDoc, true);

log (log1, app.activeDocument.name);

~ log2 = makeLogFile ("test", myDoc, false);

~ Journal (log2, "Text file log base 2");

Log1. Execute();

~ log2.execute ();

function makeLogFile (aName, aDoc, deleteIt) {}

var logLoc; path to the folder that will contain the log file

try {}

logLoc = aDoc.filePath;

} catch (e) {}

logLoc = getmyDoc (). parent.fsName

}

var queue = aFile (logLoc + "/" + name + ".txt");

If {(deleteIt)

aFile.remove ();

return aFile;

}

var n = 1;

so that {(aFile.exists)

aFile = File (logLoc + "/" + String (n) + ".txt" aName);

n ++

}

return aFile

}

function getScriptPath() {}

try {}

Return app.activeScript;

} catch (e) {}

Return File (e.fileName);

}

}

function log (aFile, message) {}

var today = new Date();

If (! aFile.exists) {}

do the new log file

aFile.open ("w");

aFile.write (String (today) + "\n");

aFile.close ();

}

}

function log (aFile, message) {}

var text = o;

If (! aFile.exists) {}

do the new log file

aFile.open ("w");

aFile.write (message + "\n" + "\n" + String (w) + "\n");

aFile.close ();

}

~ aFile.open ("e");

~ aFile.seek (0.2);

~ aFile.write ("\n" + message);

~ aFile.close ();

}

myDoc.close (SaveOptions.no);

Thanks in advance

Steve

Hi Steve,.

There are some errors in your code.

  1. function 'getmyDoc' is used, but not created.
  2. fucntion 'getScriptPath' is created but not used. (In any case, this will not give you error)
  3. function 'journal' has defined two times with the same length of the parameter.

etc...

Here, I have modified your code. Try this.

var w = new Window ("dialog");
var myGroup1 = w.add('panel', undefined, 'P&&G Check List');
myGroup1.alignChildren = "left";
var checkbox1 = myGroup1.add ("checkbox", undefined, "  01.  Check the ratio, sizes against job ticket and slug information");
var checkbox2 = myGroup1.add ("checkbox", undefined, "  02.  Check images are linked");
var checkbox3 = myGroup1.add ("checkbox", undefined, "  03.  Visually check the progression of KV/Model/CP images");
var checkbox4 = myGroup1.add ("checkbox", undefined, "  04.  Visually check the progression of other elements like Logo and Bottle");
var checkbox5 = myGroup1.add ("checkbox", undefined, "  05.  Check the placement of Language Tagging");
var checkbox6 = myGroup1.add ("checkbox", undefined, "  06.  Ensure that all measurements are calculated based on Live area");
var checkbox7 = myGroup1.add ("checkbox", undefined, "  07.  After resizing the KV image frame opened up to trim and bleed");
var checkbox8 = myGroup1.add ("checkbox", undefined, "  08.  Fill Magenta if there is inadequate image");
var checkbox9 = myGroup1.add ("checkbox", undefined, "  09.  Ensure the document has bleed, crop marks, gutter marks and slug information");
var checkbox10 = myGroup1.add ("checkbox", undefined, "  10.  Ensure the final artwork is updated in the Server");
var checkbox11 = myGroup1.add ("checkbox", undefined, "  11.  Enter time in CMD");
var myGroup2 = w.add('panel', undefined, ' Operator Name');
var myText2 = myGroup2.add("edittext", undefined, "");
myText2.characters = 25;
myGroup2.orientation = "left";
var buttons = w.add ("group");
buttons.add ("button", undefined, "Export PDF", {name: "ok"});
buttons.add ("button", undefined, "Cancel");
w.show ();
myDoc = app.activeDocument;
log1 = makeLogFile(app.activeDocument.name.split('.')[0], myDoc, true);
log(log1, app.activeDocument.name);
log1.execute();
function makeLogFile(aName, aDoc, deleteIt)
{
    var logLoc = "";
    try
    {
        logLoc = aDoc.filePath;
        } catch (e) {}
    var aFile = File(logLoc + "/" + aName + ".txt");
    var n = 1;
    while (aFile.exists)
    {
        aFile = File(logLoc + "/" + aName + String(n) + ".txt");
        n++;
        }
    return aFile
    }
function log(aFile, message)
{
    var text = w;
    var rep = "";
    if (!aFile.exists)
    {
        aFile.open("w");
        var today = new Date();
        rep += String(today) + "\n";
        rep += message + "\n" + "\n\n";
        for(var i =0;i

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • How To Generate Debug Log Files for ebs jsp?

    Hi how to generate debug log for ebs r12 jsp files?
    and where I get the journal me .please help thank you!

    Please check following Document MOS

    Oracle Application Server diagnostic tools and logs in Applications, version 12 (Doc ID 454178.1)

  • Unable to select the file in the dialog box in the Sierra

    I'm unable to select an image file in the "save for Web" in the finder window "save under" in Photoshop CC running on the Sierra.

    There are times where I need to save a new image using a similar name by selecting the existing file, which matches the name in the dialog box "save under".

    The use of Photoshop CC in Sierra I am unable to do so due to the inability to select the existing files in the Save-as the finder window.

    I thought at first that was Adobe, but later, I noticed that I can not save for web browsers and other programs. I installed the beta updates on Sierra, but also which did not set. I hope be fixed so I can move on to Sierra. It was not such a problem in previous versions.

    Unfortunately, your discovery is correct. I just met for the first time. I was shocked, but apparently it will work in list view. View miniature not a reason any.

  • How can I replace the mime types of server, always get the mp3, rar, sid, bin files directly in the dialog box "where do you want to save this file?"

    I used to be able to click on MP3 files, the way back when, and Firefox asks where I wanted to save. Nowadays, it opens a new tab with a flash drive.
    By clicking on the "unknown" files, like .sid, .prg, .zip, .rar is ' this is a BIN file. [Cancel] [Save] ». It does not give me a check box for "always do this".
    I would like that option to edit so that certain types of files, such as PDF, regardless of mimetype, always get opened in a new tab if you click. Also some types of files, based on the extension, always go directly to the dialog box "Where you want to save the file?", without worrying if there is a viewer or a builtin player or not. In my Firefox (41.0.1 14.04LTS 32-bit Ubuntu) I have never the choice "do this for these files always" more.
    Googling led me to delete my file mimeTypes.rdf and since file extensions can even "well known", such as .zip, are treated as BIN files and I get the box Cancel-or-Save for those too - again without the choice of "always save the BIN files.

    These files are send as Content-Type: application/octet-stream and Content-Disposition: attachment;
    To send files in this way, you cannot save an automatic action.
    You can see that in network monitor.

    Content-Disposition: attachment; filename="TURRICAN_AMIGA_PORT.sid";
    Content-Type: application/octet-stream
    
  • How can I change the default file locations in the dialog box "Save as" in Windows 7 x 64?

    I tried all the tips and tricks of WinXP, but they do not seem to work in Win7. Does anyone know how to change the location of the default files for the dialog box "Save as" in Win7?

    It seems, in Windows 7, that you cannot change locations by default save as file.

    In XP, we could modify the registry or use other methods to change the location of the files that appear on the left margin of the Save as dialog box. But some Morón in Redmond chose to end with good sense and called "libraries."

    I really wish Microsoft would stop doing what they think, it's the best for Grandma and little Suzy and give us what expect when we pay for these programs.

  • File copy/delete dialog box is off the screen in a staggered multiple follow Setup

    I'm on Windows 8 on a ThinkPad W520 with a 1920 x 1080 screen and a secondary antibody NEC LCD2070NX 1600 x 1200 display connected via DisplayPort. The NEC is positioned to the left of the ThinkPad and raised higher than the ThinkPad display; the bottom of the NEC is near the center of the left edge of the ThinkPad.
    I put to the top of the poster in the Panel to take account of this arrangement:
    If I have a window of the Explorer of files open in the secondary monitor on the left and use this window to copy or remove some large files or folders, the progress dialog box is not visible. It is currently displayed in the "man no of land" above the main monitor and the secondary screen.
    The problem occurs when the secondary monitor is on the right, or above or below the primary. (I have tested some of these cases, but not completely). Also, this does not happen when the Explorer window is on the primary monitor. The problem does occur at all on Windows 7.
    Here's a film that illustrates the problem. For each image, I copied a large directory on the network and took a screenshot to display side by side and move the secondary display up to about 120 pixels in the control panel every time. You can see how the copy dialog box follows the secondary monitor vertically, but her left side is pinned to the left edge of the main screen, so he ends up disappearing from the screen.
    It is easy to see what is happening here: Explorer normally centers the dialog box of progression on the same screen as the Explorer window that opened the dialog box. This does not work as expected in the direction, but on the axis X to the left edge of the dialog box's get pinned to the left edge of the main screen.
    As the corner at the top left of the primary monitor is always (0,0), it acts as if the dialog box was positioned like this pseudo-code:
    monitor = getWindowMonitor (feed)
    dialog.centerOnMonitor (monitor)
    If dialog.left< 0:="">
    Dialog.Left = 0
    When the dialog box is off the screen, it's a bit disturbing, because it makes the impression that the Explorer window is locked. The only way I know to make visible the dialog box is with this exercise of the superpowers of keyboard shortcut:
    1. use Alt + space to open the system menu of the dialog box. The menu will open on the screen no matter where is the dialog box.
    2. Press m to move (or click on move).
    3. you will see a four-headed mouse cursor, just to fool you into thinking the mouse could do something now. It will not!
    4 instead of this, you have to hit any key of the arrow, which begins the displacement of the dialog box.
    5. now you can use the mouse (or the puree on the arrow keys) to move the dialog on the screen.

    A bit of good news...

    I just tested this on the latest version of Windows preview 10 technical, and it seems to be fixed.

  • Photoshop CC 2015: what does 'contrast details' in the dialog box generate Normal Map?

    I can't find detailed documentation for the dialog box to generate Normal Map. In particular, I would like an explanation of what the sliders «Contrast Details»

    Thank you

    Barry

    Oh had.

    He set the overall intensity.

    Concerning

    Jitendra

  • I'm trying to reduce the file size of a jpeg file, but the dialog box under image &gt; image size reflects a much smaller that the file is. I saved the image after resampling and by reducing the size of the image, reduced the pip to 72 and lowered the qua

    I'm trying to reduce the file size of a jpeg file, but the dialog box under image > image size reflects a much smaller that the file is. I saved the image after resampling and simplistic image, the pip size reduced to 72 and lowered the low quality only to see the minimum file size reduction. Why the dialog box in photoshop gives me a different file size than my computer and how do I solve this problem? Thank you!

    The Image Size dialog box dialog box shows the uncompressed size.

    Your operating system (Explorer/Finder) shows the size compressed. (size on the disk)

    If you use save for Web, you can see the compressed size, but also an overview.

  • Why can't I get a glimpse of the indd files in the dialog box to open InDesign?

    Hi all

    It is unfortunate that Adobe does not add a plugin to display a preview of any Adobe source file in Windows Explorer (I mean, except for the PDF but I think that Microsoft did this).

    But I think it's ridiculous that I can't preview the source .indd inside the dialog box to open InDesign files. He says just, "no preview available". I am sure that this failure is related to what Windows can preview... again, not a good excuse!

    It is also the same problem in Illustrator and Photoshop... or program Adobe can get a glimpse of their own file format!

    WHY?  OR how can I fix this?

    [UPDATE: SageThumbs |] [SourceForge.net seems to partially work on several Photoshop files (works reasonably well as long as I limit the file size to 70 mb), it doesn't seem to work with Illustrator files (despite the claim), and it does not work on InDesign.]

    Yet the question remains: why Adobe is not taking responsibility for this?

    I think that for the dialog open regularly, Adobe wants to use operation

    Open the file integrated system of dialogue, so that users are familiar with it.

    and also if they can use the peculiarities of their OS (Windows vs

    Mac have different habits).

    And to solve your problem, they created Bridge (and even Mini Bridge).

    He could theoretically get into the habit to use to open the files,

    That is, instead of file > open it just click on the bridge icon.

  • reason for commas not allowed in the dialog box select text resource

    Hello
    I use jdev 11.1.2.2 and I was quite surprised by not being able to put the comma in the key in the dialog box select text resource. This behavior forces me to change the resource group by hand and not through this dialog box.
    Is there a reason for this undocumented? Because in my teams, nobody thinks that something like:
    mainTable.header=header Text
    secondTable.header=different Text
    is worse than the variant with underscore...

    If I interpret things the way that I think you mean, for example in the dialog select a text key resource cannot be a string without a period (or comma never seen that myself) as a separator, then the explanation is simple.
    This function of "convenience" of a resource string mapping depends on the access of the implicit getter of the Expression language.
    for example, the created EL is in the form #{viewcontrollerBundle.key}, which corresponds to the bundle.get ('key'); in terms of java.
    To support the use of the period (or the comma!) inside the key, the generated form will have to implement: #{viewcontrollerBundle ['key']} otherwise an example like this:
    #{viewcontrollerBundle.mainTable.header} would be generated which, in words EL would be mapped (as a Variant) with bundle.getMainTable () .getHeader () because of the way periods are interpreted in EL.
    So basically, the dialog box is properly in the light of the real EL that is generated.
    All this side - it is a known restriction and 12, we changed the EL format to the more flexible form in this case and therefore the dialog box will accept periods.

  • Choose the file or folder dialog box?

    Is it possible to get an open/choice dialog (via the button) which will allow the user to select a folder or selections several files?

    I tried to use File.openDlg (), File.openDialog (), Folder.selectDlg () and Folder.selectDlg (), but these methods only appear to allow the user to select the type of object associated with the method (i.e. File.openDlg () only allows the opening of a file, and Folder.selectDialog () only allows the selection of a folder)

    The documentation states that the Folder.selectDialog ():

    Opens the dialog of exploration of a built-in platform-specific files and creates a new file or folder object
    for the selected file or folder. Differs from the selectDlg() method object because it is not
    pre-select a file.
    If the user clicks OK, returns an object file or folder for the selected file or folder. If the user cancels,
    Returns a null value.

    However by using the following code, I get the dialog box, but the individual files are dimmed:

    Choose_btn.onClick = function(){
            Folder.selectDialog();
    }
    

    var fileOrFolders = File.openDialog (undefined, undefined, true)

    The user who will select several files or folders and return an array of file or folder objects. Your code would have to check each item to see if it's a folder or in the case of a file, it is an image file is valid.

  • How can I get a "Détails" view - as the default - when you download a file, in the dialog box "enter the name of the file to save on...» » ?

    When I get an attachment to an email (using Zimbra Imail, Firefox, Windows XP Pro) and I click on it and select 'Download', I get the dialog box "enter the name of the file to save on...» "(because I already have the option"always ask me where to save files. "But the view of default file always in a 'list '. At least recently. I don't remember it always does this. In any case, I want the value default to a 'Détails' view, in ascending order, I can find then things so much faster that way. (I often use the 'Update' tab to bring up, the latest version of a file.) I know that I can go to the Menu 'view' icon and select 'Détails', but whenever I go in a sub-folder in this dialog box, I have to do this all over again and it wastes a lot of time and attention.

    I did some research on the internet but have not found a way to solve this problem.

    Try this:

    a. open my documents, press the alt key.

    b. click on Tools. Click on folder options.

    c. click on the view tab and select Reset and check records.

  • When you delete a file in Vista, the dialog box remove does not close until the computer is restarted

    When you delete a file in Windows Vista, the dialog box remove don't close until the computer is restarted. It is sometimes possible to remove it by closing tha task list. When this is done, the Explorer is closed and restarted.

    Hi Brian,.

    (1) since when are you facing this problem?

    (2) remember to make changes?

    Method 1: Run the fixit available in the link below and check if that makes a difference

    Difficulty of broken desktop shortcuts and common system maintenance tasks


    Note:
    Fixit would attempt to recover bad sectors on the hard disk, in the course of this process there are chances of data loss from that particular area.

    Method 2: If a Protection of resources Windows (WRP) file is missing or is damaged, Windows may not behave as expected. Auditor of file system (CFS) scan to fix all of the corrupted system files. To do this, follow the steps mentioned in the link below:

    How to use the System File Checker tool to resolve missing or damaged on Windows Vista or Windows system files

    http://support.Microsoft.com/kb/929833

    Method 3:  Select the boot and then check if the problem persists

    Follow step 1 in the link below,
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    Important: n ' forget not to put the computer to a normal startup follow step 7 in the link.

  • My problem is that when I try to save an image from Adobe Photoshop by using the 'save for Web' half of the dialog box does not appear.

    I use a Vista Home Premiuim Windows in an Acer Aspire One 10.1 "." My problem is that when I try to save an image from Adobe Photoshop by using the 'save for Web' half of the dialog box does not appear. Can someone help me please?

    Here is a screenshot of my problem...
    [IMG] http://i55.tinypic.com/of5w01.png [line]
    Help me please.

    Hello

    1. were you able to see the front dialog box?

    2. did you of recent changes to the computer?

    This happens because your screen resolution is less than the required minimum of 1024 x 768.

    You can try to change the resolution of the monitor and check.

    For more information, see the link:

    Change settings display on multiple monitors

    Change the screen resolution

    You can also refer to Adobe support links and also post your request in the Forum from Adobe for assistance:

    http://forums.Adobe.com/thread/433020?TSTART=0

    http://kb2.Adobe.com/CPS/403/kb403268.html

    http://forums.Adobe.com/community/Photoshop/photoshop_windows

    Hope this information is useful.

  • Could not open the dialog box of .msi files saying find a program to open the file type

    In time, I used msi files to install many programs. But I know longer really since then, msi files could not open. Now, I can't open the msi installer, which I had used to install programs. When I click on the msi file, it displays a dialog box saying find a program to open the file type.

    Hello

    1. Were there some recent changes to the computer before the show?

    Method 1: I suggest you unregister and re - register the windows setup program and check if that helps you. To do this, please follow the steps below:

    Unregister and register the Windows Setup program again

    (a) click Start, click run and then type cmd in the dialog box, and then click command prompt.

    (b) at the command prompt, type the following and press ENTER after each line:

    MSIExec /Unregister

    MSIExec/regserver

    Method 2: When you run an .exe on a Windows XP, Windows Vista or Windows 7 computer file, the file can start another program.

    http://support.Microsoft.com/kb/950505/

    Method 3: Change default programs using Set Program Access and computer defaults:
    http://Windows.Microsoft.com/en-us/Windows7/change-default-programs-using-set-program-access-and-computer-defaults

    Changing the programs Windows uses by default: http://windows.microsoft.com/en-US/windows7/Change-which-programs-Windows-uses-by-default

    Hope this information is useful.

Maybe you are looking for