Automate "Move File" macro creation

My logic is formed and limited by my understanding, by what I've distinguished so far. As far as I know the ONLY way to get a new move to location on a list on a palette is to use a separate one of these
image
For each location I want on the Palette. The list I've pictured above has 20 locations which required 20 individual actions like this with each action housed in its own named macro which name appears on the palette. How else could it possible be done??? This is all I got so far. My limited set of distinctions, what I've distinguished so give me nothing else. I literally do not see any other way. No way, not possible, does not exist. Nowhere in sight, not even remotely possible. Can't be done. Crazy talk. Clear?

YOU have a different set of distinctions. One of them includes something called a "KM Global Variable". I do not have that distinction tho hopefully I will by the end of this.

I case you're wondering, it the word "just" I'm reacting to so strongly. It feels VERY diminishing when used this way. Small word can have big impacts. Leaves me feeling like an idiot or stupid and I'm clear I'm not. When I look at your various post I see you use the word a lot. Now I know your intent is NOT to diminish and in fact you are being really generous by giving me ANY of your time and attention which you do not owe me or anyone. So please do not hear this as an attack but rather as feedback to how your words land or occur for me over here. I do appreciate very much your teaching contributions and hope to benefit from them here. :smiley: Onward!

Step one, check out the wiki...



5d.png)

Hmm, interesting but doesn't tell me how to "just put a folder list or text file into a global variable."
Now text file I sorta get. I imagine it could be a TextEdit doc or a Pages doc with a list of file pathways to each of the folder I want to move selected Finder items to. I'd guess I'd have to highlight an item on the list to get it into the "Global Variable" and would need to maybe have a macro to save the file paths to the list as creating the list that way would be messy and tedious and take a lot of time. AND as the list would change over time, perhaps a lot, the list would need to be edited to keep it from getting too long to easily scroll through.

On to the Forum...

Did a search for "how to use global variable". Lots of results!

This mentions Global Variables but doesn't tell me now to "just put a folder list or text file into a global variable."

Trigger Script with Global Variable

A mention but not helpful.

This seems kinda on target but doesn't sound a simple as what you seem to be pointing to.

This has the idea of calling a macro from another giving it a globally feeling and also mentions how variables are available for all macros making all variables global. BUT if all variables are global what's the difference between variables and global variables? Why not just call them all just variables? Why add confusion by sticking global in it UNLESS a global variable really is a different animal. I'm thinking that there IS such an animal and will keep hunting!

This is interesting in that it brings up the idea of scope. So maybe a variable becomes a global variable when it's scope is global BUT ALL variables are global in scope as this thread hammers in so there is no reason to use the global to define a variable as they ALL are BUT clearly there is something called a global variable and I'm not just chasing Unicorns! The hunt continues...

"global variable space" and local variable not being written to disk, hmmm... So the persistence of a variable has something to do with a variable being global. So there seems to be at least two dimensions to consider. One is if a variable can be accessed by more than the macro it first occurs in and two if the variable persists beyond its first use by being written to disk. Elusive and secretive creatures!

Searching the Forum for "What is a folder list?" surfaced

Which kinda is like what you're pointing to but doesn't shed much light.

This seems promising but I don't how to use in to build a list of file paths.

That looks like about it for help from the Forum. On to the WWW!

Well, Googling "how to use a global variable in keyboard maestro" brought up:

which is right on point but occurs to ME as tail chasing. There's no explanation of how to " "just put a folder list or text file into a global variable." Sigh, nothing in that black bag for me...

Well this looked promising but stopped in the middle of the process. It talked about creating a text file and somehow the variable would use that text file. Sounds A LOT like what you are point to! Still, I have no idea how to put it together AND get it to show up in a palette or would I no longer use a palette and somehow select an item in the text file THEN trigger a macro that copies the selected text and use that as the variable for where to move the selected Finder item? That doesn't seem very easy or as elegant as clicking items on a palette.

This talks about getting a value from a list so I suspect he's seen the Unicorn as well!

Ok, after five pages of Google results the results don't resemble the question so I'll stop there.

While the solution seems to occur for you with "just" like clarity and simplicity it ain't so clear or simple to me who doesn't have the benefit of the distinctions you've created. Perhaps you can elucidate further how to use a "global variable" in conjunction with a "Folder List" or text file (how would the text file look/be structured?). Perhaps an example or two would illuminate the matter so I could distinguish something that illuminates the matter for me. Gotta get some light in this dark cave on mine...

Thank you for your time and attention to this :smiley: