Login About Gallery
Loops example
Accepts
App Store Apps, Articles, Contacts, Dates, Email Addresses, WFFolderContentItem, Files, Images, iTunes Products, Locations, Map Links, Media, PDFs, Phone Numbers, Rich Text, Safari Web Pages, Text and URLs
COMMENT
The way this loop has been build, it runs the shortcut over and over. Based on the values FN and BK.
SCRIPTING
Get dictionary from
Shortcut Input
SCRIPTING
Get
Value
for
FN
in
Dictionary
COMMENT
➡️ the FN is empty on the first run, this IF statement sets the value to Mainmenu. This way the Main menu is shown on the first run
SCRIPTING
If
Dictionary Value
does not have any value
TEXT
MainMenu
VARIABLES
Set variable
FN
to
Text
Otherwise
VARIABLES
Set variable
FN
to
Dictionary Value
End If
SCRIPTING
Get
Value
for
BK
in
Dictionary
COMMENT
➡️ BK same story, you can’t go back to a menu on the first run. So if the user taps back in the main menu this IF statement sets the value to MainMenu so that the MainMenu is shown.
VARIABLES
Set variable
BK
to
Dictionary Value
DICTIONARY
<inline variable>
<inline variable>
VARIABLES
Set variable
LocalData
to
Dictionary
VARIABLES
Set variable
ReRun
to
LocalData
COMMENT
⚓️ The ReRun functions as anchor to tell the shortcut where to run from. However the shortcut always runs from the top and not from here, but without it it doesn’t work.
SCRIPTING
If
FN
is
MainMenu
SCRIPTING
If
BK
does not have any value
TEXT
BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:UserMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:SettingsMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD
Otherwise
TEXT
BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:Back;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:UserMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:SettingsMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD
End If
SCRIPTING
Set name of
If Result
to
MainMenu.vcf
SCRIPTING
Choose from
Renamed Item
Prompt
MainMenu
Select Multiple
SCRIPTING
If
Chosen Item
is
Back
COMMENT
➡️ BK is set to Main Menu here and brings the user back to Main Menu. ➡️ FN when the user chooses something different then back. The selected item is set as FN and MainMenu is assigned to BK. This tells the shortcut go to [ selected menu ] and the menu before this was MainMenu.
DICTIONARY
<inline variable>
BK
<inline variable>
<inline variable>
Otherwise
DICTIONARY
<inline variable>
<inline variable>
<inline variable>
End If
SHORTCUTS
Run
ReRun
Show While Running
SCRIPTING
Exit shortcut with
Result
End If
SCRIPTING
If
FN
is
UserMenu
SCRIPTING
If
BK
does not have any value
TEXT
BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:MainMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:SettingsMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD
Otherwise
TEXT
BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:Back;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:MainMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:SettingsMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD
End If
SCRIPTING
Set name of
If Result
to
UserMenu.vcf
SCRIPTING
Choose from
Renamed Item
Prompt
UserMenu
Select Multiple
SCRIPTING
If
Chosen Item
is
Back
DICTIONARY
<inline variable>
BK
<inline variable>
<inline variable>
Otherwise
DICTIONARY
<inline variable>
<inline variable>
<inline variable>
End If
SHORTCUTS
Run
ReRun
Show While Running
SCRIPTING
Exit shortcut with
Result
End If
SCRIPTING
If
FN
is
SettingsMenu
SCRIPTING
If
BK
does not have any value
TEXT
BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:UserMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:MainMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD
Otherwise
TEXT
BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:Back;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:UserMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD BEGIN:VCARD VERSION:3.0 N;CHARSET=utf-8:MainMenu;;;; ORG;CHARSET=utf-8:; PHOTO;ENCODING=b:; END:VCARD
End If
SCRIPTING
Set name of
If Result
to
SettingsMenu.vcf
SCRIPTING
Choose from
Renamed Item
Prompt
SettingsMenu
Select Multiple
SCRIPTING
If
Chosen Item
is
Back
DICTIONARY
<inline variable>
BK
<inline variable>
<inline variable>
Otherwise
DICTIONARY
<inline variable>
<inline variable>
<inline variable>
End If
SHORTCUTS
Run
ReRun
Show While Running
SCRIPTING
Exit shortcut with
Result
End If

Showcuts

Magic Vars

Screenshot

Submitted Anonymously 9 months ago

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

0