Seamless Tiles problems

All tutorials that you come across on the net for creating Seamless tiles, all show to use the offset filter.  The results from using this filter are never what I want, no matter how many tutorials I follow.
How can remove the seams in this image, without offset and or having to use the smart clone tool ? This image is a pattern applied to a canvas.
Thank You.

Let's give it a try. I've modified J's solutiion slightly but the method remains intact.
1. Open your souce tile and copy it into memory.
2. Open a new document that is as big or bigger (it doesn't matter) as 2x the width and 2 x the height of your source tile. The numbers in the New dialog box indicate the size of your tile. Make sure your have a background.
3. Activate the Move tool and make sure the "Show Transform Controls" check box on the Property Bar is checked.
4. Select the Actions Panel and Start a new action (Click on the icon in the panel next to the Trashcan) Give it a name and click on Record.
5. Insert the image from memory (Ctrl-V) 4 times. You should now have a background with 4 layers (1-4) in the center with Layer 4 selected. And you should be able to see the Transormation controls.
6. Click on the transformation controls. The Property Bar will change to the "Free Transform" set up with a square formed by 5 smaller squares on the left end. Click the small square in the center of the left side of that square. The small black square at the center will move from the center to the left center square.
7.Select menu item Edit->Transform->Flip Horizontally. (Don't worry if it goes off the canvas we'll fix that later). Click the check mark at the right of the Property Bar to accept the change. There should be 2 copies of your tile showing abutted together horizontally.
8.Select Layer 3 in the Layers Panel. Click on the Transform Controls in the center of the image. The Property Bar changes. Select the small square at the center of the bottom of the square on the left side of the Property Bar. Select menu item Edit->Transform->Flip Vertically. And click the check mark at the right end of the Property Bar. You hould now see 3 copies of you tile butted together.
9. Select Layer 2 in the Layers Panel. Click on the Transformation Controls. The Property Bar changes. Select the small square in the center of the left side of the square at the left end of the Property Bar. Select menu item Edit->Transform->Flip Horizontally.
10. Change the square selection to the small center square on the bottom of the square at the left end of the Property Bar. Select menu item Edit-Transform->Flip Vertically. Click the check mark at the right end of the Property Bar.
11. Select Layer 1 in the Layer Panel, move your cursor to Layer 4 and with the shift key pressed select Layer 4. Layers 1 to 4 should now be hi-lighted press ctrl-E to merge them. Layer 4 (the merged layers of your tile is now selected.
12 Still in the Layers Panel with the ctrl key pressed click on the background. Both the background and Layer 4 should now be selected. In the Property Bar click on the on the "Align Vertical Centers" icon then the "Align Horizontal Centers" icon. Your tile should now be in the center of the canvas.
13 Click on Layer 4, Layer 4 alone should now be selected. In the Layers Panel Ctrl-Click on the Layer 4 icon. You should now have a marquee around your tile. Select menu item Image->Crop. Select Menu item Layer->Flatten Image.
14. Press the stop recording icon at the bottom of the Actions Panel (small gray square). Your Action is now complete.
15 Test your Action. In the History Panel go to the top and click on "New". In the Actions Panel select your Action under the name you gave it, press the Play Icon. The tile should be recreated in front of you.
Good Luck
Mike

Similar Messages

  • Seamless tiles

    Hi, I am trying to learn how to create seamless tiles for the
    backgrounds of my flash sites. I can create the tiling effect but
    not a seamless one that looks good. I have seen many tiles on the
    web but I would like to have a go at making my own as I really want
    something very subtle. I was even thinking about using the textures
    in fireworks to create the tiles with. Is this possible?
    I have found many tutorials on tiling for photoshop and some
    really old versions of fireworks.... Does fireworks 8 have any new
    features that can help me with this? I would really appreciate any
    advise on this topic and if you can point be in the direction of
    some good tutorials that would be great. Thanks so much

    Nice. I'll do that right away!
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Ilya Razmanov" <[email protected]> wrote in message
    news:[email protected]..
    > On Tue, 07 Aug 2007 17:14:26 +0400, Murray *ACE*
    > <[email protected]> wrote:
    >
    >> Ilya:
    >>
    >> There is a Plugins folder here -
    >>
    >> C:\Program Files\Adobe\Adobe Fireworks CS3\Plug-Ins
    >>
    >> on WXP, and on Vista. Is that where I should drop
    this dll?
    >>
    >
    > It should be the place.
    >
    > However, I personally prefer "shortcut trick". Very
    handy if you use
    > several image editors or going to upgrade your FW. It
    works like this: you
    > install all your plugins somewhere like "C:\Program
    Files\Plug-Ins" and
    > subdirs below it, that is, outside FW and PS. Then,
    within FW plugin dir,
    > you create a shortcut to "C:\Program Files\Plug-Ins".
    Next time you start
    > FW, it finds the shortcut and goes to "C:\Program
    Files\Plug-Ins"
    > continuing search for plugins.
    >
    > This trick work with Photoshop as well. Also I was told
    it works with
    > Painter.
    >
    > This way, you keep all the plugins outside FW or PS. If
    you decide to
    > remove current version of FW or PS, plugins will stay
    intact, and you can
    > use it with another program or another version.
    >
    > --
    > Ilya Razmanov
    >
    http://photoshop.msk.ru -
    Photoshop plug-in filters

  • Print tile problem

    I have a one page pdf document I want to print enlarged on several pages.
    I'm running Acrobat Pro on a mac OS 10.6.7 with an epson workForce 840.
    I follow instructions (see below) and selected tiling options but the print out is reduced rather than enlarged.
    Does anyone have a solution? Much obliged!
    Here are the directions I followed:
    Print an oversized document
    Although you can create a PDF file as large as 15,000,000 inches (38,100,000 cm) in either direction, most desktop printers cannot print such large pages. To print an oversized document on your desktop printer, you can print each page in pieces, called tiles, and then trim and assemble those pieces.
    You can also increase the scale of a standard-sized document and print it on multiple pages.(note: dosen't say how to do this and scaling up in "tile scale" does not increase the print out size but rather seems to reduce it.
    Choose File > Print.
    From the Page Scaling menu, choose Tile All Pages if all pages of the document are oversized. If some of the pages are standard-sized, choose Tile Large Pages.
    (Optional) Set any of these options, referring to the Preview image to check the output results:
    Tile Scale
    Adjusts the scaling. The scaling affects how the sections of the PDF page map to the physical sheet.
    Overlap
    Specifies the minimum amount of duplicated information you want printed on each tile for ease in assembly. The Overlap option uses the unit of measure specified for the document. The value should be greater than the minimum nonprinting margins for the printer. You can specify up to half the size of the shortest side of the document page to overlap. For example, tiles for a page that measures 11-by-17 inches (279.4mm-by-431.8mm) can overlap up to 5.5 inches (139.7mm).
    Labels
    Includes the PDF name, date of printing, and tile coordinate on every sheet. For example, Page 1 (1,1) means row 1, column 1 of the first page. Tile coordinates are used for reassembling the tiles.
    Cut Marks
    Prints marks on each corner of a tiled page for ease of assembly. Use this option in conjunction with the Overlap option. When you specify an overlapping edge and then superimpose those edges, you can use the cut marks to line up the tiles.

    I think that your problem might be that you are not using a PostScript printer. It works on a PS printer.

  • Tiles problem

    Hi
    I'm new to struts and I have some problem with struts.
    I have tiles.jsp:
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <tiles:insert page="/tiles/karta.jsp" flush="true">
    <tiles:put name="title" type="string" value="karta" />
    <tiles:put name="header1" value="/tiles/top1.jsp" />
    <tiles:put name="body1" value="/tiles/evidCard.jsp" />
    </tiles:insert>
    In top1.jsp there's just this table of links
    <td>All cards</td>
    <td>Evid.card</td>
    <td>Store card</td>
    When I first call tiles.jsp, then I see both tiles (top1.jsp, evidCard.jsp). Then when I click link e.g. All cards, then I dont see top1.jsp (I see just allcards.jsp)........Can you tell me, where's the problem?
    Do I need to write other jsp pages like tiles.jsp, but I will change value in body1 into :
    value="/tiles/allcards.jsp"
    value="/tiles/storeCard.jsp"???
    Thanks a lot.
    regards

    Check this out.
    http://www.jsftutorials.net/tiles/jsf-tiles.html

  • Tarantella seamless windows problem

    Hi there,
    I am trying to set up seamless windows, everything is set as it should be yet it still fails to work...
    windows 2003 terminal server
    Sun Secure Global Desktop Enhancement Module is installed on the server
    The Windows application object is configured for RDP and to use a seamless window
    client version 4.20.909
    When i open an application instead of opening in a seamless window it opens up in an independant window.
    any thought???
    thanks.

    Hi,
    I have nearly the same problem but in my configuration the seamless windows are working on the SSGD Server (Fedora Core 4) itself and on the Windows 2003 Application Server. If I try to use the semaless windows on my Win XP Client (either with Internet Explorer or with Firefox) it doesn't work - and I have no idea what the problem can be.
    It worked once as I installed the Sun Secure Global Desktop Enhancement Module on the Windows 2003 Application Server and then tried to start a application which uses seamless windows but the next time I started an application there was no seamless window. I also tried to uninstall the Enhancement Module and reinstall it, but that doesn't help.
    Maybe someone can help me!
    Thanks in advance!
    best regards
    Ren�

  • My Offset filter not working in Cs6: Seamless pattern problems

    Hi all.
    Im trying to create a seamless pattern. using lots of layers.
    Im going to filter/other/offset/, adding the vertical or horizontal dimensions for as 2953px (image size is 2953px x 2953px). and checking the ‘wrap around’ box.
    But it’s not working & is cropping off loads of the layer, so not seamless at all.
    I've tried with another layer and the same thing is happening.
    I've 'revealed all' and shows nothing. I’ve tried to delete any transparent stray pixels around the layer I'm trying to wrap.
    & I have also selected all & then cropped the image but it’s still happening.
    I've googled till my hearts content but found no other idea on how to solve. Any ideas?
    All my layers are from brushes I have created and used so lots of transparent textures. But that would be a problem if I have tried all of the above would it?
    Many thanks in advance.

    Thanks. I have attached screen shot.
    If you see on the top left and bottom left this is the "white flower copy" layer that I am trying to offset. This is a copy of the white flow with blue centre just to the left of the offset window.
    You will see that the offset layer I want to wrap is missing the blue centre.

  • Tile problem: Working on 1.3 and not on 1.3.1

    Ok, I've already sent this as a bug in JavaFX Jira but it's not public yet, so I'm going to post it here in case someone can understand what is really happening. The problem timeline is the following:
    - I have a tile with 3 rectangles that had a roll over effect (they scale their size)
    - After 1 second I remove all of the rectangles, so the tile has 0 elements and the rectangles are not shown.
    - One second later a put again 3 rectangles in the tile and at this point we have to different behaviours:
    - In 1.3 the three rectangles apear without problems
    - In 1.3.1 none of them is shown, but strangely if I put the mouse over their "virtual" position the rollover is done and all of them
    magically appear (not only the one I was over)
    package test;
    import javafx.scene.CustomNode;
    import javafx.scene.Node;
    import javafx.scene.paint.Color;
    import javafx.scene.layout.Tile;
    import javafx.animation.Timeline;
    import javafx.animation.KeyFrame;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.input.MouseEvent;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    public class SimpleBidButtons extends CustomNode {
        public var numButtons: Integer;
        init {
            this.children = [ Tile {
                        id: "firstMenuBar{id}";
                        rows: 1;
                        content: bind for(i in [0..numButtons-1])
                            def but:Rectangle = Rectangle {
                            width: 90; height: 90;
                            onMouseEntered: function(e: MouseEvent) {
                                but.scaleX = 1.1;
                                but.scaleY = 1.1;
                            onMouseExited: function(e: MouseEvent) {
                                but.scaleX = 1.0;
                                but.scaleY = 1.0;
                            fill: Color.BLACK
                            but;
                        height: 100;
                        width: 300;
    function run() {
        var buttons: Integer = 3;
        var menu = SimpleBidButtons {
                    numButtons: bind buttons;
                Stage {
         title: "MyApp"
         onClose: function () {  }
         scene: Scene {
              width: 320
              height: 120
              content: menu;
        Timeline {
            keyFrames: [
                KeyFrame {
                    time: 1s;
                    action: function() {
                        buttons = 0;
                } KeyFrame {
                    time: 2s
                    action: function() {
                        println("Push");
                        buttons = 3;
        }.play();
    }Edited by: AnderRuiz on Aug 23, 2010 1:14 AM

    There is no need to override create function anymore in 1.3 and in fact the children variable was created to avoid memory consumption because many CustomNodes create a Group in 1.2. Anyway I changed my code to override create() and as I supposed the result was the same. This code was working also with JavaFX 1.2 without any problems (overriding create() of course)
    Edited by: AnderRuiz on Aug 23, 2010 3:59 AM

  • Seamless tile background creation

    Andre
    Hi do anyone know how to create a seamless tiling background in illustrator? thanks

    wandre,
    It is important to select the right boundaries for the tiles, prefererably without non vertical/horizontal parts of paths, and you should have a nofill/nostroke rectangle at the very bottom of the stack of obejcts forming the tile.

  • Datacontrols Tiles problem

    It shows a message: Access denied when using Datacontrols of type table with Tiles in JSF, this is my code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <af:table rows="#{bindings.findAllCatalog1.rangeSize}"
    first="#{bindings.findAllCatalog1.rangeStart}"
    emptyText="#{bindings.findAllCatalog1.viewable ? 'No rows yet.' : 'Access Denied.'}"
    var="row" value="#{bindings.findAllCatalog1.collectionModel}"
    selectionState="#{bindings.findAllCatalog1.collectionModel.selectedRow}"
    selectionListener="#{bindings.findAllCatalog1.collectionModel.makeCurrent}">
    <f:facet name="selection">
    <af:tableSelectOne text="Select and ">
    <af:commandButton text="Submit"/>
    </af:tableSelectOne>
    </f:facet>
    <af:column headerText="#{bindings.findAllCatalog1.labels.id}"
    sortable="true" sortProperty="id">
    <af:outputText value="#{row.id}"/>
    </af:column>
    <af:column headerText="#{bindings.findAllCatalog1.labels.journal}"
    sortable="true" sortProperty="journal">
    <af:outputText value="#{row.journal}"/>
    </af:column>
    <af:column headerText="#{bindings.findAllCatalog1.labels.publisher}"
    sortable="true" sortProperty="publisher">
    <af:outputText value="#{row.publisher}"/>
    </af:column>
    <af:column headerText="#{bindings.findAllCatalog1.labels.edition}"
    sortable="true" sortProperty="edition">
    <af:outputText value="#{row.edition}"/>
    </af:column>
    <af:column headerText="#{bindings.findAllCatalog1.labels.title}"
    sortable="true" sortProperty="title">
    <af:outputText value="#{row.title}"/>
    </af:column>
    <af:column headerText="#{bindings.findAllCatalog1.labels.author}"
    sortable="true" sortProperty="author">
    <af:outputText value="#{row.author}"/>
    </af:column>
    </af:table>

    Did you ever solve this problem ? I'm seeing extact the same issue. JSF and Tiles work great, but as soon as I try to add an ADF databound tile, e.g. including a read-only table, things break. I get an "Access Denied" error which is the default setting for the af:table's emptyText attribute.

  • Map Coord, Tile , problems with getting tile for a coord

    Hello,
    I got a following question of which i unfortunately don't see the answer ...
    I've a class Coordinate and a class Tile.
    Now when i'm loading the tiles,
    format: x y z color ...
    i put them in a Map Map<Coord, Tile>, where coord is x,y,z and Tile contains color etc
    so basically i want to do is this:
    Coordinate c = new Coordinate(1,1,0);
    map.get(c);But this returns null because it isn't mapped ...
    I know by creating a new coordinate it creates a new object, so it's normal it returns null.
    Though i want something like that so i can call the method above, but i just don't see it.
    The only way i can think of is looping through the keys, getting x, y and z of them, and check if they equal
    the x y and z of the new coordinate. Still i don't know if this would be a good solution, as i have - 10000 coords and about 5 differen heights so about - 50000 coordinates
    Any ideas ?
    Thanks in advance!
    Edited by: Kolarius on Apr 28, 2009 11:48 AM

    Your Coordinate class needs to override the hashCode and equals methods in a suitable manner. Read about those methods in the API documentation for java.lang.Object.

  • Struts and Tiles Problem:compiler error message

    I imported the application "tiles-documentation.war" from jakarta-struts-1.1 into the newly installed JDevloper(Version 9.0.5.2 Build 1618) and try to make it running.
    While with the former Jdeveloper 9.0.4 I can run it nicely(a few manual editing of some files, though), with this newer version I just can not proceed with the following error message.
    Project: D:\jdev\mywork\oc4j_startup\tiles_doc\tiles_doc.jpr
    D:\jakarta-struts-1.1\webapps\tiles-documentation\tutorial\common\menu.jsp
    Error: package and class have same name: tutorial.common._menu
    the same kind of message repeated many many times.
    It seems that I can not probe any more...
    Can someone help me out? Thanks in advance

    Right so these where messages from the JSP compile or from the import process?

  • Launch Tile Problem

    Hi,
    Am getting error when I try to use launch tile in my application.
    Code :
    var oLaunchTile = new sap.suite.ui.commons.LaunchTile({
             title : "Create Shopping Cart",
             icon : "sap-icon://cart",
             link : "http://www.sap.com"
    Error :
    Cannot read property 'ImageHelper' of undefined
    Am getting this error only when I use icon property in the Launch Tile.
    Please help me on the same.
    Regards,
    Ram

    Hi Ram,
    Below is the code written in LaunchTile.js. and as you can see the highlighted statement, ImageHelper function from sap.m is being used and that is why you were getting error when you did not included sap.m library.
    * SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2013 SAP AG. All rights reserved
    jQuery.sap.declare('sap.suite.ui.commons.LaunchTile');jQuery.sap.require('sap.suite.ui.commons.library');jQuery.sap.require('sap.ui.core.Control');sap.ui.core.Control.extend('sap.suite.ui.commons.LaunchTile',{metadata:{library:'sap.suite.ui.commons',properties:{'title':{type:'string',group:'Misc',defaultValue:null},'icon':{type:'sap.ui.core.URI',group:'Misc',defaultValue:null},'link':{type:'sap.ui.core.URI',group:'Misc',defaultValue:null}},events:{'press':{}}}});sap.suite.ui.commons.LaunchTile.M_EVENTS={'press':'press'};jQuery.sap.require('sap.ui.core.IconPool');
    sap.suite.ui.commons.LaunchTile.prototype.exit=function(){if(this._iconImage){this._iconImage.destroy();this._iconImage=undefined}};
    sap.suite.ui.commons.LaunchTile.prototype.setIcon=function(u){this.setProperty('icon',u,true);var i=this.getId()+'-img';var s='72px';var p={src:u,height:s,width:s,size:s};this._iconImage=sap.m.ImageHelper.getImageControl(i,this._iconImage,this,p);return this};
    sap.suite.ui.commons.LaunchTile.prototype.onclick=function(e){this.firePress({title:this.getTitle(),link:this.getLink()})};
    I hope this answers your question.
    Regards,
    Chandra

  • Freehand 10 and tiles ?

    Hello, I've been experiencing lot of trouble when I try to
    print my document 1120 mm x 810 mm to a TANTO 90 negative printer
    (Japanese model), the printer doesn't accept the TILES that fill
    some of my objects, If I want to do tiles manualy it will cost me
    lot of my time, specialy that I have more than 8 big Jobs with the
    same tile problem.
    Please is there any way to print my tiles without losing my
    document boundaries or without having this problem.
    TANTO 90 gives me this message (Shortened):
    your document size is 3974.8 and the film size is 3973.98
    also same other line for width.
    I tried to reduce the size of document to less points but no
    benifits.

    > When printing, are you using a PPD for that printer?
    > I don't know, .
    First read the FreeHand Help files on the topic of printing.
    I assume you have scaling set to Uniform/100%.
    A PPD is a 'PostScript Printer Description' file that must be
    installed and
    available to a Postscript printer. (On Mac OS X the PPD for
    the printer is
    chosen when you install a printer.) Do not use generic PPDs.
    In the FH Print dialog you will see a checkbox 'Use PPD'. For
    precision
    Postscript printing, you must use the correct PPD for the
    printer.
    Judy Arndt

  • Is the gapless / pause problem with Lossless files solved on 120 GB?

    Hey everyone,
    I broke my trusty fifth gen 80 GB iPod a few months ago and recently purchased a 160 GB Classic to replace it. I've had two problems that I now know from searching this form that everyone else has had - the iPod pauses between tracks (all my library is Lossless) and it also pauses at random points in songs every now and again (not to mention being horrendously slow when browsing menus). Annoyingly, when I convert the exact same files to MP3 or AAC they play seamlessly no problem.
    Like I said, I've searched the forum and although I've found suggestions for the cause, I can't find confirmation that this problem has been solved with the 120 GB Classic. I've sent my 160 GB Classic back for a refund and I don't know whether to send my 80 GB off for repair or buy a new 120 GB Classic.
    Has anybody tested to see if Lossless files will play seamlessly without pausing on the new 120 GB?
    Many thanks!

    I have some lossless audio files and others in various quality, and the songs (no matter what quality) will sometimes get cut off and the next track on the playlist plays. I don't understand why this is happening, but it doesn't look like the problem you posted about is solved yet.

  • Divide layer into 4 quarters and trouble with marquee tool.

    Help, please!!! Because I will be doing this often in the near future, I need to create an action to precisely divide a LAYER into 4 quarters, in order to easily create seamless patterns. I'm having trouble figuring out how to automate the placing of guides limited to the center points of the selected layer dimensions, as opposed to the entire image's dimensions. My second difficulty is in selecting the quarters; using the marquee tool, etc, the selection tool is NOT snapping to the guides, despite what I have the Snap To preferences set to. I need to select the pixels right up to the guide line so that I can select the "Make a new layer via cut" and then move the new layers in position to make a seamless tile. Right now, it is selecting a few pixels off. (Annoying!) So until I can figure out how to address these issues, I can't even begin to record an action. Even if I can't record a general action, due to the problem of different layers having different dimensions, I'd be happy to discover a shortcut to accurately quartering a layer and any advice as to why I'm having trouble managing the marquee tool. Maybe I'll get lucky and some kind soul will have already created and be willing to share something to solve this problem I'm currently trying out the CS6 Beta but usually work in either CS5 or PSE 9. For those of you who respond, thanks in advance!

    If you want to give a Script a try, paste the following text into a new file in ExtendScript Toolkit (part of Photoshop’s installation, Applications/Utilities/Adobe Utilities/ExtendScript Toolkit CS4 or /Applications/Utilities/Adobe Utilities-CS5/ExtendScript Toolkit CS5) and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
    After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action, (in CS4 and CS5) be used in a Configurator-Panel or started from ExtendScript Toolkit directly.
    // make 4 quadrant copiers of selected layer;
    // 2012, use at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var theLayer = myDocument.activeLayer;
    var theBounds = theLayer.bounds;
    var theWidth = theBounds[2] - theBounds[0];
    var theHeight = theBounds[3] - theBounds[1];
    // operation;
    var hor = 0;
    var ver = 0;
    for (var m = 0; m < 4; m++) {
    myDocument.activeLayer = theLayer;
    // calculate stuff;
    var left = theBounds[0] + (theWidth / 2 * hor);
    var right = left + (theWidth / 2);
    hor++;
    if (hor == 2) {hor = 0};
    var top = theBounds[1] + (theHeight / 2 * ver);
    var bottom = top + (theHeight / 2);
    if (String(m / 2).indexOf(".") != -1) {ver++};
    // make selection;
    var theArray = [[left, top], [right, top], [right, bottom], [left, bottom]];
    myDocument.selection.select(theArray, SelectionType.REPLACE, 0, false);
    // copy to layer;
    var id14 = charIDToTypeID( "CpTL" );
    executeAction( id14, undefined, DialogModes.NO );
    myDocument.activeLayer.name = theLayer.name + "_" + String(m);
    // reset;
    app.preferences.rulerUnits = originalUnits;

Maybe you are looking for