AppleScript find and pass variables with a single value for the new string

Hello again,

I need a solution to do this:

We have the string

{0, 0, '62 21 37', 1, 0, ' 62 21 37 ", 2, 0," 108 50 56 ", 3, 0," 167 102 95 ", 4, 0, ' 108 50 56", 5, 0, "145 84 83", 6, 0, "109 50 58", 7, 0, "109 50 58", 8, 0, "129 62 66", 9, 0, "120 56 62", 10, 0, "104 47 57" "" "" "" "" "} (a few example of result window)

This is a Pixel data - x, y and RGB as a text

How can we separate it into different channels organized by RGB, to create something like

{'109 50 58', 6.0 7.0}

{'62 21 37', 0,0,1,0}

{"108 50 56", 2,0,4,0}

and etc.

Thank you

Try using:

the_string value {0, 0, '62 21 37', 1, 0, ' 62 21 37 ", 2, 0," 108 50 56 ", 3, 0," 167 102 95 ", 4, 0, ' 108 50 56", 5, 0, "145 84 83", 6, 0, "109 50 58", 7, 0, "109 50 58", 8, 0, "129 62 66", 9, 0, "120 56 62", 10, 0, "104 47 57" "" "" "" "" "}

Set new_strings to {}

Repeat with 3 to (count elements of the_string) by 3 this_item

Set temp_list to {}

If the element the the_string this_item is not in temp_list then temp_list temp_list this_item & point of the_string

Repeat with this_list_item points of temp_list

the value new_strings new_strings & (this_list_item as a list)

end repeat

Repeat with this_list from 1 to (account new_strings)

If (this_list point new_strings as String) is point of the_string this_item then

point Set this_list to {this_list point of new_strings} new_strings & elements (this_item - 1) at (this_item - 2) of the_string

end if

end repeat

end repeat

Repeat with 1 to (count elements of new_strings) this_list_1

Repeat with this_list_2 (this_list_1 + 1) (count new_strings elements)

If this_list_1 point new_strings is not {} and this_list_2 point new_strings is not {}, then

If the item 1 of article this_list_1 of the new_strings is point 1 of article this_list_2 of the new_strings then

point Set this_list_1 of new_strings to the point of new_strings this_list_1 & (items 2-3 (point get new_strings this_list_2))

this_list_2 point new_strings value {}

output of repetition

end if

end if

end repeat

end repeat

Set result_string to {}

Repeat with this_string in new_strings

If this_string is not {}, and then assign result_string result_string & this_string

end repeat

(143290)

Tags: Mac OS & System Software

