macro academy

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
nikos
Site Admin
Site Admin
Posts: 16374
Joined: 2002 Feb 07, 15:57
Location: UK

macro academy

Post by nikos »

say you want to create quickly a few files for testing, here's a macro that will do it:

Code: Select all

# create many empty files
# -----------------------
pop 10 # repeat 10 times
store $1
label loop
COMMAND 32795 # New file
waitidle
getfocus
sendkey escape # cancel rename
decr $1
jumpok loop
Kilmatead
Platinum Member
Platinum Member
Posts: 4863
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: macro academy

Post by Kilmatead »

Now create one that makes multiple super-long paths of varying depths ("for testing", honest, it's not a fetish) and I might get up a little earlier each morning. :wink:
User avatar
nikos
Site Admin
Site Admin
Posts: 16374
Joined: 2002 Feb 07, 15:57
Location: UK

Re: macro academy

Post by nikos »

you could modify this to select + browse into the newly created folder, so you get a series of NewFolder\Newfolder ...
left as an exercise :)
Kilmatead
Platinum Member
Platinum Member
Posts: 4863
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: macro academy

Post by Kilmatead »

Gonna have to expand my little programmable-column function helper to include a StrCLSID creator first, as "NewFolder" is so passé (as you well know!). Can macros interface with p-columns... hmm... create-folder + (mass-rename single item using helper-column function) + rinse, lather, repeat.

And you'll be happy to know that a quick test of mass-rename on a 350+ character path just worked fine, so it is actually feasible. This being Ireland, what are the odds I might have to wait a long time for a rainy-day... :D
User avatar
nikos
Site Admin
Site Admin
Posts: 16374
Joined: 2002 Feb 07, 15:57
Location: UK

Re: macro academy

Post by nikos »

you could use programmable column RESULTS (as they show in the pane) using CHOPSTR (see the sample macro in docs)
Kilmatead
Platinum Member
Platinum Member
Posts: 4863
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: macro academy

Post by Kilmatead »

Interesting... I'm a little rusty on macros... didn't see... chopsticks... though if I were copying a generated CLSID... rendering a column once would just generate a single string... chopsticking it would be reiteratively identical... whereas iterative mass-rename... generates a new one each time... methinks... a macro can't invoke a non-displayed column... mass-rename can...

Pity you never got into Céline... my little accidental homage would be better appreciated... "Known for his use of insults, slang, and ellipses in hallucinatory narratives, Céline became a central figure of modernism in interwar France" - it's almost like reincarnation is real... I ask you, how could this guy not have been Irish!!??
User avatar
nikos
Site Admin
Site Admin
Posts: 16374
Joined: 2002 Feb 07, 15:57
Location: UK

Re: macro academy

Post by nikos »

you could do all sorts of things with macros but for really bizarre stuff you're better off using some regular programming paradigm