Modify the script





In this Script, Please Modify it ,It is working good , There are 8 layers in psd template, The script have run enitre row layer sequentially But I wish left to right and again right to left, Please see the image below.

var newName = "Layer";  
var ids = getLayersIDs(); // getting ids of selected layers

var r = new ActionReference();  
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("width"));  
r.putEnumerated(stringIDToTypeID("document"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));  
var doc\_w = executeActionGet(r).getUnitDoubleValue(stringIDToTypeID("width"));

var r = new ActionReference();  
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("height"));  
r.putEnumerated(stringIDToTypeID("document"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));  
var doc\_h = executeActionGet(r).getUnitDoubleValue(stringIDToTypeID("height"));

ids.sort(cmp);  
function cmp(a, b)  
{  
try {  
var r = new ActionReference();  
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("bounds"));  
r.putIdentifier(stringIDToTypeID("layer"), a);  
var b1 = executeActionGet(r).getObjectValue(stringIDToTypeID("bounds"));

var t1 = b1.getUnitDoubleValue(stringIDToTypeID("top"));  
var l1 = b1.getUnitDoubleValue(stringIDToTypeID("left"));

var r = new ActionReference();  
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("bounds"));  
r.putIdentifier(stringIDToTypeID("layer"), b);  
var b2 = executeActionGet(r).getObjectValue(stringIDToTypeID("bounds"));

var t2 = b2.getUnitDoubleValue(stringIDToTypeID("top"));  
var l2 = b2.getUnitDoubleValue(stringIDToTypeID("left"));

t1 = 100-Math.round(doc\_h/t1)*100;  
t2 = 100-Math.round(doc\_h/t2)*100;

var x1 = l1 + t1*doc\_w;  
var x2 = l2 + t2*doc\_w;

return x1 - x2;  
}  
catch (e) { throw(e); }  
}

  
//for each id in the list  
for (var i = 0; i < ids.length; i++)  
{  
// select the layer first (well, artboard in this case)  
selectById(ids[i]);

//rename it to "my name 1", "my name 2", etc  
activeDocument.activeLayer.name = newName + " " + (i + 1);  
}

