Skip to content

Instantly share code, notes, and snippets.

@gornostay25
Last active April 7, 2025 16:04
Show Gist options
  • Select an option

  • Save gornostay25/3c4fad8b609970682bdf58809566fcdd to your computer and use it in GitHub Desktop.

Select an option

Save gornostay25/3c4fad8b609970682bdf58809566fcdd to your computer and use it in GitHub Desktop.
Automatic Clipboard List ( Apple Script )
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"
@gornostay25
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment