Select the line of contour based on static text

Hello

Thank you much in advance.

As I'm fairly new to AppleScript, I don't know what is and what is not possible. My goal is to have a single script that works for 7 of our branches and about 1,500 people. The idea for the script is:

1. ask the user some basic questions (like "which office are you?" and "What is your code print?" - already scripted.)

2 something here to select the appropriate section of the code required for these specific functions. In other words, if user pics office 1 go to any section of the code that corresponds to the office 1 if 2 go 2, etc. - not scripted, I'm used to something like goto, but if I understand well there is no such thing with ACE

3. based on the information in the point 1, if possible, download a file from the internet (a package) and install it. I guess I should wait or pop to draw their attention to the fact that they would need their password and wait they ended as a dialog box. I know that the password is not scriptable. - not scripted

4. a procedure (for each location but very similar) script:

4.1 find if printers have been installed (based on the content of the Printers & Scanners window and printer names). - ongoing

4.1.1. If so, select and remove.

4.1.2 if not, continue

4.2 install printers for this office. - scripted.

4.3. implement their code printing with a couple of presets - scripted

Where I am stuck currently is:

1 choice of the line of the scroll printers area contour & Scanners based on the name of the printer. I try this, but it does not work (for some reason any CRUDE HTML does not work):

Tell application "System events" tell process select 'System Preferences' (first line of end of plan 1 zone 1 scroll the window 1, including the value of static text 2 is "SAvin_372BC" tell end tell

Accessibility Inspector is telling me this:

AXApplication > AXWindow:AXStandardWindow > AXScrollArea > AXOutline > AXRow:AXOutlineRo w > AXCell > AXStaticText for the text where the Savin_372BC is displayed. I found this and tried to do something similar to script, but obviously I did not. As I do not know how many printers user will have I need for AS through, find those that we install and remove them if they are present and move along, otherwise - move along.

2. how script logic? As I mentioned previously, I'm used to goto, so it would be to ignore whatever the section, I need to continue from. What would be the AS version for goto?

3. using the script and without install anything that anyone else who isn't Apple, how do I download a pkg in / downloads? CURL?

4. I'm not there yet, but no matter what magic trick as waiting for an entry for the Mac password?

Thanks a lot again!

I'm used to something like goto, but if I understand well there is no such thing with ACE

The man.  GoTo went in disgrace for 40 years!  No modern language has goto. GoTo lead unrestricted branching which resulted in convoluted code.  A fluidity in the code is desirable.

From this page:

http://computers.tutsplus.com/tutorials/if-and-if-else-AppleScript-conditional-s statements - mac-45590

------------------------------------- AppleScript

Learn AppleScript: The comprehensive Guide to Scripting and automation on Mac OS X, the book of the third edition

AppleScript Language Guide pdf Download pdf file

Intro to applescript with the sending of an email
http://Mac.AppStorm.NET/how-to/AppleScript/the-ultimate-beginners-guide-to-Apple script.

Tags: Mac OS & System Software

Similar Questions

  • Select the line with the smallest Beach

    Hello
    I am trying to build a complex query...
    He must select the line with the inner range...

    I'll explain for example:
    Location of poolsize ID value
    1 32 8
    2 40 6
    3 42 8
    4-36-3

    I want to select the line where the fork between value and value + poolsize is shared also with the other location...
    so:
    1 is 32-40 (in A place)
    2 is 40-46 (in place)
    3 is 42-48 (location B)
    4 is 36-39 (at location B)

    4 is located at 1 (and there are different places...) so sql must return to the fourth line.

    Any help will be appreciated!

    Thank you
    fcbman

    Hello

    fcbman1899 wrote:
    Hello
    I am trying to build a complex query...
    He must select the line with the inner range...

    I'll explain for example:
    Location of poolsize ID value
    1 32 8
    2 40 6
    3 42 8
    4-36-3

    Whenever you have a problem, please post CREATE TABLE and INSERT statements for your sample data, in order to let the people who want to help you re-Ridge the problem and test their ideas.
    See the FAQ forum {message identifier: = 9360002}

    I want to select the line where the fork between value and value + poolsize is shared also with the other location...
    so:
    1 is 32-40 (in A place)
    2 is 40-46 (in place)
    3 is 42-48 (location B)
    4 is 36-39 (at location B)

    4 is located at 1 (and there are different places...) so sql must return to the fourth line.

    To find all the rows that are within the range of at least one other line with another location:

    SELECT     *
    FROM     table_x  m
    WHERE     EXISTS (
                 SELECT  1
                 FROM        table_x
                 WHERE   location          != m.location
                 AND        value          <= m.value
                 AND        value + poolsize     >= m.value + m.poolsize
                )
    ;
    

    When you talk of the "" * most * inner range ", do you mean that you might have another line, such as"

    INSERT INTO table_x (id, vlue, poolsize, location) VALUES (5, 37, 1, 'C');
    

    which is inside the range of id - 4, and that's why you wouldn't have id = 4? If so, include examples in the results and data sample yout. You can do this with a query CONNECT BY, or, depending on your version of Oracle, a WITH recursive clause.

  • Automatically select the correct check box based on choices made in the previous section?

    With the help of LiveCycle to create a form that contains a table. This table has 3 columns with 15 boxes in each column.

    Here are these 15 rows 3 more boxes that have calculated values. In each row of the table one of the checkboxes can be active at a time.

    Based on the majority of choices in a column of some, the calculated corresponding checkbox must be verified. (If most of the choices are made in column 1, then the 1st calculated box must be marked, etc...)

    The sentence that I am writing the JavaScript code that selects the checkbox correctly calculated. Currently, I'm just trying to understand it with only 3 first lines and I can reproduce the template after.

    Table e.g.: ("BOLD" is calculated)

    CheckBox20CheckBox35CheckBox50
    CheckBox21CheckBox36CheckBox51
    CheckBox22CheckBox37CheckBox52
    [CheckBox66][CheckBox67]

    [CheckBox68]

    Here's the code I came up with that day, but it does not just anyone, although when I used it it worked just to 2 columns. (just added the part about the third column in the instructions 'or')

    (In the script for the calculation of box 66)

    //larger values than other columns
    if ((Row1.CheckBox20.rawValue == "") + (Row2.CheckBox21.rawValue == "") + (Row3.CheckBox22.rawValue == "") > (Row1.CheckBox35.rawValue == "") + (Row2.CheckBox36.rawValue == "") + (Row3.CheckBox37.rawValue == "") || (Row1.CheckBox50.rawValue == "") + (Row2.CheckBox51.rawValue == "") + (Row3.CheckBox52.rawValue == ""))
     {this.rawValue = "0";}
    
    //smaller values than other columns
    if ((Row1.CheckBox35.rawValue == "") + (Row2.CheckBox36.rawValue == "") + (Row3.CheckBox37.rawValue == "") || (Row1.CheckBox50.rawValue == "") + (Row2.CheckBox51.rawValue == "") + (Row3.CheckBox52.rawValue == "") > (Row1.CheckBox20.rawValue == "") + (Row2.CheckBox21.rawValue == "") + (Row3.CheckBox22.rawValue == ""))
     {this.rawValue = "1";}
    

    I'm new to JavaScript for all advice is appreciated.

    Looking at the conditions, it seems you are trying to say "If column 1 column 2 or column 3, then do something." JavaScript cannot read conditions like that. It's playback "if (column 1 column 2) GOLD (column 3), ' and he doesn't know what to do with this issue of column 3, except if it is 0 or 1.

    Here is an example of use of only two lines and three columns. The rawValues are 0 and 1 for each check box. I have it set so that if column 1 has several checkboxes, then Col1 gets checked. Similarly, the col2 or 3 boxes will be checked if their columns are the most populated. I don't get the opportunity to have several boxes marked if there are two columns that have the same number of boxes checked. (You can do this by just changing > to > = in the conditions.)

  • Select the lines with the maximum value for a date where another column is different from 0

    Hello

    I need to write a query on a table (called DEPRECIATION) that returns only the rows whose date maximum (PERENDDAT_0 column) for a specific record (identified by AASREF_0), and where the other column in the table called DPRBAS_0 is different from 0.

    If DPRBAS_0 is equal to 0 in all the lines of a specific record, then return the line with date maximum (PERENDDAT_0 column).

    To be clearer, I give the following example:

    Suppose we have the following data in the table of DEPRECIATION:

    AASREF_0 PERENDDAT_0 DPRBAS_0
    I2011001074331/12/20150
    I2011001074331/12/20140
    I2011001074331/12/20130
    I2011001085612/31/20160
    I2011001085631/12/20150
    I2011001085631/12/2014332
    I2014001223812/31/2016445
    I2014001223831/12/2015445
    I2014001223831/12/20140

    The query must return only the following lines:

    AASREF_0 PERENDDAT_0 DPRBAS_0
    I2011001074331/12/20150
    I2011001085631/12/2014332
    I2014001223812/31/2016445

    Thanks a lot for your help!

    This message was edited by: egk

    Hello Egk,

    The following query works for you.

    SELECT AASREF_0, PERENDDAT_0, DPRBAS_0

    FROM (SELECT AASREF_0,

    PERENDDAT_0,

    DPRBAS_0,

    ROW_NUMBER)

    DURING)

    AASREF_0 PARTITION

    ORDER BY

    CASE WHEN DPRBAS_0 <> 0 THEN 1 OTHER 0 END DESC,.

    PERENDDAT_0 DESC)

    RN

    DEPRECIATIONS)

    WHERE rn = 1

  • Do not select the line concerned

    Hello

    I have a problem a few weeks ago, I was using Jdeveloper 11.1.1.4.0 and our server has WLS 10.3.4 and there has not been a problem
    Now server have 10.3.6 and I use 11.1.1.6.0 and I have a problem with the line incorect.

    When I select a line and you want to browse this line always I got the first row data in the list, which can be a problem?


    ID

    Edited by: 1D10T 26 September 2012 02:43

    Edited by: 1D10T October 4, 2012 01:56

    Edited by: 1D10T October 4, 2012 01:57

    do you mean like this, so that am switch to this version, you stumbled upon problem. are the benefits?

  • [JS, ID5 SVR] select the line that contains vertically merged cells

    Hello

    I want to put the line type lines that contains vertically merged cells. Example of lines containing merged cells:




























    When a line defined as myTable.rows [1], it returns an error. How to get to the second and third rows.

    Best regards, Sjoerd

    How simple it can be:

    var myDoc = app.activeDocument;
    
    var myTables = myDoc.stories.everyItem().tables.everyItem().getElements();
    
    for (i=0;i
    

    I'm a rookie, that's for sure...

  • Change the color of the lines of Mac PE 3.0/text layers?

    I have a picture in the background layer to which I've added lines and text in several layers. I want to change the color of the lines and text without having to change each layer individually. Is it possible to do this in Macintosh PE 3.0?

    If the text of text layers you can link text and layers with one of the linked text layers selected in the layers palette

    the tool selected text, press the SHIFT key and choose your color in the options toolbar.

    Are the lines of the shape layers or layer pixelated?

  • The lines crossed or underlined in my text

    I have a problem with the lines in some areas of text in a document that was imported from quark. It is not a rule for the paragraph style, a line of bar or underlined text changed with a vertical offset. It is not on every page with a similar layout. It appears in the PDF file and can be erased as a line in acrobat, but I want to delete it at the source of the problem.

    Here's an example of how it appears in the indesign document.

    Screen Shot 2016-07-22 at 3.06.25 PM.png

    Here's how it appears in the PDF file.

    Screen Shot 2016-07-22 at 3.07.18 PM.png

    Here is a page with a similar provision which does not show the problem.

    Screen Shot 2016-07-22 at 3.18.07 PM.png

    Here's how that appears in the PDF file.

    Screen Shot 2016-07-22 at 3.27.24 PM.png

    BTW, have you checked the paragraph above and below NET?

  • Select the line of the classic report to pass the value to another classic report on the same page

    Hello

    First a few details about the environment - I use the image of the last download oracle VM developer days to oracle.com. This includes DB version 12.1.0.2 and version 4.2.5.00.08 Apex. For the question although I don't know the specifics of the versions that are relevant.

    What I want to do an apex page which includes an analytical section at the top, followed by a section of retail slot - a line is selected / highlighted at the top which causes the relevant lines in this summary line is displayed. Its screen basically a master-detail - however the source of these two sets of data is just a query - is not a table.

    The query at the top of the page is something like

    Select * summary

    and the section below is

    Select * from details where id = (the value of the id clicked in the summary above)

    This feels like it should be really easy (and indeed, it is for the tables through the apex of master-detail Wizard) - but I can't understand when the two sets of data are the result of queries.

    I can't seem to make reference to the elements of the page when it comes to a report and I think that I might need to go down a kind of dynamic route of actions and jquery, but I don't get very far very fast. I found some notes that seem similar, but nothing which does exactly what I want. The function APEX_APPLICATION to browse a table also doesn't seem to be possible for the output report that I could see (tags are not there) - what is relevant for the forms?

    I hope that I have explained that quite simply.

    Can anyone help?

    See you soon,.

    Rich

    You link column can be just a null value in the sql code, if you want. Change the column and head down to the link attributes.

    Text link: "Click me" (source of sql using #MY_COL columns or #)

    Target: URL

    URL: javascript: $s ('P1_ITEM', #ID);

    Then have onChange dynamic action on P1_ITEM which updates the State. Do not forget to present the value of session state (either property right under the sql or pl/sql prior to update action report). The database needs to know the value of browser before running the query.

  • How to select the lines/odd table...

    How to select lines / odd in a table?
    Help, please.

    Published by: vaibhav on May 7, 2012 05:30

    This can be done by using the function mod like this:

    For even rows
    Select * from (select rownum rn, nom_table.* from tableName) where mod (rn, 2) = 0;

    For the odd lines
    Select * from (select rownum rn, nom_table.* from tableName) where mod (rn, 2) = 1;

  • Need to run a query to select the number of charges based on each month

    Let's say I have a talble with 12 months, each month has some data.

    I want to run a count (*) select to get the result of how many lines a month, like Jan - Feb - 90, 100, etc..


    How do I do that?

    Thanks in advance.

    Try this...

    select to_char(sysdate,'Month'), count(*) from table_name
    group by to_char(sysdate,'Month');
    

    Concerning

    UMI

  • Highlighting the lines of State based on the results of the report

    Hello! I think it's an easy question, but I have not found an answer for her through the forums looking. Is there a way to highlight or change the colors of some dependent lines on the result set data? I'm trying to display transaction data of the customer for call center agents and highlight some rows based on the values in the results...

    Thank you very much!

    You can view a customized report (column model) model - they give you 4 places for the conditions. Here is an example:

    Column Template 1: #COLUMN_VALUE#
    Column Template 1 Expression: '#1#' like '%Total%'
    

    #1 # being the first column in your results. This isn't bad if you only need 4 conditions and know the placement of your fields - you just configured different look and feels in your CSS and change the class according to the criteria.

    Here's another way:
    http://Apex.Oracle.com/pls/OTN/f?p=11933:7

    Hope that helps...

  • How to select the lines whose value min on a specific column

    I have a query:

    Select

    m.X1,

    round (to_date (l.y1, ' dd/mm/yyyy hh: mi: SS AM')-m.x 2, 0) as numofdays

    Of

    Table 1 m,

    Table2 l

    where

    l.x3 = m.x3 and

    TO_DATE (l.y1, ' mm/dd/yyyy hh: mi: SS AM' ') > = TO_DATE('01012013','MMDDYYYY') and

      ... ;

    and I got this result table:

    x 1 (ID) NumOfDays
    0015

    001

    1000220033003140 °000566......

    several IDs have several values on the second column, I want to have only separate IDs with smaller "numofdays' like this:

    x 1 (ID) NumOfDays
    0015
    0022
    0031
    0040
    00566
    ......

    Any ideas?

    Hello

    The more general and more versatile way is a Request of Top - N:

    WITH got_r_num AS

    (

    Select

    m.X1,

    round (to_date (l.y1, ' dd/mm/yyyy hh: mi: SS AM')-m.x 2, 0) as numofdays

    ROW_NUMBER () OVER (PARTITION BY m.x1

    ORDER BY to_date (l.y1, ' mm/dd/yyyy hh: mi: SS AM' ')-m.x 2

    ) AS r_num

    Of

    Table 1 m,

    Table2 l

    where

    l.x3 = m.x3 and

    TO_DATE (l.y1, ' mm/dd/yyyy hh: mi: SS AM' ') > = TO_DATE('01012013','MMDDYYYY') and

    ...

    )

    SELECT x 1, numofdays

    OF got_r_num

    WHERE r_num = 1

    ;

    If you would care to post CREATE TABLE and INSERT statements for your sample data, then I could test it.

    Note that the subquery (got_r_num) is exactly what you have posted, only with a new column (r_num) added to the SELECT clause.

  • How to hide and show based button if the line is selected in a table

    Hello

    IM pretty new to apex. I use version 4.1. I have a tabular form and I want to do is only have the button Show delete if I select a row in the column [line selector]. Is this possible using a dynamic action? I tried this way without success. Please help or let me know if you need more information.

    Thank you

    Do you mean if the box is checked in the line?

    Assign a static ID for the button Delete, for example MY_DEL_BTN. Search for 'Static ID' in the attributes of the button section.

    If so, do an advanced Click-based dynamic Action and a jQuery selector. Generally, this element is the name "f01" but, sure. Assuming that it is "f01" then your jquery selector would be:

    input[name="f01"]
    

    define the scope of the event live.

    Your dynamic action will trigger JavaScript. (BE SURE TO DESELECT FIRE ON PAGE LOAD). To make sure that you have the jQuery selector right, initially just to put a pop-up message in the JavaScript.

    alert('You Clicked the Row Selector!');
    

    Run the page. Click on the line selector. If you get the noise until you have specified the jQuery selector correctly. Yay!

    Then, assuming the above is correct. You can now determine if all have been selected.

    Now, set it to SELECT FIRE on PAGE LOAD (you want deleting DialogResult.Cancel when you open the page).

    Change your JavaScript like this:

    var checkedCnt = $("input:checked").length;
    
    if( checkedCnt > 0 )
    {
       $('#MY_DEL_BTN').show();
    }
    else
    {
       $('#MY_DEL_BTN').hide();
    };
    

    -Joe

  • Select the same lines in chart

    Hello

    I have the table and I would like to draw only the data points in pairs of lines in a table. Unfortunately, the data field in the series tab does not appear to support formulas, so something like (MOD (ROW (a1: a10), 2) = 0, a1: a10 does not.) Anyone have any ideas on how to automate this?

    Hi PretzelDingo,

    Try this on a copy of your table.

    Same type, Odd in the first two lines and drag the handle to fill yellow down.

    Sort by column C.

    Select the lines that "same" and insert the chart.

    Kind regards

    Ian.

Maybe you are looking for

  • E-mail message full automatic download (incl. attachment) on iPad - so I can work offline on emails

    I would totally and automatically download my emails (including attachments) when connected to the network (WiFi or 4 G), so that I can work on my emails when 'off line' (i.e., plane). Now, I often get the error message 'message not downloaded from t

  • error when deleting the history of Shockwave

    Whenever I try to delete my history or cookies, I get error message saying: Shockwave Player error To view the movie, open your browser in the 32 - but mode. (1) in Safari, select Safari/Applications in the Finder, click on more information(2) make s

  • Cannot start Portege M200 from SD card

    Hello I recently bought a used Portege M200 and I'm unable to install an operating system. The situation: I got the laptop with a trial version basis of win XP Home Edition I couldn't use. It would not boot from external dvd player usb I bought, so I

  • Tablet locked out

    I forgot my password of my 7 inch Tablet dual power. I need help bypasing password not to lose my data. But if need to master reset, how? There is no volume key button

  • LaserJet Pro M402n: LaserJet Pro M402n iPad printing

    I have connected my printer to my Mac via a usb cable. I use HP Easy Start to install my printer. It prints very well since the Mac via the usb port. I would like to print wireless from my Ipad2. How do I configure this? The litreture sale says that