IF a new file is added to my downloads folder
AND
IF that file has the extension .torrent
THEN (in order):
that torrent file should be opened with the default torrent application
the vpn application is opened
a three second pause occurs
the "connect" button on the vpn to be pushed
I've already got the trigger, and 2-4 figured out. The problem I'm having is figuring out what actions to use to identify which file is a .torrent, and how to then open that particular file. I'd really love some insight from you veterans here.
This is only one piece of a much more complex macro that I want to create so it can handle contingencies like if my torrent app is already running but my vpn isn't, but once I get this down, I think I can do the rest.
I'm wondering, concerning the range of possible things the %TriggerValue% variable can refer to, do we just assume that the program is looking at the name of the file as opposed to any other attribute of the file (e.g. the name of it's containing folder, or the first line of text in the file, or the date it was last modified, or....)?
I think my hangup is understanding the way variables work, and reading the handbook for the program didn't clarify it much for me.
I know this must be an annoyingly rudimentary question. So thanks for being cool and patient.
To clear up one point, %TriggerValue% is not a variable. You're far from the first one to confuse the two given the similar syntax, but it's actually a token. Essentially, that means it will always return one of several pre-defined pieces of data, whereas variables can be set to any kind of text that you want. As it says on the Trigger Value token page on the KM wiki, when used with the Folder trigger, %TriggerValue% always returns the path of the file that was added or removed. You can see this for yourself if you include a Display Text action in the macro with %TriggerValue%, or if you save the information %TriggerValue% returns to a variable and look at it in KM's preferences.