Help! Difficulty my javascript to save a bmp with suffix in the same folder as the previous record.

Here are my javascript classes:

#target photoshop

sets the preferences of the document to inches

app.preferences.rulerUnits = Units.INCHES

Our values for the RESULT FINAL width and height (in inches) of our image

var fWidth = 11.73;

var fHeight = 5.97;

var CurrentDLPFile = app.activeDocument

var CurrentDLPFileName = CurrentDLPFile.name

var CurrentDLPFilePath = "~/Desktop/fetch".

var f = File.saveDialog ("Save where?'," ");

where we double clicked on the file

app.bringToFront ();

resizes the canvas to 11.73 x 5.97 inches

CurrentDLPFile.resizeCanvas (UnitValue (fWidth, "in"), UnitValue (fHeight, 'in'));

flattens all the layers

CurrentDLPFile.flatten ();

saves to the photoshop file

If (f! = null) CurrentDLPFile.saveAs (f, undefined);

split channels

CurrentDLPFile.splitChannels ();

Also converts active K bitmap image separation

var bitsaveoptions = new BitmapConversionOptions()

bitsaveoptions. Method = BitmapConversionType.HALFTONESCREEN

bitsaveoptions.angle = 45

bitsaveoptions. Frequency = 55

bitsaveoptions. Resolution = 300

bitsaveoptions. Shape = BitmapHalfToneType.ROUND

app.activeDocument.changeMode (ChangeMode.BITMAP, bitsaveoptions);

THIS I'm HAVING PROBLEMS - I want to save the file (which at this point is a bmp), with a suffix of 1 in the same folder. IS WHERE and then close the file.

var doc = app.activeDocument;

var Nomdoc = doc.name;

docName = docName.match(/(.*) (-.) [ ^\.] +)/) ? docName = docName.match(/(.*) (-.) [ ^\.] +) /): docName = [docName, docName];

var = "_1" suffix

var saveName = new File(decodeURI(doc.path)+'/'+docName[1]+suffix+'.bmp');

function saveFile (app.activeDocument, saveName);

I thought about it, this is for someone else who is struggling with a similar problem:

var CurrentDLPFile = app.activeDocument

saves the active doc as a photoshop file

If (f! = null) CurrentDLPFile.saveAs (f, undefined);

renames the active document for everything that has been saved

var CurrentDLPFile = app.activeDocument.name

assign the location of the saved psd

var psdPath = activeDocument.path

saveBMP = new BMPSaveOptions();

saveBMP.alphaChannels = false;

saveBMP.depth = BMPDepthType.ONE;

saveBMP.flipRowOrder = false;

saveBMP.rleCompression = false;

saveBMP.osType = OperatingSystem.WINDOWS;

var doc = app.activeDocument;

var Name = doc.name.replace (/ \.) [ ^\.] +$/, '');

var suffix = "1";

var saveFile = File (psdPath + "/" + name + suffix ".bmp");

activeDocument.saveAs (saveFile, saveBMP, true, Extension.LOWERCASE);

activeDocument.close (SaveOptions.DONOTSAVECHANGES);

Tags: Photoshop

