Setting Up a “Run AppleScript” Double-Click Workflow in ScreenFloat

Introduction

With ScreenFloat v2.2, you can automate tasks by running custom AppleScripts when you double-click a floating shot. This guide will walk you through setting up this feature.

Steps to Set Up the Workflow

1. Create Your AppleScript

First, you need an AppleScript that will be triggered by your double-click action workflow in ScreenFloat. Here’s a basic outline to help you get started:

  1. Open the Script Editor app on your Mac.
  2. Write your script. Here’s a simple example that displays the parameters passed by ScreenFloat:

    ``` on open argumentsList set fileURL to (item 1 of argumentsList) set filePath to (item 2 of argumentsList) set fileType to (item 3 of argumentsList) set fileExtension to (item 4 of argumentsList) set fileWidth to (item 5 of argumentsList) set fileHeight to (item 6 of argumentsList)

     display dialog "File URL: " & fileURL & return & ¬
                   "File Path: " & filePath & return & ¬
                   "File Type: " & fileType & return & ¬
                   "File Extension: " & fileExtension & return & ¬
                   "File Width: " & fileWidth & return & ¬
                   "File Height: " & fileHeight
    
     return true
    

    end open ```

  3. Save your script with a memorable name and the .scpt extension.

2. Place the Script in the Correct Folder

For ScreenFloat to access your script, it must be in a specific folder:

  1. Open Finder and navigate to:
    /Users/[yourname]/Library/Application Scripts/at.EternalStorms.ScreenFloat-[appstore/trial]/

    • Replace [yourname] with your Mac username.
    • Use [appstore] if you downloaded ScreenFloat from the Mac App Store, or [trial] if you are using the trial version.
  2. Move your saved AppleScript into this folder.

3. Set Up the Double-Click Workflow in ScreenFloat

  1. Open ScreenFloat.
  2. Go to Settings (from ScreenFloat’s menu bar icon, or any floating shot).
  3. Select the Floating Shots tab.
  4. Under “Double-clicking:”, click the + button.
  5. Choose Run AppleScript from the options.
  6. Select the script from the list that appears.

ScreenFloat Double-Click Workflow Settings Setup Menu

4. Test Your Workflow

Now, whenever you double-click a floating shot in ScreenFloat, your AppleScript will run and process the shot according to the script’s instructions.


Sample Scripts

Need Help?

If you have any questions or need further assistance, please don’t hesitate to contact me.