Tweaking a script to complete transform and also add scale variables

Hello,
I am trying pick up bit and pieces on how to script photoshop. For the most part I can do what I need by mixing it with applescript. My current issue is taking a layer, setting the anchor point to set specific location (see below), scale it and complete the task with no user interaction. I found the below script which which will let me pass variables to set the anchor points (sweet). Now I am wondering if anyone can help me figure out how to add two more variable for the scaling. Since I am passing variable I don't need user interaction which this current script seem to want.
Part one: Set Anchor points — Done
Part two: Scale layer — Not sure
Part Three: Turn off user interaction — I am think I just need to change line 15 "DialogModes.ALL" > "DialogModes.NO"  Can anyone confirm?
Any help would make my life a lot easier. I have to scale an image 10,000 times and this is the only thing holding me up.
function transform( x, y) {// anchor position as pixels 
    var desc = new ActionDescriptor(); 
        var ref = new ActionReference(); 
        ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') ); 
    desc.putReference( charIDToTypeID('null'), ref ); 
    desc.putEnumerated( charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsi') ); 
        var desc7 = new ActionDescriptor(); 
        desc7.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Rlt'), x ); 
        desc7.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Rlt'), y ); 
    desc.putObject( charIDToTypeID('Pstn'), charIDToTypeID('Pnt '), desc7 ); 
    desc.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Prc'), 100 ); 
    desc.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Prc'), 100 ); 
    desc.putBoolean( charIDToTypeID('Lnkd'), true ); 
    desc.putEnumerated( charIDToTypeID('Intr'), charIDToTypeID('Intp'), charIDToTypeID('Bcbc') ); 
    executeAction( charIDToTypeID('Trnf'), desc, DialogModes.ALL ); 
transform( 584, 330) //looking for add variables for the x, y scale box

To change the scaling add two more arguments to the function and use those in the lines instead on the "100"s
    desc.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Prc'), 100 );   
    desc.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Prc'), 100 );
Part Three: Turn off user interaction — I am think I just need to change line 15 "DialogModes.ALL" > "DialogModes.NO"  Can anyone confirm?
Simply testing that for yourself should hardly take more than a couple of minutes.

Similar Messages

  • Add Material No. and Serial No. to Component of IBase and also add warranty

    Hi Gurus,
    Can any of you tell me how to add a "Material No." and "Serial No." to the component of an IBase and also add warranty to this component. It is manually done through IB52 by changing the values on-screen for the components attached to the IBase.
    Please suggest me any function module to update/change details of a component of the IBase. Urgent. Will be rewarded.
    Thanks,
    Rahul

    Hi,
      try with these function modules.
    BAPI_ECRMISUTO_INIT
    CRM_IBASE_INITIALIZE
    CRM_IBASE_SAVE
    CRM_IBASE_COMP_CHANGE
    Regards
    Srinu

  • I want my wife to be able to see my calendars on my IPad /I phone on her mac and for her to add to it . She can then see my work movements and also add in any important events from home life. Can it be done without sync of email and contacts?

    I would like my wife to see my calendar on her mac from my iPad so she knows my work movements and can add in any important events I need to be aware of at home. Can I do this without upsetting her mac/iPhone arrangement and without sync of contacts and email?

    I'm not sure how iCloud will handle this, but I believe it will allow something along these lines - cloud syncing of the calendar between two. For now, you could just move your calendars to Google calendar and sync it to your iPad - then - you can subscribe to each other's calendars, give priviliges to add events to them, etc.

  • I have ipad air 32 wifi, I have some problems in opening websites by safari, the loading of a websites does not complete. And also it is a little slower in facebook app as compared to ipad 4 and iphone 5s. Can u help me please I was very disappointed

    I have ipad air wifi, I have problems in connection, in safari most of websites won't load it only a white page appears with message safari cannot load ....
    The websites like apple.com, yahoo.com, facebook.com, comed.uobaghdad.edu.iq, ....
    Also if I open facebook app it's slower in loading posted images than the new ipad ( ipad4) and iphone 5s.
    I was disappointed because of safari problems can you please help me ??

    You may have to close all apps in the multi-task window
    1.Double-click the Home button.
    2. Swipe the app's preview up to close it.

  • Ever Since iCloud and HOmesharing, my playlists are completely empty and also most of my music has an exclamation point next it and when I click "get Info" and "find", it says it can't be found...

    ...I am really upset.  I waited a long time before calling tech support b/c I knew it was going to be a nightmare.  I'm 2 hours into a call with no resolution....
    MOST OF MY MUSIC FILES HAVE AN EXCLAMATION POINT NEXT TO THEM. Many were from 100s of cds I've burned over the years (ever since the first iPod came out), and the rest were iTunes purchases. I can't tell which is which at this point but in my iPhone, on our iPods, on my iPad2, and my iMac....all of my playlists are empty.  I distraught....It's years of building.  Please someone, help me!

    Ok, I had a glitch, forced to restart, and lost my train of thought.
    Reinstalling iTunes should fix the major issue that might have gone wrong, perhaps your explaination points will disappear and everything will be peachy again.
    But if they don't, you can open the XML file in iTunes Folder using a Text edit program to see what the common pathname is to the iTunes Music folder or where your content is located.
    If you moved the itunes folder, it needs to go back.
    I can't  download iTunes to my Vista virtual machine to test it out right now because iTunes is down, so I can't verify the pathname, perhaps your issue and the iTunes being down are related somehow?
    You don't want to import all your music again, but it's a option, but you lose all your playlists, that's what I'm trying to recover.
    If oyu don't have a whole lot of playlists, then simply select all the explaimation point music and delete, select File from the menu and import your itunes folder again.

  • I have an iPad mini in my classroom and a personal iPad at home; I am trying to set up folders on my personal iPad and also add my personal icloud account to the icloud email management on my pc at school; how do I do these tasks at work or home

    How do I set up folders on icloud from my personal ipad and add my personal icloud e-mail to the icloud management on my pc at work to manage email for work and personal iPads

    I have 5 different e-mail accounts I access from school now
    I have folders to store emails from gmail and for icloud emails accessed from my pc
    I need to use folders when accessing emails from my ipad
    I have folders when I access and use gmail from my ipad
    I also don't know why you need to know why, just what

  • I want to edit cards in address book and also add notes.

    I have edited address book card frequently over the years. I have also added to the notes section. Editing used to require clicking Edit but adding notes could be started by just keyboarding the desired note.
    Recently I can do neither of these functions. The help documentation talks about hitting the Edit button but it seems to have disappeared. The documentation is silent on adding notes.
    Recently to cure this I set up permissions for the Libraries and had every enclosed file updated to allow me to do anything. This does not appear to be the cure for this.
    Has anyone had this problem?
    I have spend many, many hours since installing Lion sorting out these kinds of problems. Changes to settings seem to come with updates. I wonder if anyone at Apple knows about this issue.

    Hi Mark.
    The same issue in this post, and solve it!!!!!!
    https://discussions.apple.com/message/16592940#16592940
    I hope YOU solve this. Perhaps you may be repair permissions too.
    Search in this support how to make this. I tell you how
    Start the Mac and press cmd + R. Menú utilities/terminal. This open terminal and you may write "resetpassword".
    This open the app and open the window app RESET PASSWORD (but we NOT RESET THE PASSWORD in this Action, only the permissions user and ACL).
    Ten select the hard drive in the window that you want to restore permissions. In the List below select the user account you want to repair permissions. In the botón of the window PRESS in the bottom of the section REPAIR PERMISSIONS AND ACL. this Action takes several minutes in my MacPro.
    Good luck!!!!

  • Where do I find the "Tag" button to actually tag an email and also add a new tag? Can't find these since migrationg from, .W- XP to W-7

    Wityh thanks,
    BAM at <[email protected]>

    I use right-click. Never had a "button".
    If you use them a lot, you'll quickly learn the number values, then hitting the appropriate number key will also tag. 0 (zero) clears tags.

  • My iphone 4's display is completely blackout and even its battery is not charging. I tried to restart my iPhone by pressing home and on/off button but it is also not worked. Now I'm in Nepal and here not even a single apple service center. What to do? Ple

    Its been one month, my iphone 4's display is completely blackout and even its battery is not charging. I tried to restart my iPhone by pressing home and on/off button but it is also not worked. Now I'm in Nepal and here not even a single apple service center. What to do? Please help me.

    You clearly did not notice that you have joined a USER TO USER COMMUNITY FORUM
    This is NOT Apple ,Apple do not read nor do they  therefore respond
    So if you would like to wind your neck in ........................
    try a reset of iPhone and then a restore,best, as new and if it then functions correctly try restoring with your backup

  • What is the best way to recycle 2010 MacBook? Also, it is completely dead and cannot erase hard drive.

    What is the best way to recycle old 2010 MacBook?  Also, it is completely dead and I cannot erase hard drive.

    Depending on where you are located, country, region, etc, you may have options should
    you wish to have it professionally restored or repaired to function properly again...
    Even an Apple Store with Genius bar could, in several locations, give the product a look
    and perhaps be able to diagnose the underlying issues. However that varies with the
    degree of failed components and what is really wrong with it. A battery and a new HDD
    could be all that's wrong with it. A diagnostic is often free, even on out-of-warranty Mac
    at the Apple Store genius bar; an appointment is advised.
    However if you only wanted someone to extract the hard disk drive and attach it to
    a 'universal USB drive adapter kit' so at to try and access any readable files on it,
    that is something that could be done at an Apple Authorized service provider; as
    some of them may even have a section of resale products such as this adapter kit.
    An example of this kind of kit includes wires, adapter parts, & a separate power supply
    so it can be used to run the hard drive's electronics. This is not intended for permanent
    use, but works like a set of patch cables to access the bare drive without an enclosure.
    https://www.ifixit.com/Store/Mac/Universal-Drive-Adapter/IF107-108-1
    Another kit example says it'd work with almost any HDD or SSD of several build types:
    http://eshop.macsales.com/item/NewerTech/U3NVSPATA/
    Companies that specialize in restoring Apple portable computers can give you an estimate
    on a repair and the good ones can do that without a fee; they will not start a repair after they
    see the computer until you get the estimate, and approve of the repair. If other items are
    found to be of interest requiring other work or parts, they will also contact you, again before
    continuing. One of these kinds of companies I know about (half a hemisphere away) is in
    the eastern US, and worth inquiring of even if you are overseas. wegenermedia.com.
    While I have no connection with any of these products or service suggestions, they do have
    some variety of good reputation (ifixit.com has DIY repair guides; macsales has parts, etc.)
    in standing, among many Mac users across a section of the planet...
    Any concerns about the data on the hard disk drive should be able to be answered by a
    local Apple independent; they also should have the universal USB drive adapter locally.
    Not sure if I answered your inquiry, but there are different ways of approaching this matter.
    Good luck & happy computing!
    edited

  • Why when i set my mac in sleep it starts alone and also complete stop without I do anything (Mac mini Mid 2011 - Yosemite)

    Why when i set my mac in sleep it starts alone and also complete stop without I do anything (Mac mini Mid 2011 - Yosemite)

    in response to lllaass
    here what I copied from Console:
    27/12/2014 02:29:58,457 WindowServer[185]: WSGetSurfaceInWindow : Invalid surface 1336265605 for window 268
    27/12/2014 02:30:02,516 WindowServer[185]: WSBindSurface : Invalid surface 1040636110 for window 266
    27/12/2014 02:30:17,370 com.apple.xpc.launchd[1]: assertion failed: 14B25: launchd + 160118 [55B9FF23-B298-321A-B776-CF7676586C04]: 0xe
    27/12/2014 02:30:17,371 com.apple.xpc.launchd[1]: assertion failed: 14B25: launchd + 160118 [55B9FF23-B298-321A-B776-CF7676586C04]: 0xe
    27/12/2014 02:30:18,819 Office365Service[2012]: WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.1 instead of 10.10.1. Use NSProcessInfo's operatingSystemVersion property to get correct system version number.
    Call location:
    27/12/2014 02:30:18,819 Office365Service[2012]: 0   CarbonCore                          0x901777e7 ___Gestalt_SystemVersion_block_invoke + 135
    27/12/2014 02:30:18,819 Office365Service[2012]: 1   libdispatch.dylib                   0x960dc130 _dispatch_client_callout + 50
    27/12/2014 02:30:18,819 Office365Service[2012]: 2   libdispatch.dylib                   0x960dc0b5 dispatch_once_f + 251
    27/12/2014 02:30:18,819 Office365Service[2012]: 3   libdispatch.dylib                   0x960dd0d8 dispatch_once + 31
    27/12/2014 02:30:18,819 Office365Service[2012]: 4   CarbonCore                          0x90109fb8 _Gestalt_SystemVersion + 1050
    27/12/2014 02:30:18,819 Office365Service[2012]: 5   CarbonCore                          0x90109b69 Gestalt + 150
    27/12/2014 02:30:18,819 Office365Service[2012]: 6   Office365Service                    0x000589a3 Office365Service + 358819
    27/12/2014 02:30:29,794 warmd[36]: [_bootcachectl_playlist_for_file:3197] Unable to generate playlist for file: 2 No such file or directory
    27/12/2014 02:30:29,794 warmd[36]: [_bootcachectl_playlist_for_file:3197] Unable to generate playlist for file: 2 No such file or directory
    27/12/2014 02:30:29,797 warmd[36]: [_bootcachectl_playlist_for_file:3197] Unable to generate playlist for file: 2 No such file or directory
    27/12/2014 02:30:29,797 warmd[36]: [_bootcachectl_playlist_for_file:3197] Unable to generate playlist for file: 2 No such file or directory
    27/12/2014 02:30:29,797 warmd[36]: [_bootcachectl_playlist_for_file:3197] Unable to generate playlist for file: 2 No such file or directory
    27/12/2014 02:30:29,799 warmd[36]: [_bootcachectl_playlist_for_file:3197] Unable to generate playlist for file: 2 No such file or directory
    27/12/2014 02:30:29,801 warmd[36]: [_bootcachectl_playlist_for_file:3197] Unable to generate playlist for file: 2 No such file or directory
    27/12/2014 02:30:30,870 xscertd-helper[2020]: ldap_search_ext_s returned -1 - Can't contact LDAP server when searching for bdb suffix, exiting
    27/12/2014 02:30:30,883 com.apple.xpc.launchd[1]: (com.apple.xscertadmin[2020]) Service exited with abnormal code: 1
    27/12/2014 02:30:30,928 coreaudiod[1249]: 2014-12-27 02:30:30.927642 AM [AirPlay] Power: SystemWillSleep
    27/12/2014 02:30:30,928 coreaudiod[1249]: 2014-12-27 02:30:30.927798 AM [AirPlay] BTLE client stopping to browse for AirPlay Solo Target Presence.
    27/12/2014 02:30:30,928 coreaudiod[1249]: 2014-12-27 02:30:30.928007 AM [AirPlay] BTLE discovery removing all devices
    27/12/2014 02:30:30,929 coreaudiod[1249]: 2014-12-27 02:30:30.929458 AM [AirPlay] BTLE client stopped to browse for AirPlay Solo Target Presence.
    27/12/2014 02:30:30,931 watchdogd[162]: [watchdog_daemon] @(         pm_callback) - ref=0x0 msg_type=0xe0000280 msg=0x2a0005
    27/12/2014 02:30:30,931 watchdogd[162]: [watchdog_daemon] @(    wd_daemon_thread) - events buffer: 65r1069 3634s1069
    27/12/2014 02:30:30,965 Office365Service[2012]: System shutdown notification
    27/12/2014 02:30:31,001 WindowServer[185]: device_generate_desktop_screenshot: authw 0x0(0), shield 0x7fbf43423ed0(2001)
    27/12/2014 02:30:31,044 identityservicesd[1311]: <IMMacNotificationCenterManager: 0x7ffac2c4fef0>: notification observer: com.apple.iChat   notification: __CFNotification 0x7ffac2d4efa0 {name = _NSDoNotDisturbEnabledNotification}
    27/12/2014 02:30:31,044 imagent[1305]: <IMMacNotificationCenterManager: 0x7fde8a42c1e0>: notification observer: com.apple.FaceTime   notification: __CFNotification 0x7fde8a54a860 {name = _NSDoNotDisturbEnabledNotification}
    27/12/2014 02:30:31,089 WindowServer[185]: device_generate_lock_screen_screenshot: authw 0x0(0)[inf, inf, 0, 0] shield 0x7fbf43423ed0(2001), dev [1680,1050]
    27/12/2014 02:30:31,000 kernel[0]: PM response took 168 ms (1194, UserEventAgent)
    27/12/2014 02:30:31,105 WindowServer[185]: device_generate_desktop_screenshot: authw 0x0(0), shield 0x7fbf43423ed0(2001)
    27/12/2014 02:30:31,180 apsd[59]: Peer [pid=1203] requested push wake but lacks APSPushWakeEntitlement
    27/12/2014 02:30:31,228 imagent[1305]: <IMMacNotificationCenterManager: 0x7fde8a42c1e0>:    NC Disabled: NO
    27/12/2014 02:30:31,228 identityservicesd[1311]: <IMMacNotificationCenterManager: 0x7ffac2c4fef0>:    NC Disabled: NO
    27/12/2014 02:30:31,237 imagent[1305]: <IMMacNotificationCenterManager: 0x7fde8a42c1e0>:   DND Enabled: YES
    27/12/2014 02:30:31,237 identityservicesd[1311]: <IMMacNotificationCenterManager: 0x7ffac2c4fef0>:   DND Enabled: YES
    27/12/2014 02:30:31,237 imagent[1305]: <IMMacNotificationCenterManager: 0x7fde8a42c1e0>: Updating enabled: NO   (Topics: (null))
    27/12/2014 02:30:31,237 identityservicesd[1311]: <IMMacNotificationCenterManager: 0x7ffac2c4fef0>: Updating enabled: NO   (Topics: (null))
    27/12/2014 02:30:31,237 identityservicesd[1311]: <IMMacNotificationCenterManager: 0x7ffac2e30040>: notification observer: com.apple.iChat   notification: __CFNotification 0x7ffac2c43f40 {name = _NSDoNotDisturbEnabledNotification}
    27/12/2014 02:30:31,244 identityservicesd[1311]: <IMMacNotificationCenterManager: 0x7ffac2e30040>:    NC Disabled: NO
    27/12/2014 02:30:31,249 identityservicesd[1311]: <IMMacNotificationCenterManager: 0x7ffac2e30040>:   DND Enabled: YES
    27/12/2014 02:30:31,249 identityservicesd[1311]: <IMMacNotificationCenterManager: 0x7ffac2e30040>: Updating enabled: NO   (Topics: (null))
    27/12/2014 02:30:31,000 kernel[0]: PM response took 347 ms (71, blued)
    27/12/2014 02:30:49,000 kernel[0]: PM response took 3456 ms (31, powerd)
    27/12/2014 02:30:49,000 kernel[0]: Failed to get hibernate image filename
    27/12/2014 02:30:49,000 kernel[0]: AirPort_Brcm43xx::powerChange: System Sleep
    All that is really chinese for me Do you know where i could get anything to be teached about all that
    Thanks

  • Why I it said "Your purchase could not be completed"and also fail to connect with the iTunes Store ?

    Why I it said "Your purchase could not be completed"and also fail to connect with the iTunes Store ?
    Thank you so much for that !

    Click here and ask the iTunes Store staff for assistance.
    (100884)

  • HT4009 I couldn't buy an app because every time I try to do it says your app could be completed and also it says go on apple support itunes

    I couldn't buy an app because everytime I try to do it says your purchase can't be completed and also says go to apple support itunes.how do I fix it????   

    You will need to do what it says, contact iTunes Support. These are user-to-user support forums, if you thought you were contacting Apple by posting here. Go here:
    http://www.apple.com/emea/support/itunes/contact.html
    to contact the iTunes Store.
    Regards.

  • Lately, when I get the "Unresponsive Script" message, Neither the cancel nor the complete script button will work and Firefox hangs so I have to Force Quit Firefox. What is wrong?

    Here is the link below the message about the unresponsive script:
    Script: chrome://browser/content/tabbrowser.xml:554
    Neither of the buttons will work "Stop Script" or "Continue" and since Firefox is frozen or just hanging, I have to Force Quit. Today I was trying to print off a confirmation for a convention and every time I was ready to print, the Unresponsive Script would show up and freeze the printing too. After 4 times, I finally made a Grab Shot of it to print.

    ive also repaired disk permissions using disk utility and disk warrior.

  • Automate or Script to complete PG user association and Disassociation

    Customer is facing this problem again and again . LCP and RCP ports needs to be disassociate and associate.
    Is there any way we can automate if we know the ports so that only  one script can be run and finish the task  instead of doing one by one.                  

    Hi Prashanth,
    Yes, we can achieve this by doing some automation tool.
    This automation tool will perform this activities plus more(agent,Supervisor,DN,call type creation, call type and script association etc.....), i would request you to inform your customer to contact @ the below mentioned address for the product features,
    SERVION Global Solutions
    http://www.servion.com/contact-us.aspx
    Regards,
    Srinivasan
    Please rate if this help

Maybe you are looking for

  • How do I setup my hp wireless printer for iPad mini

    I need instructions to setup my wireless hp printer to my iPad mini

  • Aspect ratio filter not working properly

    I am running LR3.5 on Mac OS 10.6.8 and recently discovered that the aspect ratio filter is not working when used on folders created a few years ago. Specifically, a great many images shot in landscape mode are included with the portrait mode filter

  • Oracle 9i Database Software Registraton Does Not Work

    The link http://www.oracle.com/technology/software/registration/index.html?9ibooks does not work and shows the messgae, "An error occurred while processing the request. Try refreshing your browser. If the problem persists contact the site administrat

  • Re-using statements with open ResultSet

    Hi, Question about re-using connections while keeping a result set open - basically I am trying to do: Connection conn = dataSource.getConnection(); Statement stmt = conn.createStatement(); if (stmt.execute(QUERY)) resultSet = stmt.getResultSet(); Ar

  • 'Search iphone' having problem

    I have iphone 4S. 'Search iphone' screen is great to use. Managed to get into contacts so quickly with this. But, recently this doesnt works so well. Sometimes, shows nothing while i typed in 'search iphone'. Do anyone come across this problem? Or am