Tag: shortcuts

  • There is nothing wrong with Post-Its (well, except for one thing)

    There is nothing wrong with Post-Its (well, except for one thing)

    Do you need to remember the key sequence to do a task? Put it on a Post-It. Almost every program you use on your computer, whether it be a desktop or laptop, has keyboard shortcuts. These allow you to quickly accomplish a task, without taking your hands off of the keyboard. Keyboard shortcuts usually comprise a modifier key and another key. The most common modifier keys comprise the Shift, Control, and Alt key. On a Mac, the Command key (the one beside the keyboard that has what looks like a pretzel on it) replaces the Control key and the Option key replaces the Alt key. A modifier key is one that does nothing on its own. Holding or pressing the control key does nothing by itself. To use a shortcut, you hold down the modifier key and then press the shortcut key.

    You may already be using some shortcuts (C is the Control key, or the Command key on a Mac):

    • C-c – Copying selected text to the clipboard
    • C-x – Cut selected text to the clipboard
    • C-v – Paste the clipboard contents into the current application

    Here are some for the operating system:

    • C-tab – Switch between Applications

    For a browser:

    • C-l – Jump to the URL field, highlight the content. You can then start typing a new address
    • C-t – Create a new tab
    • C-PgUp/C-PgDown – Switch between tabs

    To find out more shortcuts, look at the help for the application. To help you remember the shortcuts, feel free to write the shortcuts on to post-its. Just don’t write your passwords down!

  • Automating My Fair Food Pics

    Automating My Fair Food Pics

    This week is the Hardin County Fair, and, good news for my fans since I will be posting an array of eating delights. I try to not repeat any foods during the fair, but I will probably make an exception for the pumpkin dumplings1.

    Here’s an example of a previous year, with a map. I’m not ready to add a map to my Shortcut… Yet.

    After posting a picture, I usually get a few people asking where I got it. I started to include a picture of the food truck as a thumbnail in the corner of the picture. But, the creation of the picture takes time. I have a computer in my phone, let’s put it to work.

    My Fair Food Shortcut

    Here is my creation, the Fair Food iOS Shortcut for iPhones and iPads. Once installed, I can add an icon to my home screen.

    To create my foodie masterpiece, I take a picture of the food truck and of the food. I run the Fair Food Shortcut. The Shortcut shows my last 10 pictures taken and asks for the picture of the food truck. After selecting the correct picture, the Shortcut again shows me my last 10 pictures taken and asks me to select the picture of the food. Once the food picture is selected, the Shortcut resizes the picture of the Food Truck and places it in the upper left corner of the food picture and then saves it to the Camera Roll.

    Get a notification when I post!

    Now I can share my composited image to my website here along with Instagram. If you want to keep up with my pics, you can:

    • RyanCollins.org – the best way. Use your favorite RSS reader. And if you don’t have an RSS reader, GET ONE!

    If you want an alternative…


    1 – The pumpkin dumpling is a slice of pumpkin pie in dumpling form, topped with pumpkin ice cream and whipped topping. Although the dumpling has shrunk in size over the years, the entire dessert is still delicious.

  • Using the Shortcuts app to keep track of my Christmas Vacation viewings

    Using the Shortcuts app to keep track of my Christmas Vacation viewings

    As some of you know, I watch a lot of Christmas Vacation during the holidays. I watch it so many times that I feel it is my duty to inform the world that not only have I watched Christmas Vacation, but also how many times I’ve watched it.

    At first, I used a simple tally sheet in the form of a note on my phone, but that was too much work. I have this powerful phone, it should do the work for me! My first attempt at automation used a combination of Pythonista and Dropbox. It worked, but wasn’t elegant. And I’m all about the elegance.

    Two years ago, I bought the Workflow app for iOS. With Workflow, I was able to write a small set of instructions that kept track of how many viewings I have completed. The Workflow had the added capability of creating my status message so I didn’t have to. All of this was under a simple tap of an icon on my home screen.

    Workflow was purchased by Apple, and is now a part of iOS 12 and called Shortcuts. You can use it to automate all sorts of task, but today my goal is to keep track of how many times I’ve watched Christmas Vacation.

    Show me the Shortcut

    Whoa, slow down there cowboy, at least buy me dinner first. If you don’t want to wait and learn the nitty gritty, then go grab the Shortcut from any iOS device running iOS 12.

    Creating a shortcut

    Counting up

    There is one piece of information that I need to store somewhere, the number of viewings. Shortcuts doesn’t have anyway of storing this information in itself, so I settled on iCloud Drive. Shortcuts already has a folder in iCloud Drive called, are you ready for this, Shortcuts. In that folder I store a text file named cv.txt whose contents are the number of viewings of Christmas Vacation.

    The first few steps of the Shortcut check and see if the file exists. If it doesn’t, a file named cv.txt will be created in /Shortcuts with the contents of 0. If the file exists, the Shortcut sets a variable to the number of viewings, incrementing it by 1. Since the Shortcut creates the file if it isn’t there, to reset the number of viewings each year I only need to delete the current cv.txt file.

    We now have a number of viewings, let’s add one to it.

    And convert it to a dictionary for the next step.

    Ordinal steps

    I want to share out the phrase “I’ve watched Christmas Vacation for the 5th time in 2018“, replacing the number of viewings with the ordinal number. Yes, ordinal is the correct word, go look it up. The easiest way to get the ordinal was to set up a dictionary of values, where 1 equals 1st, 2 equals 2nd, 3 equals 3rd, and so on, up to 25. The Shortcut looks up the value based on count.

    The above creates a dictionary, and sets the variable Ordinal to the looked up value based on Count. The dictionary is for Javascript, so the format is { “1”:”1st”, “2”:”2nd”, “3”:”3rd” }.

    Verification

    Once we have the ordinal, the Shortcut asks for verification to increment the number of viewings and post it. If they cancel at this step, no harm no foul, the Shortcut ends.

    Selecting Post will save the current number of views to cv.txt in iCloud Drive, overwriting the current file.

    Posting

    Finally, the time has come to compose the status message and share it.

    The Text block composes the message, using the variable Ordinal and the special variable Current Date. Current Date is a custom format of yyyy, which will be the current year. This way I don’t have to update the Shortcut every year.

    Now that we have our message, I’ll use the standard Share sheet to share it to the world.