Selection.bounds operation?

I have this simple jsx script where I want to get the bounds of a selection:
try
        var s = app.activeDocument.selection.bounds
        alert(s.toSource())
catch(e)
        alert("No selection")
It does detect that there is a selection present but does not return that array of x,y coordinates that bounds the selecton.
The alert displays [({}),({}),({}),({})]
all elements of the array are determined to be undefined.
Any help is appreciated.
Thanks!
Ray

What application are you scripting?

Similar Messages

  • Unable to select the operation mapping in Enhanced RD?

    Hi Guys,
    I am unable to select the operation mapping in the Enhanced Receiver determination in PI 7.1.  Looks like a bug in PI 7.1.  Did anybody else faced the same problem and got any resolution.
    any help would be appreciated
    Thanks,
    Srini

    Looks like a bug in PI 7.1
    Not a Bug but it seems to be a restriction......have a read of the below help section:
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/45/94467db1746003e10000000a1553f6/content.htm
    From above help section:
    During the definition of the interface mapping, you assign the abstract service interface ReceiverDetermination as the target
    interface. The service interface ReceiverDetermination is in the Enterprise Services Repository in the software component SAP
    BASIS (namespace http://sap.com/xi/XI/System).
    You will notice the same behavior when you try to select the Operation Mapping in Extended RD....click on the input help....pop-window will appear....what are the source and target SI that you see?
    Regards,
    Abhishek.

  • Selection without selection bounds

    I'm using CS2 so I can't call on selection bounds (which seems to be the preferred method of working with selections)
    var sb = activeDocument.selection.bounds;
    var sbWidth = sb[2]-sb[0];
    var sbHeight = sb[3]-sb[1];
    alert(sbWidth + " , " + sbHeight)
    So the above code won't work for me
    How can I find out (1) if a selection is set (selection width & height = 0?) and (2) find the width and height of said selection assuming that only the rectangular marquee is used (not ellipse or lasso).
    Cheers

    I had to find out bounds of selection that could be any shape for my Photoshop Photo Collage Toolkit the selections are image size and shaped alpha channels in the Photo Collage Template PSD file with the names "Image 1", "Image 2", ..., "Image n".  I had a heck of a time to come up with a way that worked in CS2, CS3, Cs4 and CS5. After consulting with my good friend Rube Goldberg we can up with a contraption that seems to work. This is not a thing of beauty. Some local functions are not shown for the function name states what it does.
    // Get Alpha Channel's width and height Selection Bounds did not work???
    makeLayer(); // Make Temp Work Layer
    loadAlpha("Image " + imageNumber ); // Load Image Alpha Channel
    fillBlack();
    activeDocument.selection.invert(); // Inverse
    // If image size equals canvas size no pixels will be selected clear will fail
    try{
    activeDocument.selection.clear(); // One clear did not work
    activeDocument.selection.clear(); // Two did the trick
    }catch(e){}
    activeDocument.selection.deselect(); // Deselect
    var SB = activeDocument.activeLayer.bounds; // Get the bounds of the work layer
    var SWidth = (SB[2].value) - (SB[0].value); // Area width
    var SHeight = (SB[3].value) - (SB[1].value); // Area height
    activeDocument.activeLayer.remove(); // Remove Work layer
    Where there is a will there is a way. Layer bounds does work...
    I needed these selections bounds so I could resize and align placed images to these mapping Alpha Channels and mask any Image overflow.
    Link to my Photo Collage Toolkit

  • Cannot select find operations when exposing Business Object

    Hi,
    I have created a business object from which I need to 'find' instances. The business object has to be exposed as a web service.
    The business object has 'find***' operations. However, I cannot select those operations when I try to expose the business object as a web service.
    How can I get those operations to be selected?
    Regards,
    Rahul

    Rahul-
    There is a limitation with CAF web services that they can not cater to collections. The findXXX methods always return collections hence they can not be exposed as web services. There are alternatives however - create a custom Complex Type which contains the collection. Create a method in an Application Service which calls your findXXX method and then returns the collection "through" the custom type you have created.
    For example, if you want to return a list of purchase orders create a wrapper structure as follows:
    ReturnStructure     
         PurchaseOrders [0..n]
    Cheers-
    Atul

  • Selection of Operation on Work center

    Dear all,
    In repair order ,when iam performing Repair Auction i need to activate Operation selection using work center setting.
    Where can i activate this Functinality *so that i can choose from pop-up screen of particular  the Work center and its Operations.
    Thanks in Advance
    Regards
    raj.

    Hi,
    Have you selected the Operation selection at the given node,
    Plant Maintenance and Customer Service -> Maintenance and Service Processing -> Maintenance and Service Orders -> Functions and Settings for Order Types -> Default Values for Task List Data and Profile Assignments
    Then try processing. Hope it will solve your issue.
    Regards,
    N.Nagaraju

  • Why can't I select an object from its center?  Direct selecttool will only select bounding box.

    Why can't I select an object from its center?  Direct selecttool will only select bounding box.

    You may have turned on "Object selection by path only" in the "Selection Options".

  • Query in Select query operation

    Please excuse me for posting this again.
    I'm stuck up with this for 3 days. Lenghty post pls do read and help me.
    How is the select query going to be changed in the SAP so that the original database behind it understands it. I want to know the operation of IN operation in where clause where in we can use ranges.
    I'm asking this because I'm facing a problem using Native SQL.
    Query is like this:
    EXEC SQl.
    OPEN C1 for
    SELECT field1 from table@domain where field2 IN :ABAP_VAR.
    ENDEXEC.
    EXEC SQL.
    FETCH C1 NEXT INTO :VAR1 , :VAR2
    ENDEXEC.
    Oracle usually recognises this statement IN ( '2222' , '3658' , '6895' )
    But here this field that is build dynamically like this is not recognising them as seperate fileds but instead it is taking them as a single string and not selecting anything.
    But if a single value is passed it is fetching the data into the cursor. And the code is working fine.
    Any help in this is highly appreciable.

    "if a in r_range" is is effectively: does the value held in 'a' comply with the values held in range 'r_range'. Ranges can hold NE, patterns etc so this can get quite complex.
    You can see that it is very different from the SQL type IN.
    If your range hold several values you could unstrip it into a string varaible so that it ended up having a value something like: ( '2222' , '3658' , '6895' ). Not sure if you need the '(' but it would be something like this:
    eg,
    assuming your range is simple and only holds 'I' and 'EQ' values:
    data v_string type string.
    loop at r_range.
    concatenate v_string '@''' r_range-low  '''@' into v_string.
    endloop.
    REPLACE
      ALL OCCURRENCES OF '@'
      IN v_string
      WITH ' '.
    Then you can use:
    SELECT field1 from table@domain where field2 IN :v_string.

  • I have dual boot labs that I set up up for a school.  The Partitions consist of mountain lion and windows 7.  I use bootlicker as the software for selecting the operating systems.  When I choose windows, it takes just under 2 minutes to go to the login sc

    I have a dual boot lab that I set up for a school.  The partitions consist of Mountain Lion OSX and Windows 7 Ent.  I use bootpicker software for choosing the operating system at startup.  When I select the windows partition, it take just under 2 minutes from selection to the windows login screen.  It seems to take incredibly long for the mac to "shut down and hand over the operating system to windows. 
    Do you have any suggestions on how to get this timing faster?
    Thanks for any ideas/input

    The only suggestion I can make is to look ar ReFind (previuosly ReFit). Startup mamangement is one of its features.
    But
    It is very powerful so test it for yourself before deploying it. Some of the functions are best kept out of the hands of the curious, or 'playful'
    And you never answered this question.
    Tell me what the needs are, do the users always need to choose Windows or is this a variable?

  • Retreiving a bound operator's module in OMBPLUS

    Is it possible to get the module name that an operator is bound to in OMBPlus?
    For instance, if I create this mapping ...
    OMBCREATE MAPPING 'MY_MAP' ADD TABLE OPERATOR 'MY_OPERATOR' BOUND TO TABLE '../MY_MODULE/MY_TABLE'
    This command will return the bound name...
    OMBRETRIEVE MAPPING 'MY_MAP' OPERATOR 'MY_OPERATOR' GET PROPERTIES (BOUND_NAME)
    Returns "MY_TABLE"
    Is it possible to get the module name ("MY_MODULE" or "../MY_MODULE/")?
    I am trying to write a script to reconcile all the operators in a mapping to their bound object but I need to be able to specify the module that the operator exists in. The only way I have been able to do it so far is to create an array that returns the module name when you give it an operator name. I'd prefer not to do it this way since I have to run another script to create the array and it takes a while to run.
    Thanks!

    Hello, the right command is
    OMBRETRIEVE MAPPING 'MY_MAP' OPERATOR 'MY_OPERATOR' GET BOUND_OBJECT
    Here is a sample script I sometimes use to reconcile the table operators in a mapping. It's different from what you want to achieve but it can be a good starting point (use at your own risk...) recently I have written a more elaborate script to 'reconcile' not only the operators with a bound object but also joins etc to which they are connected so that I have a clean mapping. Also you can achieve the effect of changing, say a datatype in a field of a source table, or add a new field, an then cascade the change to all tables/mappings/operators which are somewhat connected to it. But this is maybe TOO dangerous to post it here.
    Antonio
    ## Reconciles all mappings with the tables passed as parameter p_table_list
    proc reconc_with_tables { p_table_list p_regexp_mapping } {
         puts "Reconcile for tables $p_table_list ";
         foreach mapname [OMBLIST MAPPINGS '$p_regexp_mapping' ] {
              puts "In mapping $mapname ... ";
         set v_list_tab_modified "";
         set v_lista_flag_target "";
         foreach opname [OMBRETRIEVE MAPPING '$mapname' GET TABLE OPERATORS] {
              set boundlist [OMBRETRIEVE MAPPING '$mapname' OPERATOR '$opname' GET BOUND_OBJECT ];
              set boundobj [lindex $boundlist 1]; # complete with path
              set boundlen [string length $boundobj];
              set boundtable [string range $boundobj [expr [string last / $boundobj] + 1 ] $boundlen];
              if { [lsearch $p_table_list $boundobj] != -1 } {
                   puts " *** Mapping: $mapname";               
                   puts " *** Operator: $opname -- bound object: $boundobj";
                   puts "Must reconcile $opname with $boundobj";
                   puts "table name = $boundtable";
                   puts "";
                   OMBRECONCILE TABLE '$boundobj' TO MAPPING '$mapname' OPERATOR '$opname' USE \
                   (RECONCILE_STRATEGY 'REPLACE', MATCHING_STRATEGY 'MATCH_BY_OBJECT_NAME');
                   set v_pos [lsearch $v_list_tab_modified $boundtable];
                   if {$v_pos == -1} {               
                        set v_pos [llength $v_list_tab_modified ];
                        lappend v_list_tab_modified $boundtable;
                   # decido qui se la tabella è un target o meno     
                   # basta che almeno un operatore legato alla tabella sia target
                   # perchè la tabella sia target
         if { [ llength $v_list_tab_modified ] > 0 } {
              puts "Tables reconciled for mapping $mapname: $v_list_tab_modified";
    set v_tables_to_reconcile [ list "/MY_PROJ/MY_MOD/MY_TAB_1" "/MY_PROJ/MY_MOD/MY_TAB_2" ];
    set v_module_list [list STG STG_2 ];
    foreach v_mod $v_module_list {
         OMBCC '/MY_PROJ';
         OMBCC '$v_mod';
         reconc_with_tables $v_tables_to_reconcile .*;
         OMBCOMMIT;     

  • Select Routing Operation

    Dear All,
    I want to use routing oerations in program. I am using plpo table, but I have one problem, eg. in ca03 tcode for material 37 it is displaying 4 operaions like  20, 30, 40, 50. But in table plpo there is 10 operation also I want to avoid this operaion(10). Please tell me how to do it?
    Thanks & Regards,
    Roshani

    after you select PLPO into an internal table:
    delete internatablename where operation eq 10?

  • Select an operator only has two options

    Hi everyone,
    It would be highly appreciated if you could tell me how to solve this issue as below:
    When creating conditions, not all operators are being displayed, only two options exists: both and except.
    Version: XI3.1
    Thanks a lot!
    Lisa

    Lisa,
    We have had the same issue in the past (but then with BO version 6.5) and is was due to not performing the installation of deski completely. In our case the 'Generic ODBC' (which is used for the universe connection) was not selected to be installed during installation. After the universes were retrieved from the repository database only the 2 operators where visible.
    Solution: throw away the local stored universes, check and correct the installation of deski and re-import the universes again.
    Now remember that this was with BO version 6.5, but it might well be the same problem with XI3.1.
    Cheers,
    Harry

  • Camera raw is selective in operation.

    Camera raw 2.4 only opens when opening an image using the Photoshop CS file browser. In the past i have been able to open the image from whatever folder location outside of the browser and Photoshop CS would open then opening the image in camera raw. I recently had to re-install Photoshop when I updated my hard drive. The camera raw plugin is in Applications> Adobe Photoshop CS>Plug-ins> File Formats on an Apple mac G4 DP MDD running OS 10.4.10.
    What am I missing?

    Photoshop is the program that opens when I double click images. It is also the program used to open images through Expression Media. I have re-installed Photoshop and removed the old Camera Raw and everything is just fine again. Still do not know what might have created the problem, but starting from the beginning helps (when needed).
    Thanks again for your replies. My best to you all!

  • HELP NEEDED!! batching, overlaying, background cut out

    Hi All,
    very new to this.
    I have 2500+ images (caracitures of cars on white backgrounds). I need to place ALL of them on to  a BLACK tee shirt image for internet listing.
    So, how do I do this automated?
    make the thing background BLACK
    overlay image on the teeshirt
    save it in the order they are done
    2500+ times
    I use Photoshop 7.0

    Adobe has made many changes in Photoshop scripting support since PS7 scripting add on. You may be best off with a two pass process.  The first one being a batch process that process your PDF file where you object have pure white backgrounds.  If the magic wand works well to select your white background you may be able to convert the background layer to a normal layer and then delete the white continuous area. Once deleted the background will be transparent, you should see a checker board area. Save a set of cutout object PNG files. That may be possible to do by batching an action. I have never processes PDF files using Automat Batch.  You may need a batch script where you can select just PDF files in a folder and open then the way then need to be opened.  The way I read your description your PDF files are singel image paged file.
    Anyway if you can created a set of cutout object png files it should be possible then to create your tea shirt image files.  I had problems resizing images for an area in CS2 for there either was no selection bounds operation was available or there was a bug in Adobe scripting code.  I resize images to fit area all the time in my Photo collage toolkit scripts. However I not to sure how I do it would work well with png files that have large border transparent so before saving any png file trin the images transparent area first. So that the png file bounds and the objects bounds are the same.    My code works in CS2, CS3, CS4 CS5 and CS6 though there is a bug in CS6 that can bite.  PS7 and CS scripting support may be a bit different. I use Alpha channel selection to map images locations and use the bounds of the selection to know what to resize to taking into account the aspect ratio of the object and the aspect ration of the area.
    Here is the main code I use.  Remember there a problem in scripting support prior to CS3 that I had to use my friend Rube Goldberg's sledge hammer to pound script into submission.   I place in full size images  the resize these to fit the area and mask off excess. My finctions code are not shown here.  Other ways are also posible. For example my paste image roll script use copy and paste where the image file is first flattened are resized for the location before the copy. The flatten would color in a png file transparent area don't flatten http://www.mouseprints.net/old/dpr/PasteImageRoll.jsx
    Code
    if (fileList[i] instanceof File) {
                                                       var layers = activeDocument.layers;
                                                      activeDocument.activeLayer = layers[layers.length-1-imageNumber+1];           // Target Background Layer or last placed image
                                                      placeImage(fileList[i]);                                                     // Place in full 100% size Image
                                                      // resize smart object layer to just cover canvas area aspect ratio and size
                                                      // Get Smart Object current width and height
                                                      var LB = activeDocument.activeLayer.bounds;
                                                      var LWidth = (LB[2].value) - (LB[0].value);
                                                      var LHeight = (LB[3].value) - (LB[1].value);
    // sledge hammer
                                                      // Get Alpha Channel's width and height Selection Bounds did not work???
                                                      makeLayer();                                                            // Make Temp Work Layer
                                                      loadAlpha("Image " + imageNumber );                              // Load Image Alpha Channel
                                                      fillBlack();
                                                      activeDocument.selection.invert();                              // Inverse
                                                      // If image size equals canvas size no pixels neill be selected clear will fail
                                                      try{
                                                                activeDocument.selection.clear();                    // One clear did not work
                                                                activeDocument.selection.clear();                    // Two did the trick
                                                      }catch(e){}
                                                      activeDocument.selection.deselect();                              // Deselect
                                                      var SB = activeDocument.activeLayer.bounds;                    // Get the bounds of the work layer
                                                      var SWidth = (SB[2].value) - (SB[0].value);                    // Area width
                                                      var SHeight = (SB[3].value) - (SB[1].value);                    // Area height
                                                      activeDocument.activeLayer.remove();                              // Remove Work layer
      //end hammer to get the area bounds
    // the following line will produce an internal error in CS6 if Photoshop's user interpolation prefence is Adobe cs6 default Bicubic Automatic.
                                                      var userResampleMethod = app.preferences.interpolation;          // Save interpolation settings
                                                      app.preferences.interpolation = ResampleMethod.BICUBIC;          // resample interpolation bicubic
                                                      if (LWidth/LHeight<SWidth/SHeight) { // Smart Object layer Aspect Ratio less then Canvas area Aspect Ratio
                                                                var percentageChange = ((SWidth/LWidth)*100);  // Resize to canvas area width
                                                                activeDocument.activeLayer.resize(percentageChange,percentageChange,AnchorPosition.MIDDLE CENTER);
                                                      else {
                                                                var percentageChange = ((SHeight/LHeight)*100); // resize to canvas area height
                                                                activeDocument.activeLayer.resize(percentageChange,percentageChange,AnchorPosition.MIDDLE CENTER);
                                                      app.preferences.interpolation = userResampleMethod;          // Reset interpolation setting
                                                      // Load Alpha Channel as a selection and align image to it
                                                      loadAlpha("Image " + imageNumber);
                                                      align('AdCV');
                                                      align('AdCH');
                                                      // Add Layer mask using Alpha channel Image area map
                                                      layerMask();                                                                      // Add un linked Layer Mask
                                                      // Add Photo Collage Layer Style to image layer
                                                      addStyle(imageStyle);

  • Selecting Operations for Messages in Sequence Diagrams

    Is there another way of assigning operations to messages in sequence diagrams apart from selecting the message, right-clicking and then selecting the operation from the list.
    The reason is that I have quite a list of operations and I can't see the last couple in the list.
    Any suggestions? ...Apart from having less operations... :)

    The only way to specify the operation is via the context menu. We have two levels. On is the operation context menu. The second is the context menus that list each operation by visibility. Are you not able to see all of the operations under the visibility context menus as well?

  • Strategy plan- Automatic operation selection in tasklist

    Dear PM Experts,
    I have a requirement in strategy plan, where the strategy plan MIX_TRUCK which has 1M, 3M, 6M & 1Yr(Heirarchy-1) time based cycles.
    Now i have a tasklist CON_TRUCK, which consist of all operations which covers all time cycles (1yr, 6M, 3M&1M)
    I assigned this taskist & strategy plan to maintenance plan MIX_TR.
    Now currently whenever the maintenance order created from this maintenance plan MIX_TR, all the operations in the task list are selected.
    But my requirement is to select some operations for 1yr, and another set of operations for 6M, and different set for 3M.
    Is it possible with configurable tasklist? If not is there any other alternate method to achieve?
    Your valuable suggestions are highly appreciated........
    VINOD.V

    Attach your Operations assignment to Packages screen shot. Attach your Maintenance Strategy Packages screen shot. Attach your Call object operations tab which has been created screen shot.
    Also, mention how do you want to have that??
    Hope, you might have done something same like the above screen shot in your task list for operations assignment to packages.
    If you want only "Operation 3" & "Operation 6" to be called at 3 months & only "Operation 4" & "Operation 5" to be called at 6 months interval, etc., use Hierarchy option for the packages in IP11.
    Not sure, you are talking about this or something else. Please elaborate more if query is talking about something else.

Maybe you are looking for

  • BAPI_PO_CHANGE "No account assignment for service 0000010" SE 518 Error

    Hi  Friends, I am using BAPI_PO_CHANGE to add new line item with service data to purchase order. For one scenario BAPI give me above error is "No account assignment for service 0000010" SE 518 . basically when i pass outline aggrement and contract it

  • Create Logical System in R/3 system

    Hi all,    I am  trying to define logical system for xMII server in R/3 system using SALE transaction. But the logical system for xMII server doesn't already exist. So I have chosen to create one. Seems there is format like <sys_id>'CLNT'<client>. 1)

  • Mac on windows

    I write this question here because it doesn't get on the other discussion group. Well the question is that, Can I install the Leopard software on a windows/PC computer and to work with there? Thank You, Daniel.

  • Technical names in reports

    hi experts i need to see technical names / transaction codes in reports like FBL1N etc.against every line items displayed. i did chked dynamic selection layouts etc therz no option to display t-codes in coulmns. kindly help thanx Asif Shahzad Moughal

  • Problem with Elements 10 Organizer

    I have used Elements 5 and 8 and recently upgraded to Elements 10. The problem is searching for tagged photographs. When I click on the box beside a keyword tag, instead of searching all folders and subfolders for images with that tag, it searches on