Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Tell AppleScript to click on a button on a webpage

Featured Replies

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

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.

  • Author

Tried both ways without any sucessful. Any other ideas?

  • 3 weeks later...

well, in filemaker it would be like this:

tell application "URL Access Scripting" to download "http://www.example.com/image1.jpg" to "Macintosh HD:image1.jpg"

  • 1 month later...

I'd use curl and "do shell script" if you're just downloading something from a web site.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.