Similar Questions

  • Change hosts, I need save email on computer files, before the MX records get switched?

    Hello
    Recently, I changed web hosts and still have my email accounts set up with my former host, with pointing to the old servers MX records.

    I configure Thunderbird accounts and open my existing email accounts via IMAP, it shows all the files and current e-mail I want to keep.

    My questions are-

    Can I save my files to e-mail on my first computer or local files on TB?
    Once the MX records point again - the host of the site, then add files?

    Thank you very much for the help!

    Provide you can still access the old server and emails are still there.
    Synchronize your e-mail records to obtain a copy of the files server on your computer.
    So stop synchronization.
    switch to offline mode.
    Move emails into local folders.
    e-mails in local folders will be stored on your computer.
    When all the emails are safe in local folders, you can remove the e-mail account.

    Be aware that if e-mails have been deleted from the server and synchronize with 'empty' server, then your Thunderbird folders will be updated to match the server and you will lose your emails.

    Also, in offline mode, you can create a backup of these emails.
    Use this addon:

    How to install the addon:

    To use, do a right click on the folder to see ImportExporttool options
    See the image below.

    Note: you can also use this tool to import e-mails stored in local folders as another method to get them in local directories.

  • What happened to the Save & exit option that was in the previous version? It does not appear in Firefox 4. I used this function all the time.

    The previous version of Firefox has an option "Save and exit" from the pop-up when you exit Firefox. Version 4 does not appear to have that option. PIN tab app is supposed to replace it? I would have two options.

    Firefox stores now always the old session, and you can access it by going to the history menu and selecting "restore previous Session."

    If you want Firefox to display the message to save the session, it can be turned on again by changing some preferences.

    1. Type of topic: config in the address bar and press on enter
    2. Accept the warning message that appears, you will be taken to a list of preferences
    3. Find browser.tabs.warnOnClosepreference, if its value is set to false, double-click on it to change its value to true
    4. Repeat this for 3 preferences browser.warnOnQuit, the browser.warnOnRestart and the browser.showQuitWarning

    If you always open the last set of tabs, another approach is the following:

    1. Click on the orange button Firefox, then select options to open the options window
    2. Go to the general Panel
    3. Change the setting "When Firefox starts" to "show my windows and tabs from last time '.
  • Cannot save file \resource < labview > element to the previous version

    Hello

    I have a quick fall plugin written in LabVIEW2013, without any new feature.

    I am recording this plugin in the previous version, but I get this message: "unable to save the items in the \resource folder to the previous version.

    Even after the removal of the entire contents of my VI, I get the same error...

    What is the problem with this resource file?

    With previous versions of LabVIEW, I was able to do it without any problem.

    Thanks for your advice!

    So OR locked.  Simply copy the VI on your desktop and then register for precedent.  I can understand why they would want to prevent you from doing this since so many things change from one version to the other.  But this is all new for 2013 (just tried with 2012 and it was fine).

  • LR > PS record; back to the LR and photo shows current record up to develop; goes to the previous record. Help!

    Working in Lightroom I click with the right button on my photo and edit in Photoshop. I have saved from Photoshop and continued to work, once finished I still saved in Photoshop. Then, I made my way on Lightroom to edit the photo. Now the question here. When I'm looking at the picture in the library or double-click on the photo and the view, I see my most recent save. But the second that I develop, BOOM! My picture back to my previous save.  I did this editing process between PS and LR of hundreds of times and have not encountered this problem before. What I am doing wrong? What have I done?

    Thank you

    Garrett

    Hi garrett_s

    Which version of Photoshop and Lightroom are you using?

    Please uncheck the box "Use Graphics Processor" in preferences > Performance (if you use the CC/6 version)

    Restart Lightroom

    Let us know if this helps

    Concerning

    Assani

  • Need help to add serial port to a virtual with "Output to the file" computer in PowerCLI

    I have a requirement where I have to add a serial port to a virtual computer that is an Ubuntu operating system and the port type must be 'output to the file"with a file name specified in a data store on the same ESX host.

    Can anyone provide me with a script of powerCLI for this please?

    Thank you very much

    Suparna

    I advise you to upgrade to 4.1 PowerCLI.

    If this is not possible use the attached script that works for versions pre-version 4.1 PowerCLI.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • I need help to connect my used ipod touch. The previous owner did not mention that I needed their icloud account to set up my account icloud to the ipod touch.

    I need help to replace a previous owners icloud/apple id. So I can replace with my apple/icloud id, we use it and I was ignorant, I needed previous owners apple id replace it with mine. The previous owner just told me how to reset or to put in recovery mode, but the previous owners apple id needs to turn off find my iphone settings. If I can replace with mine. The difficulty. Help, please!

    You run into the lock of Activation

    Find my iPhone Activation Lock

    If you can't have the previous owner to do

    Turn off find my iPhone Activation Lock

    then back for a refund since yo cannot use the device. Apple isn't going to help.

    If yo cannot come back, turn the unit into the police because it is likely, lost or stolen

  • SVG, convert, bmp, with transparent, BMG.

    I have the .svg file to HAVE. I want to export / save as .bmp with transparent BG. How can I do?

    You can not. BMP is not compatible with the transparencies.

  • How to save multiple xsd with parent include references?

    Hello

    Unfortunately, I am a newbie to XDB and it is perhaps a fundamental question. But I don't get solved right now (also Google was not my friend help out me)...

    I try to save a set of xsd for XML DB (11g Release 2 11.2.0.1.0) with the data structure:

    "Demo" folder:

    mainmodel.xsd

    types.xsd

    "Demo-detail" subfolder contains:

    "submodel_a.xsd with < xs: include schemaLocation ="... /types.xsd"/ >

    submodel_b.xsd with < xs: include schemaLocation = "submodel_a.xsd" / >

    First of all, I created 'demo' and 'demo-detail' records in the XML DB repository using dbms_xdb. CreateFolder.

    I then added the xsd as resources for XML DB, for example

    declare

    v_result boolean;

    v_schema xmltype: = xmltype (bfilename ('DEMO', 'types.xsd'), nls_charset_id('ISO-8859-1'));

    Start

    v_result: = dbms_xdb. CreateResource ('/ demo/types.xsd ', v_schema);

    end;

    /

    Then I registered my types.xsd:

    Start

    DBMS_XMLSCHEMA. REGISTERSCHEMA)

    schemaurl = > 'types.xsd. "

    schemadoc = > BFILENAME ('DEMO ','types.xsd ").

    CSID = 0 >

    );

    end;

    /

    When you try to save submodel_a.xsd the same way, I get the following error:

    ORA-31000: resource '... types.xsd' is not a document of schema XDB.

    How can I solve this?

    Best regards

    Matthias

    As mentioned Marco, you have to resolve and update the related URL in a local of the schema, just copy prior to registration.

    This way, you can keep the original file intact while that correctly register the schema using absolute URLS.

    Here is a short example, assuming that all the XSD were loaded as resources in the repository, using the same folder structure:

    -It records "types.xsd' to ADDRESS ' / demo/types.xsd.

    Start

    () dbms_xmlschema.registerSchema

    schemaURL => ' / demo/types.xsd '

    (, schemaDoc-online xdburitype('/demo/types.xsd')

    local-online true

    genTypes-online fake

    genTables-online fake

    );

    end;

    /

    -He gets a local copy of 'submodel_a.xsd' located in ' / demo/details/submodel_a.xsd ' in the repository, fixes and updates include locations, then it saves:

    declare

    v_schema_url varchar2 (2000): = ' / demo/details/submodel_a.xsd';

    XMLType v_schema_doc: = xdburitype (v_schema_url) .getxml ();

    Start

    for r in)

    Select x.*

    from xmltable)

    ' for $i in fn:doc ($url) / Schema / xs: include

    return fn:resolve - uri ($i/@schemaLocation, $url)"

    from v_schema_url as 'url '.

    columns idx for ordinalite

    , path of varchar2 (4000) of schema_loc '.'

    ) x

    )

    loop

    Select updatexml)

    v_schema_doc

    , ' / Schema / xs: include [' | to_char (r.idx) |] '] / @schemaLocation'

    r.schema_loc

    , "" xmlns: XS = "http://www.w3.org/2001/XMLSchema" ' ' "

    )

    in v_schema_doc

    Double;

    end loop;

    dbms_output.put_line (v_schema_doc.getclobval);

    () dbms_xmlschema.registerSchema

    schemaURL-online v_schema_url

    schemaDoc-online v_schema_doc

    local-online true

    genTypes-online fake

    genTables-online fake

    );

    end;

    /

    (in this case the XS:include/@schemaLocation will be updated to '... / types.xsd' to ' / demo/types.xsd ')

  • Clsing Firfox 4. -for Yahoo does not save the tabs when closing like the previous versions. Your help says settings but does not tell me what setting...

    In all previous versions of Firefox, when I close Firefox, asked me if I wanted to save my tabs. The latest version does not have this option. Why not and what adjustment will bring back this feature. I don't have to pull down the menu history and ask the previous Session, I should be able to start with my previous session if I exit and not to close tabs.

    Updates should increase the functionality and NOT completely change the appearance of the program.

    Thank you

    "I asked also originally where the setting was to open Firefox with my previous tabs."

    I do not see that in your original question, above. I have provided an answer to this question in my second reply:

    • You can set this option in the Options > general change, "when Firefox opens:" to "show my windows and tabs from last time '.

    "If you receive a number of issues, I think that you and your partners might inform Mozilla user base concerns."

    1. It is not our function in his presence.
    2. You can send comments (comment box very limited; ( there will be no response to you to submit your comments) : help > submit your comments
    3. You can also make comments to the following address (there is no answer to you from the following link, more space of commentary available on this link): http://hendrix.mozilla.org/

    If the foregoing has answered your questions, please take a few minutes to return to the forum, connect and click 'Resolved' next to the answer that solves your problem of Firefox support, so that other users can find answers that have worked to solve problems. Thank you.

  • HP Envy 5530 PSC: HP ENVY 5530 PSC will not scan and save on my desktop directly from the PSC. Help!

    Help, please! My printer/scanner/copier device will scan is no longer documents if you ask the PSC analysis directly. It will scan and I would like to save the scan on my computer if I open the icon Wizard HP printer on my desktop computer and it asks from there. Nothing has changed on this computer or PSC recently and the PSC makes still copies very well.

    When I request the analysis of the PSC, here is the error message that appears: "connection error. The computer does not respond. Check if the USB cable is attached or wireless is working properly, and then try again. »

    Some info:

    The PSC shows that it is connected to the computer and I checked the connections and everything is physically connected. I also update the PSC. The PSC is certainly connected to the internet (and without wire - the light blue, no flashing lights). I have Webroot Anywhere Secure protection for my desktop computer.

    I checked the forums here and I do not see a response. Some of the help documents are dead end links so that does not help.

    I'm not sure if this is a permanent solution, but finally, I finally solved this problem.  I decided to first unplug and then plug in my router. Then I unregistered and registered with Windows 10, your previous recommendation. Then I started from scratch - unplugged everything related to the CFP and also deleted the previous PSC software installed on the computer. Then I plugged in the printer and re-downloaded software. Tested to request a scan of the PSC and it worked - double checked by stop and to remit all running and I tried to request a scan of the PSC again and it worked again. So, it seemed to be a combination of renewal with Windows 10 and setting up of the PSC from scratch, to solve this, at least for me. Thanks for your patience! I don't think something regarding my download Windows 10 had something to do with mess up the signal from the PSC to the computer and I had to put fresh once again.

  • Save this vi with labview 8.0 help

    Hi all

    There is a trade-off when you ask VBAI to use a custom VI. VBAI only accepts the screws under LabVIEW 8.0. We have developed a VI in LabVIEW 8.5 and recorded for the previous version of LabVIEW 8.0. But VBAI does not accept this VI.

    So I'm looking for someone who has the Vision installed and LabVIEW 8.0 installed that could be good enough to open my VI in labview 8.0 and just save without modification. and send it to me.

    Thxs for your help!

    OK I managed to do it

  • Cannot save as .bmp after self-aligning images

    Hello Photoshop community!

    I'm pulling my hair out over this: there is no option to save my pictures .bmp after them self-aligning. I can only put in .tiff, .psb or .raw.

    The steps to combine my images:

    1. open images

    2 change all modes of the image of "indexed color" to "RGB color" to allow me to edit more freely

    3. drag all the images in a window (the new window has now multiple layers)

    4. Select all layers

    5 Edition > automatic alignment of layers > reposition

    6. everything aligns well

    7. either leave as-is (RBG color) mode OR go back to indexed color

    8 try saving in .bmp and my options look like this

    screenshot_save.jpg

    It's so weird because it's worked for me in the past, and at times, I'll be able to save intermediate phases of my combined as a .bmp image but never the whole thing. Is this a problem with the size of the image potentially? I would like suggestions.

    Your document has more than 30,000 pixels in any dimension? Or is it more than 2 GB? Which would trigger Photoshop to present the record as options that you see. Try downsampling a copy of the image to<30k pixels="" on="" the="" largest="" side,="" or="" get="" the="" file="" size="" below="" 2gb,="" and="" see="" if="" that="">

    See the "Save large Documents" section of this page:

    https://helpx.Adobe.com/Photoshop/using/saving-images.html#save_large_documents

    Mike

  • Acrobat XI will save not filled with information. Help Obi One Kanobi, you're our only hope

    I have Acrobat Pro XI. I'm filling a 19 page request, but when I save the application and open up thereafter, all fields are empty. I tried several different save as types, but all without success. Any ideas?

    Can I convert the form or save it in a different form to keep the information entered?

    Thank you in advance for any advice you can offer.

    The chances are that the form is designed to erase when you open it. It records, but wiper and then click Open. Bad design, but some designers of forms for this, with exaggerated concerns to pick up a form previously filled in.

    Disabling JavaScript in Acrobat preferences CAN stop it.

  • Need help to decode javascript tag for the release of HTML5.

    Hi all

    I'm working on a project in Adobe captivate 7 64 bit which consists of approximately 500 slides with most of the slides in text and image. The problem that I face is very unusual that I guess I'm the first to discover (according to my searches on google and the forums). So, after I publish my project the output works very well in html (local and online) BUT when I run index.html (i.e., out of HTML5) the course is not running and the screen is blank.

    After spending a week on the search online and using the strategy of trail and error, I was able to know that it was the text of the URL "F:\usrnew\purchase" placed in the middle of the course which caused damage of all. However, the url has been removed and the project has been submitted.

    After extra time, I discovered that the "\u" letter which is a JavaScript tag was causing the problem for the release of HTML5. I don't really know much to script, but discovered that the tag can be decoded using a programming strategy. Now, this is where my knowledge comes from a standby and needs a lift from you guys.

    Any ideas, help, sharing of knowledge would be very useful to me and all who could deal with this problem in the future.

    Looking forward for your point of view.

    Kind regards

    Mirza

    Voila! The problem is resolved.

    Solution: Change the single slash "------" to a double slash "\".

    See you soon,.

    Mirza

Maybe you are looking for

  • Help to move videos from iPhone photo sharing to icloud

    I have several videos on my iPhone 5s (latest IOS) that have been shared by my family with me. I try to free up space on my iphone and would like to get out and send them to my photo to icloud account. How can I accomplish this?

  • TC wifi airport closed for all as default?

    by default, access wifi to my Airport network is open, I use the time restriction for my devices for children, but what happens if my kids get a peripheral friends and the use of the password? is it possible to close the default wifi network and then

  • Compaq Mini cq10: Contrasena system stopped

    Quisiera saber if me pueden dar the contrasena mi cell pliss lo nesesito :'( interrupted system (CNU8183YFV) Spoiler (Highlight to read)

  • Re: Windows Vista and 7 / error Code in Windows 7 Home Premium

    Just bought my first laptop and trying to connect to the internet via a Modem of GNET DSL via PPPoE. When I try to connect to the internet, I get a error Code 651: the modem (or other connecting device) has reported an error. Any ideas on a fix for t

  • Content of the file personal email lost on update of the OS

    After each update of the OS, I lose the contents of my personal e-mail files. I can't recover my inbox/trash folders as emails have been deleted on the assumption that registered mail would always be in my personal files. How can I recover the lost f