Cancel Culture
COMMENT
Cancel Culture: a proof-of-concept shortcut for detecting if someone has pressed "cancel" on an alert on a previous run. Of course, there are many different ways to approach the specifics of the implementation, but this should give you an idea of the structure.
Made by @FifiTheBulldog
TEXT
Cancel.json

Text
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
If
File
does not have any value
DICTIONARY

Dictionary
DOCUMENTS
Save
Dictionary
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Text', 'glyph': '', 'UUID': '389A5BA6-153E-4886-9ED0-C2FDBB625BC8'}]Overwrite If File Exists

Saved File
SCRIPTING
End If

If Result
SCRIPTING
Get
Value
for
HasApproved
in
If Result

Dictionary Value
SCRIPTING
If
Dictionary Value
is
<value>
SCRIPTING
Show alert
You already pressed "OK," you're all set!
Title
You already pressed "OK," you're all set!
DOCUMENTS
SCRIPTING
Otherwise
SCRIPTING
Get
Value
for
HasAttempted
in
If Result

Dictionary Value
SCRIPTING
If
Dictionary Value
is
<value>
SCRIPTING
Show
Accept your fate and press OK this time.
SAFARI
Show web page at
https://www.youtube.com/watch?v=dQw4w9WgXcQ
SCRIPTING
Show alert
Now that that's out of the way, I ask again: Do you want to continue?
Title
Now that that's out of the way, I ask again: Do you want to continue?
SCRIPTING
Set
HasApproved
to
1
in
Dictionary

Dictionary
DOCUMENTS
Save
Dictionary
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Text', 'glyph': '', 'UUID': '389A5BA6-153E-4886-9ED0-C2FDBB625BC8'}]Overwrite If File Exists

Saved File
SCRIPTING
Otherwise
SCRIPTING
Set
HasAttempted
to
1
in
Dictionary

Dictionary
DOCUMENTS
Save
Dictionary
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Text', 'glyph': '', 'UUID': '389A5BA6-153E-4886-9ED0-C2FDBB625BC8'}]Overwrite If File Exists

Saved File
SCRIPTING
Show alert
Informational Message
SCRIPTING
Set
HasApproved
to
1
in
Dictionary

Dictionary
DOCUMENTS
Save
Dictionary
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Text', 'glyph': '', 'UUID': '389A5BA6-153E-4886-9ED0-C2FDBB625BC8'}]Overwrite If File Exists

Saved File
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
Showcuts