Create #hashtag list using AppleScript
If you shoot pictures of a similar genre like I shoot actors headshots then writing and creating #hashtags for your pictures can be a time-consuming task. You can of course create a list then copy and paste that into your Twitter or Instagram but if you post a lot of images then simply using the same list of hashtags all the time can make you look like a bot, and Instagram does not like bots. It can get you shadow banned.
Here I explain a very simple AppleScript that can randomise a selection from a known list and copy this to your clipboard.
First you will need to create your own list. It is important to use the correct syntax for a list in AppleScript. The whole list is contained in curly braces {}. Each item is separated by a comma. {1,2,3,4} and if your item is a string (text) then that is contained by quote marks. {“Hallo”, “World”}. It can be of any length but I suggest you create a list of over 30 items since Instagram allows you 30 tags.
This script reveals the list you are going to use, allows you state the number of tags to create then copies those to your clipboard.
On macOS open Utilities > Script Editor
Paste from here
set hashtagList to {“#actor”, “#studio”, “#picoftheday”, “#portraitphotography”, “#portraitpage”, “#portrait”, “#photoshoot”, “#studiophotography”, “#portraitphotographer”, “#photooftheday”, “#catchlight”, “#actorslife”, “#acting”, “#windowlight”, “#headshot”, “#actorlife”, “#casting”, “#londonlife”, “#londonheadshots”, “#actorheadshots”, “#portraits”, “#headshotphotographer”, “#headshotphotography”, “#naturallight”, “#headshots”, “#headshotlondon”, “#theaphp”, “#aphp”, “#actinglife”, “#photography”, “#lighting”, “#newheadshots”, “#Actors”}
set stringList to TextDelimters(hashtagList, “,”, return)
display dialog stringList asstring with title “List to generate from”
display dialog “Number of hashtags to generate” default answer “30” buttons {“OK”} default button 1
set numHashtags to text returned of result asinteger
set theList to {}
set theCount to 0
repeat
set theNum tocountof hashtagList
set num torandom number from 1 to theNum
set theTag toitem num of hashtagList
if theList does notcontainthe theTag then
settheendof theList to theTag
endif
set theCount tothecountof theList
if theCount = numHashtags thenexitrepeat
endrepeat
set copyList to TextDelimters(theList, “,”, return)
set the clipboard to copyList
display dialog copyList asstring with title “This list has been copied to your clipboard”
on TextDelimters(l_ist, delimiterTOremove, delimiterTOcreate)
set text item delimiters to delimiterTOremove
set l_ist togeteverytext itemof l_ist
set text item delimiters to delimiterTOcreate
set newlist to l_ist asstring
set text item delimiters to “”
return newlist
end TextDelimters
end paste here
I’m working on a desktop hashtag generator. Watch this space.
https://atomic-temporary-106646434.wpcomstaging.com/2016/01/06/workflows-basics/
https://atomic-temporary-106646434.wpcomstaging.com/2016/01/17/photography-workflows-3/
Leave a Reply