// this will get IDs of selected layers/groups/artboards  
function getLayersIDs()  
{  
var lyrs = [];  
var lyr;  
var ref = new ActionReference();  
var desc;  
var tempIndex;  
var ref2;

ref.putProperty(stringIDToTypeID("property"), stringIDToTypeID("targetLayers"));  
ref.putEnumerated(charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt'));

var targetLayers = executeActionGet(ref).getList(stringIDToTypeID("targetLayers"));  
for (var i = 0; i < targetLayers.count; i++)  
{  
tempIndex = 0;  
ref2 = new ActionReference();  
try  
{  
activeDocument.backgroundLayer;  
ref2.putIndex(charIDToTypeID('Lyr '), targetLayers.getReference(i).getIndex());  
try  
{  
desc = executeActionGet(ref2);  
tempIndex = desc.getInteger(stringIDToTypeID("itemIndex")) - 1;  
}  
catch (e)  
{  
tempIndex = 0;  
}  
}  
catch (o)  
{  
ref2.putIndex(charIDToTypeID('Lyr '), targetLayers.getReference(i).getIndex() + 1);  
desc = executeActionGet(ref2);  
tempIndex = desc.getInteger(stringIDToTypeID("itemIndex"));  
}

lyrs.push(desc.getInteger(stringIDToTypeID("layerID")));  
}

return lyrs;  
};

// this will select a layer by ID  
function selectById(id)  
{  
var desc1 = new ActionDescriptor();  
var ref1 = new ActionReference();  
ref1.putIdentifier(charIDToTypeID('Lyr '), id);  
desc1.putReference(charIDToTypeID('null'), ref1);  
executeAction(charIDToTypeID('slct'), desc1, DialogModes.NO);  
};
[Layer Sequentially From left to Right](https://community.adobe.com/t5/photoshop/layer-sequentially-from-left-to-right/td-p/12014433)
A few things to try.


1. Use [Variable Tables](http://odetocode.com/Articles/365.aspx) instead -> maybe the import wizard prefers that?
2. Name your return fields.


Try using the following stored proc (untested .. just thinking out loud...)



```
CREATE PROCEDURE dbo.Foo
AS

    SET NOCOUNT ON

    DECLARE @ResultTable TABLE (SomeId INTEGER)

    INSERT INTO @ResultTable
    SELECT DISTINCT Id AS Identity -- Or u can rename this field to anything...
    FROM SomeExistingTableWhichHasAnIdentityField

GO

```

Try that and see if the wizard refreshes, now.


-- 


 Attempt #2 :)


Ok .. when the EF designer/wizard/whatever fails to figure out EXACTLY what my stored proc is suppose to be returning, I usually do the following :-


1. Make sure the stored procedure doesn't exist at all in the EF designer/context, etc. (You have a clean starting point)
2. Open up your stored procedure and `/* /*` comment out *EVERYTHING* after the procedure definition.


eg..



```
ALTER PROCEDURE dbo.Foo
(
    Bar1 INT,
    Bar2 TINYINT,
    ... // whatever u have as your optional input arguments //
)
AS
    SET NOCOUNT ON

    /* 
    .... every thing in here is commented out 
    */
GO

```

Now ...
 3. Add a forced fake return in the stored proc, which (more or less) just *defines* the output structure/fields.


eg..



```
ALTER PROCEDURE dbo.Foo
(
    Bar1 INT,
    Bar2 TINYINT,
    ... // whatever u have as your optional input arguments //
)
AS
    SET NOCOUNT ON

    SELECT 1 AS Id, 1 AS UserId, 1 AS SomeOtherId, 
        CAST('AAA' AS NVARCHAR(350)) AS Name,
        -- etc etc etc..
    /* 
    .... every thing in here is commented out 
    */
GO

```

[and then](http://www.youtube.com/watch?v=K7luMp6lb9M) ...


4. Add this stored proc to your EF designer/wizard/etc... Now the correct fields should be 'determined' by the designer. AWESOME. Yes .. the values are all hardcoded .. but that's ok (so far).
5. Once your happy that EF is now updated right, go back to your stored proc, and remove all hardcoded SELECT (which we did in the above step). Now we remove the comments which we commented out the entire real code. So you should have your original stored proc, back.


... and now EF is updated and doesn't know we've changed the plumbing of your stored proc.


win :)


does this work for ya? thanks everyone for your suggestions. i went with a modified version of [@weekend](/u/weekend)’s:

[[screenshot from 2020-02-22 06-44-57]](https://media.blenderartists.org/uploads/default/original/4x/a/d/6/ad62e605b45c9294a1a33960e705f2a07772113c.jpeg "screenshot from 2020-02-22 06-44-57")

since the idea was to have the ability to have the arrows appear independently, instead of simple subtraction, i fed the result through nodes equalling 1-4x^2, which is an inv… May be the function is executed before the document is ready.
Try to use document.ready function like this:



```
$( document ).ready(function() {
    $('#machines').change(function() {
        var $selected = $(this).find(':selected');
        $('#description').html($selected.data('description'));
    }).trigger('change');
});

``` The behaviour must be because you are appending the same array to both of the arrays.  

Try appending a different array for cell*code and cell*type separately. [@sunlightworking](/u/sunlightworking) this is only a start but you could have fun using subd to model it, break the shape into 2 repeating ‘arms’ that then join together.

[[viewcapture20210611\_093810]](https://aws1.discourse-cdn.com/mcneel/uploads/default/original/4x/b/9/e/b9ec0eea392ef36150b75631db22d3817573de5b.jpeg "viewcapture20210611_093810") edit this class:

.swiper-pagination

you can inspect and style it to be whatever you want with the command:

ionic serve When designing for a variety of resolutions you want to scale down, not up. Do your design in a @2x resolution (640 x 960 @72ppi) and for the @1x assets you duplicate them to a new document (preferably) and scale them down by 50%. You can set up a Action script for this also to make the process go by faster. To learn a bit about Photoshop action script you can have a look [HERE](https://www.youtube.com/watch?v=BRpPGiGXcHc).


As for your second question, [HERE YOU GO](https://www.dropbox.com/s/sczltvow7jgtfiy/iPhone%204%20GUI%20PSD%20Retina%20Display.psd). The "reload" symbol you were after can be found in that Retina asset sheet, a sheet that is very good to have for anyone who wants to design for iPhone. The problem is that your pair's closure must return two different types of objects: int if you ask for "con", and the next closure on the line if you ask for "crd".


Here's one possible implementation:


Use a speaker so you can come back.



```
public static Func<string, dynamic> Pair(int x, Func<string, dynamic> y)
{
    Func<string, dynamic> pair =
           (a) =>
           {
               if (a == "con") return x;
               if (a == "crd") return y;
               throw new Exception();
           };

    return pair;
}

public static void Print(Func<string, dynamic> pair)
{
    while (true)
    {
        var next = pair("crd");
        Console.WriteLine((next == null ? "-":"+") +"> " + pair("con"));
        if (next != null)
        {
            Console.WriteLine("|");
            pair = (x) => next(x);
            continue;
        }
        break;
    }
}

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```


  




 (adsbygoogle = window.adsbygoogle || []).push({});
 
  

Test:



```
var pair = Pair(1,
            Pair(2,
                  Pair(3,
                        Pair(4, null))));

Print(pair);

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```

output:



```
+> 1
|
+> 2
|
+> 3
|
-> 4

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
``` hi

we can do that by defining a string variable in the very beginning of the process with assign activity or by defining that in variable panel in the studio at the bottom the window

but make sure that we are not assigning any value to that variable later across the workflow

if we assign later th… hi @checkout,if i was in your shoes. i would create a new view in your airtable for the records with completed ids. the use the airtable trigger “new record in view” select the correct view and create your action email from there.kind regards,https://www.seundebiyi.com/