Last active
April 13, 2025 12:31
-
-
Save kopiro/992558b306e8fd813860634c0d7e13d2 to your computer and use it in GitHub Desktop.
Process multiple files into ChatGPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Workflow URL: https://kopiro.s3.amazonaws.com/var/FilesToChatGPT.workflow.zip | |
on run {input, parameters} | |
set newRequestDelay to 5 | |
set waitRequestDelay to 180 | |
set imageUploadDelay to 10 | |
repeat with thisFile in input | |
display notification "Starting new request in " & (newRequestDelay as string) & "s - DO NOT touch your keyboard/mouse" | |
delay newRequestDelay | |
set thePath to POSIX path of thisFile | |
-- Step 1: Log file being processed | |
display notification "Processing file: " & thePath | |
-- Step 2: Reveal file in Finder | |
tell application "Finder" | |
activate | |
reveal thisFile | |
select thisFile | |
end tell | |
delay 1 | |
-- Step 3: Simulate ⌘C to copy file | |
tell application "System Events" | |
keystroke "c" using command down | |
end tell | |
delay 1 | |
-- Step 4: Open Chat | |
tell application "Chat" | |
activate | |
delay 5 | |
end tell | |
-- Step 5: Simulate ⌘V and then submit the prompt | |
tell application "System Events" | |
keystroke "v" using command down | |
display notification "Waiting for image upload..." | |
delay imageUploadDelay | |
keystroke "restyle image in studio ghibli style, keep all details" | |
delay 1 | |
key code 36 | |
delay 1 | |
end tell | |
display notification "You can now use your computer for " & (waitRequestDelay as string) & " seconds!" | |
delay waitRequestDelay | |
end repeat | |
display notification "All files processed!" | |
return input | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment