How to get script to save up one level

Here is my basic script so far:
if (activeDocument.width > activeDocument.height)
doAction("WalletName H_Right","X-Key Logos.atn");
else if (activeDocument.width < activeDocument.height)
doAction("WalletName V_Right","X-Key Logos.atn");
I want a script that will save my current edited Photoshop CS3 open document image (stored in a folder called Client/jpg) and save it into a Client/edit folder.  In other words I want it to go up one level from the jpg folder to the Client folder then save into the "edit" folder that is in the Client folder.
I want it to save as Jpeg, Level 8.
In another script I use this to save the file as jpg level 12 into the same folder and append to the name:
var CurrentFolder = activeDocument.path;
saveFile = new File(CurrentFolder + "/" + imgName + "_" + "wal")
   saveOptions = new JPEGSaveOptions();
   saveOptions.embedColorProfile = true;
   saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
   saveOptions.matte = MatteType.NONE;
   saveOptions.quality = 12; //ranges from 0 to 12
   AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
But in this case I just want it to save with same name jpg but level 8 in a differnt folder.  The Client/jpg folder will be different everytime.  "Client" refers to the client's name so that folder is not always in the same location. So what snippet of code can be placed into the saveFile area to say go up one folder and save to "edit" folder with the open document's current name.

Ok I am not sure where to put it.  This is what I got so far now:
//Determint wether document is Horizontal or Vertical and run that action
if (activeDocument.width > activeDocument.height)
doAction("DigiPhoto H","X-Key Actions.atn");
else if (activeDocument.width < activeDocument.height)
doAction("DigiPhoto V","X-Key Actions.atn");
// Write file up one level into "digipics".
var CurrentFolder = activeDocument.path;
var parentFolder = decodeURI(activeDocument.path.parent);
$.writeln(parentFolder);
saveFile = new File(parentFolder/digipics, imgName)
   saveOptions = new JPEGSaveOptions();
   saveOptions.embedColorProfile = true;
   saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
   saveOptions.matte = MatteType.NONE;
   saveOptions.quality = 8; //ranges from 0 to 12
   AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
It does the first actions and saves but prompts for where and what size.  What exactly does this need to look like so that it saves level 8, jpg without prompting and saves to the up one level folder as discussed earlier.
I have searched and can't find anything.

