COMMENT
This shortcut is a modification of Federico Viticci’s Apple Frames 2.0 optimized for creating single-shot iPhone mockups as quickly as possible.
On MacStories: https://www.macstories.net/ios/apple-frames-2-0-faster-lighter-and-featuring-support-for-iphone-13-ipad-mini-ipad-10-2-imac-24-macbook-air-and-multiple-languages/
My post: https://bilge.world/speedy-frames
TEXT
English

Text
TEXT
Split
Text
by
New Lines

Split Text
SCRIPTING
Count
Items
in
Split Text

Count
SCRIPTING
If
Count
is
0
TEXT
English

Text
VARIABLES
Set variable
Language
to
Text
SCRIPTING
Otherwise
SCRIPTING
If
Count
is greater than or equal to
1
SCRIPTING
Repeat with each item in
Split Text

Repeat Results
SCRIPTING
If
Repeat Item
does not have any value
NOTHING
Nothing
SCRIPTING
Otherwise
VARIABLES
Add
Repeat Item
to
Language
SCRIPTING
End If

If Result
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
Get
First Item
from
Language

Item from List
VARIABLES
Set variable
Language
to
Language
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
DICTIONARY

Dictionary
VARIABLES
Set variable
Menu Commands
to
Dictionary
DOCUMENTS

File
VARIABLES
Set variable
Frames File
to
File
SCRIPTING
Count
Items
in
Frames File

Count
SCRIPTING
If
Count
is
0
SCRIPTING
Get
Value
for
Setup File.
Language
in
Menu Commands

Dictionary Value
SCRIPTING
NETWORK
Get contents of
https://cdn.macstories.net/Frames.json
Options Under Construction

Contents of URL
SCRIPTING
Set name of
Contents of URL
to
Frames.json

Renamed Item
DOCUMENTS
Save
Renamed Item
Destination Path
/Shortcuts/TextOverwrite If File Exists

Saved File
SCRIPTING
Wait
2 seconds
SCRIPTING
Get
Value
for
Setup Done.
Language
in
Menu Commands

Dictionary Value
SCRIPTING
DOCUMENTS

File
VARIABLES
Set variable
Frames File
to
File
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
SCRIPTING
Get dictionary from
Frames File

Dictionary
VARIABLES
Set variable
Frames Dictionary
to
Dictionary
MEDIA
Get images from
Shortcut Input

Images
SCRIPTING
If
Images Input
does not have any value
SCRIPTING
Get
Value
for
Image Picker.
Language
in
Menu Commands

Dictionary Value
PHOTOS

Latest Photos
VARIABLES
Set variable
Screenshot
to
Latest Photos
SCRIPTING
Otherwise
MEDIA
Get images from
Images Input

Images
VARIABLES
Set variable
Screenshot
to
Images
SCRIPTING
End If

If Result
SCRIPTING
Repeat with each item in
If Result

Repeat Results
VARIABLES
Set variable
Screenshot
to
Repeat Item
MEDIA
Get
Width
from
Repeat Item

Width
VARIABLES
Set variable
Width of Repeat Item
to
Details of Images
MEDIA
Get
Height
from
Repeat Item

Height
VARIABLES
Set variable
Height of Repeat Item
to
Height
SCRIPTING
If
Width of Repeat Item
is
1242
MEDIA
Get
Height
from
Repeat Item

Height
SCRIPTING
If
Details of Images
is
2688
SCRIPTING
Get
Value
for
iPhone.11.Pro Max.Portrait
in
Frames Dictionary

Dictionary Value
VARIABLES
Set variable
Matched Device Dictionary
to
Dictionary Value
SCRIPTING
End If

If Result
SCRIPTING
Otherwise
SCRIPTING
If
Width of Repeat Item
is
1125
SCRIPTING
If
Height of Repeat Item
is not
2436
SCRIPTING
Get
Value
for
iPhone.11.Pro.Portrait
in
Frames Dictionary

Dictionary Value
VARIABLES
Set variable
Matched Device Dictionary
to
Dictionary Value
SCRIPTING
Otherwise
SCRIPTING
Get
Value
for
iPhone.12-13.mini.Portrait
in
Frames Dictionary

Dictionary Value
VARIABLES
Set variable
Matched Device Dictionary
to
Dictionary Value
MEDIA
Resize
Repeat Item
to
1080
x
2340

Resized Image
VARIABLES
Set variable
Screenshot
to
Resized Image
SCRIPTING
End If

If Result
SCRIPTING
Otherwise
SCRIPTING
If
Width of Repeat Item
is
2688
SCRIPTING
Get
Value
for
iPhone.11.Pro Max.Landscape
in
Frames Dictionary

Dictionary Value
VARIABLES
Set variable
Matched Device Dictionary
to
Dictionary Value
SCRIPTING
Otherwise
SCRIPTING
If
Width of Repeat Item
is
2436
SCRIPTING
Get
Value
for
iPhone.12-13.mini.Landscape
in
Frames Dictionary

Dictionary Value
VARIABLES
Set variable
Matched Device Dictionary
to
Dictionary Value
MEDIA
Resize
Repeat Item
to
2340
x
1080

Resized Image
VARIABLES
Set variable
Screenshot
to
Resized Image
SCRIPTING
Otherwise
SCRIPTING
If
Width of Repeat Item
is
368
MEDIA
Resize
Repeat Item
to
368.0
x
Auto Height

Resized Image
VARIABLES
Set variable
Screenshot
to
Resized Image
SCRIPTING
Get
Value
for
Watch.Series 4.44
in
Frames Dictionary

Dictionary Value
VARIABLES
Set variable
Matched Device Dictionary
to
Dictionary Value
SCRIPTING
Otherwise
SCRIPTING
If
Width of Repeat Item
is
750
SCRIPTING
Get
Value
for
iPhone.iPhone 8 and 2020 SE.Portrait
in
Frames Dictionary

Dictionary Value
VARIABLES
Set variable
Matched Device Dictionary
to
Dictionary Value
SCRIPTING
Otherwise
SCRIPTING
If
Width of Repeat Item
is
2732
SCRIPTING
Get
Value
for
iPad.2018-2021 iPad Pro.Landscape
in
Frames Dictionary

Dictionary Value
VARIABLES
Set variable
Matched Device Dictionary
to
Dictionary Value
SCRIPTING
Otherwise
SCRIPTING
If
Width of Repeat Item
is
2048
MEDIA
Get
Height
from
Repeat Item

Height