Last active
April 7, 2025 16:04
-
-
Save gornostay25/3c4fad8b609970682bdf58809566fcdd to your computer and use it in GitHub Desktop.
Automatic Clipboard List ( Apple Script )
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
| use framework "Cocoa" | |
| use scripting additions | |
| global ca | |
| set ca to current application | |
| -- Список запитань | |
| set questionList to {"What do you know about project Bistro Delivery?", "Show me all security test cases."} | |
| set questionIndex to 1 | |
| set questionCount to count of questionList | |
| -- Перевірка натискання клавіші-модифікатора | |
| to isModifierPressed(modifier) | |
| ((ca's NSEvent's modifierFlags()) / modifier as integer) mod 2 is equal to 1 | |
| end isModifierPressed | |
| display dialog "Ready! Press Control to copy next question." buttons {"OK"} default button "OK" | |
| repeat while questionIndex ≤ questionCount | |
| repeat until isModifierPressed(ca's NSEventModifierFlagControl) | |
| delay 0.1 | |
| end repeat | |
| set nextQuestion to item questionIndex of questionList | |
| set the clipboard to nextQuestion | |
| set questionIndex to questionIndex + 1 | |
| -- Wait until key is released before continuing | |
| repeat while isModifierPressed(ca's NSEventModifierFlagControl) | |
| delay 0.1 | |
| end repeat | |
| end repeat | |
| display notification "All questions copied!" with title "Clipboard Helper" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original: https://stackoverflow.com/a/66266487