Similar Messages

  • How to get all the values in one column of a JTable

    How to get all the values in one column of a JTable as a Collection of String.
    I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column.

    I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column. You could always write a custom TableModel that stores the data in the format you want it. It would probably be about 50 lines of code. Or you could write a loop in 3 lines of code. I'll let you decide which approach you want to take.

  • How can I script moving paths from one file to another?

    Hello. I have 1 image with various color correction layers. The other is the exact same size but only contains paths. How can I script moving paths from one file to another? Thanks, in advance, for any help you can offer. Thanks!

    Thanks! This one actually worked for me. Thanks for your help.
    http://forums.adobe.com/message/3305389#3305389

  • How can I see if my program is for more than one user? We think we have bought in design for more users, but can not find out how to get in for more than one?

    How can I see if my program is for more than one user? We think we have bought in design for more users, but can not find out how to get in for more than one?

    If you bought a CC for team, you can log in at http://adobe.com and insert the e-mail that you gave at the moment at the purchase and than you can manage and see you product/plan/team.
    If I was not clear you can use the following link to help you solving your issue:
    Creative Cloud Help | Manage your Creative Cloud for teams membership
    If your not clear about this situation, contact with an agent of Adobe, by chat or phone. Use the following link to see the type of support you have on this matter:
    http://adobe.com/getsupport
    I think this will help you.
    Regards

  • Every time I try to download the new version of Adobe Flash Player it saves as a .txt file and I do not know how to get it to save in the correct format.

    Every time I try to download the new version of Adobe Flash Player it saves as a .txt file and I do not know how to get it to save in the correct format.

    Please post in the Adobe Flash Player forum.

  • How to get automatically batch no in delivery level?

    Dear Expert
    How to get automatically batch no in delivery level?
    Thanks for Advance

    hi,
    answering to your question.
    please go IN SPRO - LOGISTICS GENERAL - BATCH MANAGEMENT - BATCH DETERMINATION AND BATCH CHECK &  you need to CONFIGURE what ever comes in the name of SD.
    hope this clears your issue
    balajia

  • How to get a file save dialog box on button click

    Hi All,
    I have  some text  and I want to write this text in to a  file.Then I want to save this file to my local system using a file save dialog box so that I can choose the location where I want to save this file.Please tell me how can I do this in WebDynpro.
    If I cannot get the File save Dialog Box then how can I give the path while creating the new file so that it is created on my local system  as the application is running on server.
    Regards
    Rahul

    Hi Rahul,
    Sometime back I was also facing the same requirment and there are only two solutions to it one is what Armin suggested to use the file download UI element the other one you can get from this link How to write a file on our local machine using Web Dynpro
    Regards
    Sid

  • How to get script fonts

    I need to publish  texts in handwriting script fonts. How to get them in PDF format?

    Hello,
    you could have a look there: Handwriting font creator
    What concerns fonts I would search https://www.google.de/search?q=pdf+handschriften&ie=utf-8&oe=utf-8&gws_rd=cr&ei=8Hj4VLjiAo nBOfjSgIgE#q=handwriting+fonts… use one of these fonts in Word and convert it into a pdf file.
    Hans-Günter

  • How to get a value from  select one choice (created by static view)

    Hi,
    Whene ever Iam trying to get value from select one choice which is created by static view iam getting only index.How to get the actual value in 11g .please help me anybody .Thanx in advance....
    Edited by: 874530 on Jul 22, 2011 11:05 PM

    Thnax for your quick reply..
    Iam using 11.1.1.3.0 version.
    My code is
    <af:selectOneChoice value="#{bindings.DenialLevel.inputValue}"
    label="#{bindings.DenialLevel.label}"
    required="#{bindings.DenialLevel.hints.mandatory}"
    shortDesc="#{bindings.DenialLevel.hints.tooltip}"
    id="soc2"
    valuePassThru="true"
    binding="#{backing_denialcomment.denialLevelList}">
    <f:selectItems value="#{bindings.DenialLevel.items}" id="si6"/>
    </af:selectOneChoice>
    and in bean am not able to get value of attribute .Iam getting only index...

  • How to get a value for Select One Choice in the backing bean

    Friends,
    Does any one have any idea, how to get the value of a selected item value from the Select One Choice component in the backing bean iin valueChangeListener method. Right now I am always getting the sequence of the selected item, instead the actual selected value. I tried using 'ValuePassTrhough=true' also.. but didn't help
    Below is the my code snippet
    <af:selectOneChoice value="#{bindings.country.inputValue}"
    required="#{bindings.country.hints.mandatory}"
    shortDesc="#{bindings.country.hints.tooltip}"
    id="soc1" autoSubmit="true" valuePassThru="true"
    valueChangeListener="#{pageFlowScope.Bean.onValueChange
    <f:selectItems value="#{bindings.country.items}" id="si2"/>
    </af:selectOneChoice>
    Thanks in advance.

    check my other post at Re: Pass data from a variable to another page

  • How to get video of more than one security camera in java

    I want to get video from more than one security cameras and i really donot know yet how we do this that get videos continously with more than one camera
    olz i a beginner help me

    Hello.
    I don't know if the topic still matters, but as I took advantage from the information in the preview posts, I decided to give my share.
    I successfully ran three webcameras at the same time in a Linux machine with JMF.
    The two main issues are:
    1. It is necessary to run the binary "jmfregistry" ($JMFHOME/bin/jmfregistry) to detect the cameras every time a new one is added to the system. (Remember to run the binary with a user with write privileges on the registry file ($JMFHOME/lig/jmf.properties)).
    2. It is mandatory to plug each camera in a different usb bus. In my case, the PC I was using had three accessible two-ports buses, two in the rear and one in the front of the box. If we try to use two cameras in the same bus, one of them won't work or the detecting procedure in the "jmfregistry" program will hang.
    I hope it helps. Any question, please feel free to ask.
    Andr� Braga
    My configuration:
    Java:
    Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
    JMF-2.1.1e_linux_native
    The machine:
    OpenSuse Linux version 10.2 (kernel 2.6.18.2-34-default)
    running in a Celeron D processor 2.66 GHz
    Motherboard: Giga-byte GA-8IPE1000 Pro2 motherboard (865PE)
    The result of the "lsusb" command:
    Bus 004 Device 004: ID 0ac8:303b Z-Star Microelectronics Corp. ZC0303 WebCam
    Bus 004 Device 001: ID 0000:0000
    Bus 005 Device 001: ID 0000:0000
    Bus 001 Device 001: ID 0000:0000
    Bus 002 Device 023: ID 0c45:6007 Microdia
    Bus 002 Device 001: ID 0000:0000
    Bus 003 Device 004: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 WebCam
    Bus 003 Device 001: ID 0000:0000
    In time (for linuxers): It was necessary to download and install the gspcav driver (http://mxhaard.free.fr/). It is also necessary do load this driver before the camera driver:
    modprobe gspca
    modprobe zc0301 (this one comes with the distribution)

  • How to get majority of speed on one device

    I have multiple devices on the e1200 router and i am trying to figure out how to get majority of the speed on one device.
    And give all the other devices low speeds.
    help?
    Solved!
    Go to Solution.

    Hi Capo202, you can try to use the QoS settings of the router. Just access the setup page of the router and look for this page http://ui.linksys.com/files/E1200/2.0.00/qos.htm. Hope this can help you.

  • Magic Packet - How to get my router to send one

    I have the Quantum Gateway 1100 router.  I have a NAS Server on my home network.  The NAS server has the capability to Wake on LAN if the router can send that packet.  Can anyone tell me how to get the router to send the Wake-on-Lan packet to the server.  FIOS Tech Support is completely and totally useless.

    Hi,
    You can do a fresh installation using the installer bits available at the following link/location Download CS5.5 products
    For suites, you need to download and copy both .7z and .exe in the same folder. Clicking .exe will extract all relevant installer files. You can then install the suite. Use your existing Serial number when prompted.
    regards
    Aj

  • How to get 2 columns data in One Column

    Hi,
    I have requirement like below
    EName       Sal
    Smith         1000
    Scott          2000
    Miller          3000
    I want to display this two column like as follows
    Emp
    Smith
    1000
    Scott
    2000
    Miller
    3000
    Thanks & Regards,
    Hari Babu

    Hi,
    That's called Unpivoting.
    In Oracle 11.1 (and higher) you can use the SELECT  ... UNPIVOT feature. For details and examples, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_10002.htm#sthref6810
    In any version of Oracle, you can cross-join your table to any table or result set that has at least 2 rows, and use CASE (or DECODE) to get the results you want.
    Remember that a column can only have 1 datatype: it's impossible to have a column that's a VARCHAR2 on some rows, but a NUMBER on other rows.  You'll have to convert some data so that everything in the 1 output column has the same datatype.  There's no way to express 'Smith' as a NUMBER, but you can convert all the NUMBERs to strings.
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements), and also post the results you want from that data (if not what you posted already).
    Post your best attempt at a query.  Point out where it is getting the wrong results, and explain, using specific examples, how you get those results from the given data in those places.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How to get the measure total at row level for another measure calculation in DAX?

    Hi There,
    Using DAX, I am trying to get an expression for a calculated measure as follow:
    So basically, I would like to get the AMeasure total highlighted in yellow in the A2Measure calculation:
    Smeasure -(Ameasure total * WMeasure) where Ameasure total is the one highlighted. 
    I think my question would be how to get the total of a measure in order to used in the calculation of another measure.
    Thanks and best regards,
    Joss

    Hi Joss83,
    If you're trying to get the result for [AMeasure] at the total level (i.e. 5.09 in your example) you can do this by creating a version of this measures that is evaluated after ignoring the filters (indirectly or explicitly) placed on
    the 'Customer' and 'Player' columns. You may also need to ignore the filters place on some other tables or columns that must be ignored in order for the correct total to be returned.
    Without knowing much more about your data model, I can only take a vague guess as to what this calculation would look like in your scenario:
    AMeasureTotal:=
    CALCULATE(
    [AMeasure],
    ALL(Customer[Customer]),
    ALL(Player[Player])
    You can read more about the 'ALL' DAX function here:
    http://technet.microsoft.com/en-us/library/ee634802.aspx
    Hope this helps,
    Michael

Maybe you are looking for