Jump to content

Tell AppleScript to click on a button on a webpage


This topic is 6651 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello,

I am having trouble with writting an AppleScript to click on a button on a webpage to download data. So far, this is what I have:

tell application "System Events"

if exists process "Export Window" then

tell process "Export Window"

delay 2

set frontmost to true

click button "Download"

end tell

end if

end tell

Can anyone please help.

Thanks,

tdogolf

Link to comment
Share on other sites

You can try entering the key code for enter, i believe its like 75 or 79 (It depends on what type of keyboard you have).

tell application "System Events" to keycode 79

That might work for ya.

Or alternatley you can just use URLAccess scripting to download the file.


Tell application "URL Access Scripting"

download "http://www.google.com/image1.jpg" to "Macintosh HD:image1.jpg"

end tell

My syntax is probably off, but you get the idea.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

This topic is 6651 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.