Skip navigation

How to check the checkbox of Adobe Installer with the Aplescript??

618 Views 8 Replies Latest reply: Dec 19, 2013 8:36 AM by Pierre L. RSS
madhusudhanjr Level 1 Level 1 (0 points)
Currently Being Moderated
Nov 5, 2012 1:23 AM

Hi All,

 

am trying to Install Adobe Flash Player thru stand alone Installer, I want to check the check box and need to click on Install button,

Whem am trying to get the entire contents of window thru UIElementInspector, am unable to get the contents of checkbox and Install buttons..

I just tried myself with the below script to click the checkbox, but did not succeed, error saying unable to get the checkbox.. Pls suggest how to check..

 

tell application "System Events"
    tell process "Adobe Flash Player Install Manager"
        set frontmost to true
 
        click the checkbox "I have read and agree to the terms of the Flash Player License Agreement" of window "Adobe Flash Player 11.5 Installer."
 
    end tell
end tell

 

Pls check the below link to view the image of the Adobe Flash Player Installer.

 

https://docs.google.com/document/d/1yzyBTrvi94QxjlEAlcbudOBpXiTGPEI2LA3D1iEo8Gw/ edit
Mac OS X (10.7.4)
  • twtwtw Level 5 Level 5 (4,580 points)

    I'm confused.  Why are you trying to distribute someone else's installer package inside your own installer package.  The normal way to do something like this would be to inform the user that they need to install flash payer.  What you're trying to do seems to violate Adobe's EULA, and it is highly questionable (to say the least) to try to piggy-back one software install inside of another.

     

    please explain what you're trying to do in detail.

  • Pierre L. Level 4 Level 4 (3,860 points)

    Try this:

     

    tell application "System Events"

        tell process "Adobe Flash Player Install Manager"

            set frontmost to true

            click at {x, y}

        end tell

    end tell

     

    where {x, y} is the button or checkbox position given by UIElementInspector (AXPosition: “x=    y=   ”).

     

    Message was edited by: Pierre L.

  • Pierre L. Level 4 Level 4 (3,860 points)

    So try this instead:

     

    tell application "System Events"

        tell process "Adobe Flash Player Install Manager"

            set frontmost to true

            set {x, y} to position of window 1

            click at {x0 + x, y0 + y}

        end tell

    end tell

     

    where {x0, y0} is the button or checkbox position given by UIElementInspector when the window is at the top left corner of the screen (x = 0, y = 22).

     

    Message was edited by: Pierre L.

  • emclellan Calculating status...

    I'm working on a similar script, but when I execute the script, I run into this error:

    error "System Events got an error: Can’t make {563, 234} into type list." number -1700 from {563, 234} to list

     

    Any ideas? Here's the background: I'm trying to click the search box on this page: http://www.alexa.com/siteinfo/payeasenet.com

     

    Here's my UI Inspector results of said element:

     

    <AXGroup>

         <AXScrollArea: “”>

          <AXWebArea: “”>

           <AXGroup: “”>

            <AXGroup: “”>

             <AXTextField: “Enter a search query”>

     

    Attributes:

       AXRole:  “AXTextField”

       AXSubrole:  “AXSearchField”

       AXRoleDescription:  “search text field”

       AXChildren:  “<array of size 0>”

       AXHelp:  “”

       AXParent:  “<AXGroup: “”>”

       AXPosition:  “x=550 y=212”

       AXSize:  “w=214 h=30”

       AXTitle:  “Enter a search query”

       AXDescription:  “”

       AXValue (W):  “”

       AXFocused (W):  “1”

       AXEnabled:  “1”

       AXWindow:  “<AXWindow: “Payeasenet.com Site Info”>”

       AXSelectedTextMarkerRange (W):  “(null)”

       AXStartTextMarker:  “<AXTextMarker 0x60800024af80 [0x7fff758b4eb0]>{length = 24, bytes = 0xbd040000000000006024c514010000000000000001000000}”

       AXEndTextMarker:  “<AXTextMarker 0x600000248a30 [0x7fff758b4eb0]>{length = 24, bytes = 0xbf0400000000000040420c17010000000100000001000000}”

       AXVisited:  “0”

       AXLinkedUIElements:  “(null)”

       AXSelected:  “0”

       AXBlockQuoteLevel:  “0”

       AXTopLevelUIElement:  “<AXWindow: “Payeasenet.com Site Info”>”

       AXNumberOfCharacters:  “0”

       AXSelectedText (W):  “”

       AXSelectedTextRange (W):  “pos=0 len=0”

       AXVisibleCharacterRange (W):  “pos=0 len=0”

       AXInsertionPointLineNumber:  “0”

       AXTitleUIElement:  “(null)”

       AXAccessKey:  “(null)”

       AXRequired:  “0”

       AXInvalid:  “false”

       AXPlaceholderValue:  “”

       AXARIABusy:  “0”

     

    Actions:

       AXPress - press

       AXShowMenu - show menu

       AXScrollToVisible - AXScrollToVisible

  • Pierre L. Level 4 Level 4 (3,860 points)

    Clicking a checkbox on a Web page is much more difficult than clicking a checkbox in an application. And JavaScript might be more appropriate than AppleScript in such a case. So I suggest that you start a new thread.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.