Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7051613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:17:04+00:00 2026-05-28T03:17:04+00:00

Working on a AppleScript that opens a webpage in Safari and makes a screen

  • 0

Working on a AppleScript that opens a webpage in Safari and makes a screen capture of a specific area (using Cmd+Shift+4). But I’m having trouble making the screen capture part automatic.

I’m using MouseTools to click and move the mouse around.

set x to POSIX file ((POSIX path of (path to me)) & "/.." & "/MouseTools") as text
set pathName to POSIX path of x

tell application "Safari" to activate
open location "http://google.com"
delay 1
#do shell script quoted form of pathName & " -x 500 -y 167"
delay 1
tell application "System Events"
    #keystroke "3" using {command down, shift down}
end tell
delay 1
#do shell script quoted form of pathName & " -leftClick"

etc…

The keystroke command is working for everything BUT the screen capture. Next problem is moving the mouse while holding leftclick down. Has somebody got this to work or is there a better approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:17:04+00:00Added an answer on May 28, 2026 at 3:17 am

    I’m happy to see you’re using MouseTools. That’s my program! However there is a command line tool to take screen shots called screencapture. I’m sure you should be using that instead of your gui approach. For example, here’s how to get a picture of your whole desktop…

    set imagePath to (path to desktop as text) & "screenCapture.png"
    do shell script "screencapture -mx -T0 " & quoted form of POSIX path of imagePath
    

    I’m sure there’s ways to capture just a certain area of the screen using screencapture. A little searching of its man page or google should turn up something on that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a website that has Employee and Branch entities, using a database table
I'm working with an Applescript that I'm trying to make, after it does a
Working on a bunch of forms at the moment and I'm finding that I
Working on a movie website and would love to find an API that I
Working on a new app and using restful-authentication. I was trying to make it
I am trying to make an application using AppleScript which can remind to check
I am trying to create a simple Applescript that is activated each time I
I have a bunch of AppleScript scripts in a directory that I want to
Working sample using one Table SELECT t.* FROM ( SELECT TITLE.name, (TITLE.value-TITLE.msp) AS Lower,
I'm working on an i/o project where I have a microcontroller that communicates with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.