Automatic variable Change of the Place item on a action

I'm begining in the scripting area, but I'm lost realy.  I looking in a way to change the place automatic based on the filename/ folder. Today I do like this:
I'm aplying a image in the back of a photo with automate batch. My actions goes in resume like this.
set the background - to unlock the layer
Canvas size -to make the document matches the bigger image that will be the background
place- That's where I have to change every folder with a especific background.
flatten
in resume is this: I have files inside various folders , the name of the folder , is the name of the especific background that will aply to the images inside.
Today I open a image, change the place ,close.  them I do the automate batch the folder with my action, because if I put the place to bring , it will make me to especify every in every image in the folder during action.

Lost soul... I'm just a hacker I don't realy know javascript. I'm a cut and past man a theif. A script that I know that can process all files in a tree in the image processor script that ships with Photoshop.  So I took a quick look at it. In it I saw a function named FindAllFiles. This  function returns an array of all files in a tree.  Each element contains a files full path name. So you can parse out the filename and the sub directory its in.  It should be easy loop through this array and do what you want.
Here is a hack change the var tree to your image tree to see the array. I updated the hack to help you parse out the varables that you will need to do what you want.  Note that this function is recursive can handle a tree with many sub doirectory levels.  You show  a tree with only one lower sub folder level with no images in the tree root. This hack should help you see the posibilites. You  need to deside if you want a dialog,  prompts or hard code the three folders  to process the imput image tree, the background image folder and the output tree. 
You would need to replace the alert code line with code to do what you want using the varable displayed in the alert.
var tree = "C:/ImageTree";
inputFiles = new Array();
inputFiles = FindAllFiles( tree, inputFiles );
//alert(inputFiles);
for ( var i = 0; i < inputFiles.length; i++ ) {
     / Isolate File Part
     var fullName = inputFiles[i];
     var Name =  decodeURI(inputFiles[i]).replace(/\.[^\.]+$/, ''); // strip the extension off
     var imagetreeroot = "";
     imagetreeroot= Name.substr(0, Name.indexOf(tree) + tree.length +1); // stript the tree root off
     Name = Name.substr(Name.indexOf(tree) + tree.length +1);
     var imagePath = "";
     while (Name.indexOf("/") != -1 ) { // strip the sub directories path off
          imagePath= imagePath + Name.substr(0, Name.indexOf("/") + 1);
          Name = Name.substr(Name.indexOf("/") + 1 ,);
     var backgroundName = imagePath.substr(0, imagePath.length - 1); // Strip off traling "/"
     while (backgroundName.indexOf("/") != -1 ) { // strip  the higher sub directories
          backgroundName = backgroundName.substr(backgroundName.indexOf("/") + 1 ,);
alert("Image File Path: "  + fullName
     + "\rImage Tree Root: " + imagetreeroot
     + "\rImage Sub Path: " + imagePath
     + "\rImage File Name: " + Name
     + "\rBackground Name: " + backgroundName );
// Function: FindAllFiles
// Usage: Find all the files in the given folder recursively
// Input: srcFolder is a string to a folder
//   destArray is an Array of File objects
// Return: Array of File objects, same as destArray
function FindAllFiles( srcFolderStr, destArray ) {
var fileFolderArray = Folder( srcFolderStr ).getFiles();
for ( var i = 0; i < fileFolderArray.length; i++ ) {
     var fileFoldObj = fileFolderArray[i];
     if ( fileFoldObj instanceof File ) {
               destArray.push( fileFoldObj );
               } else { // folder
                    FindAllFiles( fileFoldObj.toString(), destArray );
return destArray;
Message was edited by: JJMack

Similar Messages

  • Make changes to the line item depending upon doc type n sp. GL ind in F-48

    I want to make changes to the line item depending upon the document type and special GL indication for the transaction code F-48.
    Depending upon document type and special GL indicator i want to calculate the work contract tax during simulation in transaction code F-48.

    Hi,
    You want to deduct WCT when you use particular document type and special gl indicator.
    I just want to know the reason why you want to determine the WCT based on the above conditions.
    I created WCT as withholding tax types and assigned to vendor master. So when the user booking transactions he will choose the respective WCT tax type and tax code so system will deduct the amount and the same updated in WITH_ITEM.
    Or you made a down payment request through T.code F-47 and when you want to book the actual transaction in F-48 then choose line item from down payment request.
    Give me your requirement in clear if the above is not clear
    Regards,
    Sankar

  • [svn] 4005: Change in the way item renderers lay them selves out.

    Revision: 4005
    Author: [email protected]
    Date: 2008-11-03 17:07:38 -0800 (Mon, 03 Nov 2008)
    Log Message:
    Change in the way item renderers lay them selves out. Before we were using 100% width and 100% height. Now, we're using horizontalAlign and verticalAlign to accomplish this, which are properties added to VerticalLayout and HorizontalLayout, respectively. horizontalAlign takes values "left", "center", "right", "justify", and "contentJustify". "justify" sizes all elements to the width of the component. "contentJustify" sizes all elements to the size of the largest child (with a minimum of the width of the parent component). Similar, verticalAlign takes "top", "middle", "bottom", "justify", and "contentJustify".
    The default List skin sets the VerticalLayout's horizontalAlign to "contentJustify." Most lists should use "contentJustify" or "justify" if you don't want scrollbars. If you want to change your list to a horizontal list, you change the layout to a horizontal layout. However, you must set the verticalAlign property on the horizontal layout correctly--otherwise it'll default to "top" and probably won't do what you want.
    Ran checkintests and the following mustella tests: layout, list, Group, DataGroup, FxDataContainer, and FxContainer. Some DataGroup tests were failing but should be because of an unrelated, local change. All other tests are passing.
    QE Notes: Failing tests are excluded. Please update them (I think all just need to add verticalAlign="contentJustify" in the horizontal layout case) and re-include them. Also, please write tests for this new functionality.
    Doc Notes: None
    Bugs: SDK-17198
    Reviewer: Evtim
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17198
    Modified Paths:
    flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ItemRenderer.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDataContainerSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxListSkin.mxml
    Added Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalAlign.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalAlign.as

    Hi! The only way I know of is changing the screen resolution. Tom

  • I have cleared my history and the history now automatically is cleared, but the ten items in the drop down menu continue to be there from weeks ago. How do I clear them?

    The ten items in the drop down History header continues to show ten sites that I several weeks ago. Any new sites that I have used recently or am currently using do not appear in this list. I have configured the history settings to clear automatically, but those ten old sites persist throughout all current use. How do I get rid of them?

    Entries in the location bar drop down list with a yellow (blue on Mac) star at the right end are bookmarks.<br />
    You can remove such a bookmarked item that shows in the list if you open that url in a tab and click the yellow star in the location bar.<br />
    This will open the "Edit This Bookmark" dialog and you can click the Remove button to remove the bookmark if you want to remove such a bookmarked entry.<br />

  • Automatic Price Change at the time of Confirmation of PP order

    Dear Sir,
    When Production Order is being confirmed (T Code COR6), the
    price of the BOM material (Finished Goods with standatd price)is getting
    changed. PR document type FI document is created and UMB key
    is getting the hit with a very minimum amount. (0.01 Indian Rupees) . This is not happening regularly. But suddenly in one confirmation it is happening. The process order are created in
    the system for 1 month say Start Date 01.01.2009 End Date
    31.01.2009
    This is happeing when confirmation is made in first day of next month
    for previous month i.e. for process order of January 2009 (Start
    Date 01.01.2009 End Date 31.01.2009 ) confirmation is made on the
    01.02.2009. Document date is 01.02.2009, posting date is
    31.01.2009.
    The PR (Price Change) docuement is getting generated on 01.02.2009 with posting date on 01.02.2009.
    At the mont end there is no manual Price Change thru MR21 transaction.
    Regards,
    Partha Pratim Bhar

    Hi,
    You need to check that material Standard Cost estimation has run or not for the next period. Normally Standard cost run can be run every period or once in 3 periods or once in a year. Based on this the standard cost estimate will update the material prices in the costing 2 view if any changes in the existing price. May be his could be the reason you may face the problem.
    Regards,
    V. Suresh

  • Scheduling Agreement LU: Can Route be changed in the SA item?

    Hi all,
    I noticed that in the Transport Scheduling Agreement SA type "LU"  but in general I think in any SA there is no any chance to change the route determined by the system in the shipping data within the item of SA.
    If you select Menu Item > More Functions > Shipping Data you can go an see the detail.
    Is it something I can set in customizing or the field EKPV-ROUTE is unchangeable?
    The route has to be changed in order to set the ones used for transfer stock between the two plants.
    Thank you in advance
    Andrea

    I have found a reasonable solution to my issue that perhaps it could be helpful for others who have the same problem.
    Stock transfer sheduling agreement is between two plants which are assigned to the same company code.
    Each plant is assigned to an additional customer code with its own specific ship-to-party. Both customer codes  have to be linked to the same payer in case there is an additional plant who belongs to another company code by which you debit stock transfer.
    The two customers which represent the addresses of the two plants have a specific transportation zone. There is then a node in customizing dedicated to the route determination in which you have to set the combination for the departure country/zone and destination country/zone with the proposed route.
    By this settings when you create a scheduling agreement between the two plants: "LU" type, the system values the correct route in each item of the SA according to your customizing.
    Kind regards
    Andrea
    Edited by: Andrea Brunori on Oct 21, 2010 2:45 PM

  • How to:  using the Place command in an action and remembering the source filename...

    I have a large set of product, architecture, and other subject-specific photos, that I’m preparing for a new website; all to be placed in various galleries.
    For each photo, I want it to have the same background.  If I were doing this manually, I would simply “place” the subject photo into the background, and save it – back to the original photo name.
    In other words, doing this manually, PRODUCT_001.TIF gets placed into STANDARD_BKGRND.TIF, (thereby automatically correctly sizing and centering it), and then saving the result back to PRODUCT_001.TIF; either overwriting the original, or into a new folder.   (I have the original file somewhere else, and am working with an intermediate copy).
    But since I have several hundred photos, how do I create an action (and really – a droplet) that will save the resulting file to the desired name?  Typically placing photo ‘PRODUCT_001’ into photo ‘B’, alters photo ‘STANDARD_BKGRND’, so I can’t save the result back to ‘PRODUCT_001’.  Said differently, in a droplet, each time it's run saves the result back to the same filename 'STANDARD_BKGRND'.
    The end result – I want to apply that droplet to all the PRODUCT_***.TIF files in a given folder, and end up with the same file names as before.
    Thanks in advance for your help!
    Jerry
    PS - I have no scripting experience in PS, but have written code in other applications/scenarios. 

    Actions don't have access to the document name (where the file name is).  Scripts do, however.
    If your products are sequentially numbered, you're in luck.  You can overide the "Save as command" and make sure that your naming uses a sequence which you can set to the same starting number as your product. Here is an example of how to configure File -> Automate -> Batch (assume the set and action are your hand built one)
    Instead of "Document name" you'd type "PRODUCT_" per your example and choose a 3 digit Serial number.
    The "Starting Serial #" is where you can change if your products are numbered say, 101 and up.

  • How to:  using the Place command in an action and remember the correct source filename...

    I have a large set of product, architecture, and other subject-specific photos, that I’m preparing for a new website; all to be placed in various galleries.
    For each photo, I want it to have the same background.  If I were doing this manually, I would simply “place” the subject photo into the background, and save it – back to the original photo name.
    In other words, doing this manually, PRODUCT_001.TIF gets placed into STANDARD_BKGRND.TIF, (thereby automatically correctly sizing and centering it), and then saving the result back to PRODUCT_001.TIF; either overwriting the original, or into a new folder.   (I have the original file somewhere else, and am working with an intermediate copy).
    But since I have several hundred photos, how do I create an action (and really – a droplet) that will save the resulting file to the desired name?  Typically placing photo ‘PRODUCT_001’ into photo ‘B’, alters photo ‘STANDARD_BKGRND’, so I can’t save the result back to ‘PRODUCT_001’.  Said differently, in a droplet, each time it's run saves the result back to the same filename 'STANDARD_BKGRND'.
    The end result – I want to apply that droplet to all the PRODUCT_***.TIF files in a given folder, and end up with the same file names as before.
    Thanks in advance for your help!
    Jerry
    PS - I have no scripting experience in PS, but have written code in other applications/scenarios.

    Its great that your products are cutouts layers,  Its easy to put cutouts on backgrounds and even add layer style to the product layer to enhance the composite. Still cutouts have size and resolution as  do your background images. 
    When you make composites. A document that is place in or pasted into the current document will be resample to match the current documents DPI resolution to preserve the size of the document being place or pasted in size.
    Additionally if your using place if the document being placed in does not fit within the current document's canvas size. Photoshop may scale the image to fit within the canvas.  It depends on your user id Photoshop Preference setting.
    That means you need you handle the sizes involved.
    I would think that you would want the final composite to be the size of the background image.
    You need to know its size and dpi resolution.  You must use image size on your product image and make the image have the same dpi resolution and a size smaller then the background image.  Perhas they have the same dip resolution as the background and are smaller in size. If that the cast their size are good no image resize  is required,
    Then you need to use canvas size to make the document have the same size and resolution as the background image.
    You may want to center the product layer over the canvas however Canvas size will add canvas evenly around the produt layer's layer bounds when you leave the anchor point in the center. 
    When you then place in the background image it will not be resampled for it has the same dpi resolution as the current document and it will not be scaled for it is an exact canvas size fit.  All that remains to be done is  move the current placed layer below the  product layer 
    The document name is the product image file name opened by you or by Photoshop automate batch process.

  • How to get the change mode option for the line items in SC

    Hi Everybody,
    1. when the SC has 2 line items and in that if both the line item are rejected by the approver and the requester is receiving it for accept changes and when he click on the change button and wants to change the line items of both the rejected one, the change is enable and the requester can do the changes in the line items of the shopping cart which is working fine. but in the other case
    2. when the SC has 2 line items and in that if any one of the line item is rejected and other one is approved by the approver and the requester is receiving it for accept changes and when he click on the change button and wants to change the line item of the rejected one, the change is getting disabled but for the approved line item the requester can able to do the changes.
    so can anyone help me out how to solve this issue that if any one line item is rejected in the shopping cart also it should get the editable mode when the requester wants to do any changes.
    thanks in advance.

    Hi Everybody,
    1. when the SC has 2 line items and in that if both the line item are rejected by the approver and the requester is receiving it for accept changes and when he click on the change button and wants to change the line items of both the rejected one, the change is enable and the requester can do the changes in the line items of the shopping cart which is working fine. but in the other case
    2. when the SC has 2 line items and in that if any one of the line item is rejected and other one is approved by the approver and the requester is receiving it for accept changes and when he click on the change button and wants to change the line item of the rejected one, the change is getting disabled but for the approved line item the requester can able to do the changes.
    so can anyone help me out how to solve this issue that if any one line item is rejected in the shopping cart also it should get the editable mode when the requester wants to do any changes.
    thanks in advance.

  • Pivot Table, "Insert Page Break After Each Item" Setting Only Works for the First Item Change

    I have a flattened pivot table generated from Powerpivot and I would like to insert a page break for each change in the row item.
    When I use the pivot table Field Settings>Insert Page Break After Each Item, Excel inserts the first page break then returns to normal pagination for the rest of the output.
    Is there another setting required to maintain the page breaks after the item change?
    Thanks.

    We are experiencing the same problem. Did you ever find a solution?

  • Amount in Bar Code is incorrect;Amount in the line item can be used instead

    We have a problem in our Brazil company code.
    When we have a document with value higher than 5,000.00 BRL it is subject to Pis/cofins tax. In the Boleto (paper) document the amount is after tax deducted. But we see the full amount in the Vendor line item in SAP
    When the system reads the bar code and saves this code in the vendor line item during the document change we get a warning message no."8B797: Amount in Bar Code is incorrect;Amount in the line item can be used instead".
    And the amount in the Barcode line automatically adjusts itself to the line item amount which is the pre-tax amount (full amount).
    Example: Amount in the SAP Invoice doc is R$ 6,268.72   
                   Amount in Boleto (paper) R$ 5,977.22   (after deducting PIS/COFINS) - This amount appears in the bar code but once we press enter after the warning message it automatically adjusts to R$ 6,268.72 .
    We tried few notes like 784748 to apply but it says it is obsolete. We are on ECC 6.0 Release level 11.
    Regards.,
    Raj/

    answered through SAP note 784748

  • Watch object variable change in parent

    Flash CS4
    AS2
    I've been trying to use the object.watch() method.  I've never used this before, so I'm assuming I'm pretty far off base here.
    What I have is a parent movie (_root.) that has a bunch of variables.  As the user progresses through the movie/project the variables change based on the user's actions.  Within this parent movie there is another movie embedded.  In this movie, things change based on the variable changes of the parent movie.  So, for instance, say the user gets through frame #20 and hits the "next" button in the parent movie, this triggers a variable change in the parent movie, which then causes the embedded movie to change its color from blue to red (or whatever, action doesn't matter)
    var btn1:Object = new Object();
    btn1.complete = _root.btn1_comp;
    btn1.watch( "complete", watcher);
    var btn2:Object = new Object();
    btn2.complete = _root.btn2_comp;
    btn2.watch( "complete", watcher);
    function watcher( prop, oldValue, newValue, userData )
      gotoAndPlay(1);
    So this is what I'm doing right now - this is the actions in the embedded "child" movie clip.  I'm not really sure if I'm doing this right - but basically what happens is that this is suppose to watch for the variables "btn1_comp" and "btn2_comp" in the parent movie clip (at the _root.).
    Taken from an example I saw somewhere, this should assign the variable in the root to the property of the object in the child "btn1.complete" and "btn2.complete"  - but basically what I really need, is for it to watch if "_root.btn1_comp" and "_root.btn2_comp" change...
    Anyone have any ideas on how I go about doing this from here??
    The function "watcher" - is supposed to just replay the embedded movie clip - because it has a bunch of AS that changes the state of the movie clip based on the variables it pulls from the parent - but I need it to know to "replay" itself when a parent variable changes - I can't have it continuing to replay itself because that would end in a crazy endless loop.
    Thanks for the help!
    -R.J.

    Any chance anyone can offer some insight for me on which way I need to go with this?

  • Transaction VKM1 - Changes Sales Order Line Items Custom Fileds

    Hi,
    I have a challenge to indentify the impact of VKM1 on a Sales Order Line Item Customer Enhanced Fields. When credit hold for the customer is released in VKM1, I want to prevent some of the changes to the line items in the User Exit. The Problems I am not sure, How VKM1 is calling the Transaction VA02 or those Sales Order User Exits to modify certain customer enhanced fields. I tried Activation of Break Point in Update Task but did not stop at the Break points set up in the User Exit. How does Transaction VKM1 call the Sales Orders to execute changes? Is it through BAPI or Call Transaction VA02 or some thing else.
    Can any One please help me? Appreciate Your Help in advance.
    Thanks,
    Kannan

    VKM1 uses FM SD_ORDER_CREDIT_RELEASE to release orders on credit.

  • Dynamically changing LOV whenever another item changes

    I have two items on a page that are implemented as select lists based on LOVs, product and product category. The query for the product category lov references the product item. However, changes made to the product item are not reflected in the list of values for the product category item. As I understand, javascript is needed to make the LOV for product category dynamically change whenever the product item changes. Can somebody point me to documentation which details how to do this. Thanks for your help.

    See this and some other examples on that topic:
    http://apex.oracle.com/pls/otn/f?p=31517:119
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Hiding the actions on the launched Item.

    Hi All,
        Is it possible to do configuration on UWL to hide the buttons on the launched item. In the Task view we have different items and i know we can hide some action button there by setting the "Exclude action " property in the Iview, but when the user clicks on the description the item is launched . The launched item has some action button displayed on that page. Is it possible to hide those action button through some configuration in the XML??.  Is the configuration limited to only the view and the launch configurations..once the item is launched can we control that as well. The item that is currently being launched is a standard Webdynpro Java application that SAP provided. The tasks are general collaboration tasks..so there is not much configuration done in terms of the view and the launch configuration.
    Regards,
    Rajee.

    So, you are asking that is it possible to configure the actual application that is launched from UWL? If yes, then this has actually not that much to do with UWL. You need to check out the configuration options of the corresponding application itself.
    You need to specify that which application is launched. Let's say that you have iView X that is launched from UWL. Most probably you can do some configurations to the iView itself (iView properties). Maybe you can hide some buttons etc. Maybe the application is actually configurable in backend system (in SPRO). So, you need to tell what application it is and what you want to do for it. And then it might be good idea to ask this question from the corresponding application area instead of UWL. For example if you want to configure a travel expense approval application, you can ask the question possibly from HR/Travel area. Or maybe someone here in UWL area can help if I happen to know the application that you need to configure.
    Regards,
    Karri

Maybe you are looking for

  • I can access Google, but not Gmail.

    Hi guys. I've been having trouble with my internet connection for as long as I've had my Mac (one year). For the longest time, I've repeatedly had to click the icon for Airport and then turn it off and back on again to recover my connection to Google

  • Cannot uninstall Adobe Acrobat 8 on Window 7 64-bit

    I've been running the CS3 suite on windows 7 64-bit for years with no problems. Suddenly, most CS3 applications won't open, and if they do, they lock up. So, I figure no problem, I'll uninstall and then re-install. Wronk! (1) I could not deactivate t

  • How to add new fields to Web UI

    Hi Experts, I want to add a new field on the Web UI. The requirement is very simple. I need to add a field which is shown on the available fields. The Get and Set methods are all already implemented in the context node and they are displayed with a s

  • How configurate a SAP System Registry in Web Dynpro ?

    Hi everybody, When i deploy a web dynpro application, i obtain the following error: "No default system is configured in SAP System Registry" In menu Window->Preferences->SAP AS Java, i need to register SAP instance. However, i don't know how to retri

  • My apple hard drive has 450 gigs of other what could that be? and how could I go about deleating some of it?

    so I have a 1 TB hard drive and I am trying to edit some stuff from my go pro and when looking to free up space on my hardrive it shows on about this mac that there is 453.97 gigs of other what could all this be? How could I go about deleating some o