Author Topic: Use scripted buttons on Search results?  (Read 13429 times)

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 511
    • View Profile
Use scripted buttons on Search results?
« on: February 28, 2021, 16:34:09 »
I'd like to be able to select files in the RES window & run my scripts on them.

EG Would like to block select & run 'name as folder' script on found files in multiple folders via the RES.
(Re:- http://forum.multicommander.com/forum/index.php/topic,945.msg2836.html#msg2836 )

I think this may be a complex thing to incorporate given the variables but maybe it's possible???   ??? ;)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4409
    • View Profile
    • Multi Commander
Re: Use scripted buttons on Search results?
« Reply #1 on: March 01, 2021, 09:13:24 »
RES: is a virtual device. So the script see it as any other device, So most script function should work on it.
However some might get the virtual path instead of the absolute path.

So what script function are not working ?

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 511
    • View Profile
Re: Use scripted buttons on Search results?
« Reply #2 on: March 01, 2021, 17:19:41 »
Thanks for the reply Mathias.

I haven't tried many scripts via the RES, but the one that would like most, name as folder (from the thread I mentioned above), doesn't work on single or multiple selected files.
Using less complex instructions does work in some cases e.g. search & replace chars in a found item, works fine.

I'm guessing the call to get the folder name doesn't interpret the virtual path of the RES correctly.  :-\
Maybe I just need to alter how the folder name variable is looked for by MS?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4409
    • View Profile
    • Multi Commander
Re: Use scripted buttons on Search results?
« Reply #3 on: March 01, 2021, 19:03:15 »
I don't know what that script does. It look large and I can't process all that and test it now.
I do not currently have the time to test all script function to see what is working and what is not. And I also suspect that it depends on in with context it is being used. sometimes you might want absolute path and sometimes the virtual.
If you run into a script function that does not work I can take a look quick look and see
« Last Edit: March 01, 2021, 19:04:48 by Mathias (Author) »

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 511
    • View Profile
Re: Use scripted buttons on Search results?
« Reply #4 on: March 02, 2021, 15:23:13 »
Thanks Mathias, not to worry.
I had wondered if it was an obvious or known limitation of the search panel.
I will try & do some experiments & see if I can track it down & get back to you.  :)