![]() ![]() ![]() The properties for that action are his phone number in the to field and in the text field I have a message reading "here is where I currently am". The next action sends a message to my husband. Next I get the maps url for that location so he can see where I am in context. It automatically saves that in a magic variable. My shortcut first gets my current location. This means you don't have to even create a variable to get at that action's input.įor example, I want to share my current location with my husband. Each time an action generates output, that output is stored in a magic variable. IOS makes variables way easier to deal with than most scripting languages. Basically a variable is a lot like a clipboard, only you can have multiple clipboards to hold all the information you need your shortcut to use later on. You'd want to use variables to store all that information so it could be easily pasted to multiple emails. Perhaps you played those songs over a speaker at a party and everyone wants those songs' artists and names. If for example you wanted to send a friend the artists for the last five songs you played you'd want to get and store them in variables, then paste those variables in to your email. It is the same reason you save any sort of information. A location, a weather forcast and a contact are all different types of information, but once they are saved in variables they are available for you to use later in your script. In many programming languages variables have types, but iOS mostly hides that information away so you rarely need to worry about it. But the Sam fvariable could just as well hold the contact information for Fred. You might name a variable "Sam" and get Sam's contact information and stash it there. A variable is a place in memory that is given a name and holds information that varies. Now we understand actions, properties, input and output, let's talk about VARIABLES. Next it would get the phone numbers from that contact, and lastly, it would speak those numbers.įor another example, if you wanted to speak your current location, you'd first get the location and your next action would be to speak it. To output that list of phone numbers, the action needs a specific contact as input.įor example to speak phone numbers out loud, your shortcut would first get a contact. Sometimes in order to produce output, an action needs input. It is not, as you might expect a single number unless only one is stored in that contact. The output for get phone number is a list of phone numbers obtained from the specified contact. The action "get location" outputs your current location, whereas the output from "get maps URL"outputs a web address to a map showing the current GPS coordinates. The input for the play sound action is a sound and the input for the archive files action is a list of files. Most actions need INPUT and produce OUTPUT.For example the input to speak something out loud is a phrase for that action to voice. But for shortcuts, Apple calls the steps actions.Īs for the settings that belong to an action, these can also be thought of as properties, configurations or customizations. Other programming languages use these terms. To relate this to other programming concepts, an action might also be called a function, a procedure or a method. When you choose the record action, you'll also choose whether you want it to stop when the user taps, or after a specific length of time. ![]() The record action has stop already integrated in to it as part of that action. You are probably wondering at this point what about the action to stop the recording? This is where I can reveal another important concept about actions. When you choose an action, you are adding one of these steps to your shortcut.įor example, if you wanted to record a voice memo, your shortcut might have two actions, one to start recording and one to play the memo back. ![]() An action can be snapping a photo, retrieving a contact, archiving a file or even speaking something out loud. The most important term to understand is an Action.Īn ACTION is one of the steps iOS takes. It's a great way to get your feet wet and find out if computer programming is for you.Įvery technical thing has its own, sometimes confusing terminology and it's no different with shortcuts. If you ever wanted to learn programming, you can start right now to create shortcuts. In fact an app or software program is nothing more than a very sophisticated set of steps designed to accomplish a task. People who program would call this a script. IOS 12 introduced shortcuts: a way for you to combine a set of steps to accomplish a task. A Narrative Guide for the Befuddled Beginner ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |