3 Replies Latest reply: Oct 28, 2012 10:13 PM by twtwtw
madhusudhanjr Level 1 Level 1 (0 points)

currently am running to retrieve entire contents of window from Applescript in Java, applescript is returning class objects which is not happening if i run the same script from java, pls suggest how to format the same.

 

tell application "System Events"
    
    tell process "Install Adobe Flash Player"
        
      set tElements to entire contents of window 1
            
        end tell
end tell
tElements

 

output :

 

{button 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", button 2 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", button 3 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", group 1 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", image 1 of group 1 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", group 2 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", static text "Adobe Flash Player 11" of group 2 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", progress indicator 1 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", group 3 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", static text "  " of group 3 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", image 1 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", group 4 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", static text "Error: General installation error" of group 4 of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", button "Finish" of UI element 1 of scroll area 1 of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events", static text "Adobe Flash Player Installer" of window "Adobe Flash Player Installer" of application process "Install Adobe Flash Player" of application "System Events"}

Mac OS X (10.7.4)