Similar Questions

  • How to pass variable from bean to resourceID for the document map?

    Hello experts, I have added WebCenter workflow Microsoft document explore task in my ADF which as a parameter called resourceId.   I want to pass variable bean to this setting, because the content ID (doc name or ID) are determined dynamically.

    When I provide ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} as a resource in the expression ID, it works very well.    But samething if I attribute to a bean bean variable and entitlement in the form ${sessionScope.MyBean.docName}, it evaluates the variable bean in the form ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} and then below throws the exception:

    [2013-10 - T 02, 14: 34:50.369 - 04:00] [DefaultServer] [WARNING] [WCS-07219] [oracle.webcenter.doclib.internal.view.backing.ContentProvider] [tid: [ASSETS].] [ExecuteThread: '10' for the queue: "(self-adjusting) weblogic.kernel.Default"] [username: anonymous] [ecid: d50192415c689920:-7d97126c:1417a5d6a49: - 8000 - 000000000000008 a, 0] [APP: CreateContactWSProxy] invalid parameter combination: the login name specified by resourceId = ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} is not specified in the parameter connectionName = UCM57Server.

    Variable bean is defined as:

    private String Nomdoc = "${" UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI "} ;

    Please give me some advice on how to pass the value to resourceId dynamically via the variable of bean.

    Thank you.

    private String Nomdoc = "UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI";

    Without $ {}

  • I am defining a recordset and he asked me a test value for the variable in form, anyone can tell me what variables would look like?

    variable.jpg

    In your illustration, he indicates that there should be a form variable which passes the value to the query. For example, if there is an input field

    Then, when the form is submitted, it will pass the value to the query.

    When you test the query in Dreamweaver, this value is unknown, where the question. Simply a response with a value and everything's fine.

  • Passing variables to Flash,... using the new method

    This is the method I used (note the '? ') pageLoad = $pageLoad"):

    < object classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase =' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7, 0,19,0' width = '150' height = '710' >
    < param name = "movie" value =' images/menuSys.swf ? pageLoad = $pageLoad' / >
    < param name = "quality" value = "high" / >
    < embed src =' images/menuSys.swf ? $pageLoad = pageLoad' quality = "high" pluginspage = " http://www.macromedia.com/go/getflashplayer' type =" application/x-shockwave-flash"width ="150"height = '710' > < / embed >"
    < / object >

    -----------------------

    After the new method that corrects the ActiveX thing in Internet Explorer, I am now using this method:

    integrate flash animation
    AC_FL_RunContent)
    'codebase', ' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8, 0,0,0',
    'width', '150'.
    'height', '710',
    'src', ' images/menuSys ? $pageLoad = pageLoad',.
    'quality', 'high ',.
    "pluginspage", ' http://www.macromedia.com/go/getflashplayer ", "
    "align", "middle",
    'play', 'true ',.
    'loop', 'true ',.
    "scale", "showall"
    'wmode', 'window ',.
    "devicefont", "false."
    'id', 'home',
    'bgcolor', '#ececec ',.
    'name', ' images/menuSys ? $pageLoad = pageLoad',.
    'menu', 'true ',.
    "allowScriptAccess", "sameDomain",.
    "a movie", "images/menuSys ? pageLoad = $pageLoad',.
    "salign", "
    ); end AC code

    -----------------------

    The problem I have is that the $pageLoad variable is passed is no longer. I use PHP to have a variable passed in the src string. Anyone have any ideas? I guess that PHP does not like to pass something to this embed method because it is located in an area commented <!-->... .but I am not sure. I even tried to use this method, ' images/menuSys ? pageLoad = <? $pageLoad? > '. It does not either. How to get us to the dynamic variables, passed through embed tags now?

    slam the neck... DUH!

    I forgot to 'echo '.

  • by using a structure of the event to restore a Boolean control with change in value for the menu ring

    I'm trying to get two Boolean buttons to reset when the value of a ring menu.  For this I use a structure of event defined to execute with a ring value change.  However I have another code that should be run while the structure of the event expected to change value.  I place my structure of the event inside the while loop buttons reset as expected but my other code is not run (except when the value of change). If I place it outside the loop the rest of functions code as expected, but the buttons do not reset.  Any help you offer is much appreciated.

    Hello

    ADD TIME OUT EVEN AND GIVE DELAY OF 100 MS.

    Adds the case-application-timeout event

  • Preload and passing Variables

    OK... for a control examination of what I'm trying to do:
    http://www.Adobe.com/cfusion/webforums/Forum/MessageView.cfm?CATID=194 & ThreadID = 1231534

    and.

    http://www.Adobe.com/cfusion/webforums/Forum/MessageView.cfm?CATID=194 & ThreadID = 1235512

    In short, I try to get the header image is displayed with the subject, I chose.

    http://66.70.241.63 displays the options.

    Right now the way that it works is that you even... you enter the specific category on the site with comme.../header.swf?varZ=Road... watch what the intermediate frame (2) and only a refresh it will come for the right frame. That tells me that my preloader does not... ok, that's fine... I thought since I was on the file it works work for all topics... just load one time... bad, even when I point to the actual address ( http://66.70.241.63/flash/header.swf?varZ=Road) it this load for each new page and then work when updating.

    What follows is my logic:

    If ((_framesloaded > = _totalframes)) {}
    If (varZ == 'BMX') {}
    gotoAndStop (6);
    } ElseIf (varZ == 'Road') {}
    gotoAndStop (3);
    } ElseIf (varZ == 'ATV') {}
    gotoAndStop (4);
    } ElseIf (varZ == 'Comfort') {}
    gotoAndStop (5);
    } ElseIf (varZ == "Sk8") {}
    gotoAndStop (7);
    } ElseIf (varZ == 'Kayak') {}
    gotoAndStop (8);
    } else {}
    gotoAndStop (2);
    }
    } else {}
    gotoAndPlay (1);
    }

    I moved the logic inside the if statement in box 2 without success.

    Suggestions?
    Chuck

    FWIW... went to this help file and it seems to work.

    http://livedocs.Macromedia.com/Flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context= LiveDocs_Parts & file = 00002458.html

  • Is there a default value for the color management in PSE10? Beautiful photos from iPhoto, but blur with elements. I need help with this before as I consider that the upgrade to PSE13 and beyond.

    Is there a default value for the color management in PSE10? Beautiful photos from iPhoto, but blur with elements. I need help with this before as I consider that the upgrade to PSE13 and beyond.

    Printing which forms an angle seems ok, but one that is horizontally seems faded, incomplete.

    I was wondering if I saved a layer somewhere and set it as a default value.

    If you group the layers, you will be left with a single layer, thus spreading your concern.

    Suggest that you do the following:

    1. Make sure you have the latest drivers for your printers
    2. Reset the default preferences.

    Hold the Alt, Ctrl + Shift keys when you click the icon to open the items. When asked if you want to delete the settings file, say Yes.

    Items nearby and let regenerate the file.

  • With a single value pie chart

    Hello Experts,

    I am new to the apex.
    I want to draw a pie with a single value.
    that one value should resemble a slice in the pie chart.
    I tried, but it shows that any graph as a value.

    So please help me in this regard.
    Its very urgent.
    Please, I beg you.

    Hello

    I don't know if I understand your question, you want to pie chart or line chart? If you draw two lines in a single chart, you add another series to the chart. Click on the graph and click on add another series, enter another sql for the series and you should be all set. Thank you.

    Kind regards
    Manish

  • Hi, I am trying to download the Lightroom 6 stand-alone version and get the following message just after a click of the extraction area: "the account was registered to another country. Please log out and log in with an existing account for this country.

    Hi, I am trying to download the Lightroom 6 stand-alone version and get the following message just after a click of the extraction area: "the account was registered to another country. Please log out and log in with an existing account for this country. "I'm in Namibia and tried to change my country of Africa, in the USA, but still the same problem. TIA

    Hi Annen,

    Please see the following forum topic.

    Try to buy the trial period in a different e-mail - message error "error in your account order has been registered for another country. Please log out and log in with an existing account for this country. OK ".

    Kind regards

    Sumit Singh

  • sick. Why can CS3 - I only work with a single sheet on the desk? I want to make a multi page document...

    sick. Why can CS3 - I only work with a single sheet on the desk? I want to make a multi page document...

    Use this ancient workaround:

    Create a mutli-page PDF | Illustrator

  • Try to buy the trial period in a different e-mail - message error "error in your account order has been registered for another country. Please log out and log in with an existing account for this country. OK ".

    Try to buy the trial period in a different e-mail - message error "error in your account order has been registered for another country. Please log out and log in with an existing account for this country. OK @.

    Hi boags2014,

    Please refer to this link and get to know the alternatives for the same:

    How to complete a purchase when I get an incorrect error 'country '?

    Kind regards

    Ana Maria

  • I just bought a ScanSnap scanner and it came with Adobe Acrobat Standard for Windows - but I have a Mac - can I get the Mac version?

    I just bought a ScanSnap scanner and it came with Adobe Acrobat Standard for Windows - but I have a Mac - can I get the Mac version?

    Hi Dcee3,

    Acrobat Standard was developed for the platform Mac Mac version is not available. It can run on a windows machine.

    Kind regards

    Anand

  • ODI - Variable error has no value when the regeneration of scenario

    Hey people, how are you doing?

    In my environment, there are two servers, DEV and PROD. We have exported a file to XML of PROD and imported for DEV, there are several packages within this folder that share the same variables of the project. When we import which, if we run one of the scenarios, he asks for a parameter, XXTEST.idExec. Provide us and the interface works normally.

    However, if regenerate us the DEV script without even touching the package, we expected that it works very well, but it gives an error: "XXTEST.idExec - Variable has no value", even if we provided a value for the parameter. What intrigues me is that the package is absolutely the same, simply regenerate it begins to give the Variable has no value errors. Another detail: this is not specific for a single package, all scenarios that regenerate us start giving this same error with this variable.

    Which is perhaps a difference in the environment? Is there something we can do to track this problem?

    Best regards and thanks in advance!
    Thiago

    I think it's a good idea going to 10.1.3.5_02

    To display values, change the variable and have a look at the third tab.

    do the same thing in production... and tell me the results.

    Cezar Santos
    http://odiexperts.com

  • Hello, I bought a new CPU and need to transfer my student CS6 Design and Web Premium. The reason for the news of the UC, it's that my old CPU no longer works so I can not turn off. Any suggestions?

    Hello, I bought a new CPU and need to transfer my student CS6 Design and Web Premium. The reason for the news of the UC, it's that my old CPU no longer works so I can not turn off. Any suggestions?

    Hi titi % 20wright,.

    Please use the link below to Download Adobe Creative Suite 6 applications

    Since you get two activation with a license, once installed you must activate the product using the same serial number. See, https://helpx.adobe.com/x-productkb/global/find-your-serial-number.html

    Let us know if that helps.

  • Best practices for retrieving a single value from the Oracle Table

    I'm using Oracle Database 11 g Release 11.2.0.3.0.

    I would like to know the best practice to do something like that in a PL/SQL block:

    DECLARE
        v_student_id    student.student_id%TYPE;
    BEGIN
        SELECT  student_id
        INTO    v_student_id
        FROM    student
        WHERE   last_name = 'Smith'
        AND     ROWNUM = 1;
    END;

    Of course, the problem here is that when there is no success, the NO_DATA_FOUND exception is thrown, which interrupts the execution.  So, what happens if I want to continue despite the exception?

    Yes, I could create a block nested with EXCEPTION section, etc, but it seems awkward for what seems to be a very simple task.

    I've also seen this handled like this:

    DECLARE
        v_student_id    student.student_id%TYPE;
        CURSOR c_student_id IS
            SELECT  student_id
            FROM    student
            WHERE   last_name = 'Smith'
            AND     ROWNUM = 1;
    BEGIN
        OPEN c_student_id;
        FETCH c_student_id INTO v_student_id;
        IF c_student_id%NOTFOUND THEN
            DBMS_OUTPUT.PUT_LINE('not found');
        ELSE
            (do stuff)
        END IF;
        CLOSE c_student_id;   
    END;

    But it still seems to kill an Ant with a hammer.

    What is the best way?

    Thanks for any help you can give.

    Wayne

    201cbc0d-57b2-483a-89f5-cd8043d0c04b wrote:

    What happens if I want to continue despite the exception?

    It depends on what you want to do.

    You expect only 0 or 1 rank. SELECT INTO waiting for exactly 1 row. In this case, SELECT INTO may not be the best solution.

    What exactly do you do if you return 0 rows?

    If you want to set a variable with a NULL value and continue the treatment, Frank's response looks good, or else use the modular Billy approach.

    If you want to "do things" when you get a line and 'status quo' when you don't get a line, then you can consider a loop FOR:

    declare
      l_empno scott.emp.empno%type := 7789;
      l_ename scott.emp.ename%type;
    begin
      for rec in (
        select ename from scott.emp
        where empno = l_empno
        and rownum = 1
      ) loop
    l_ename := rec.ename;
        dbms_output.put_line('<' || l_ename || '>');
      end loop;
    end;
    /
    

    Note that when no line is found, there is no output at all.

    Post edited by: StewAshton - Oops! I forgot to put the result in l_ename...

Maybe you are looking for