music teacher need a hand

Discuss and share scripts and script files...
serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: music teacher need a hand

Post by serendipity »

admin wrote:
calude wrote:yes I saw the new feature
but I will let serendipity change his script

I' am impressed at the speed you are writing all those changes I really should have taken the lifetime licence
:D
hehe! I should have told you... :D

Actually, I just added a nice little function called gettoken(). With this your task will be a 2-liner (easily converted into a one-liner, of course). You don't need a XYS file but can pack it directly into your PFA:

Code: Select all

$name=gettoken(<curbase>,1,"-"); goto "I:\WAV COURS All\;G:\MUSIC PDF\tunes\?$name";
hey serendipity, mine is shorter! :mrgreen: :lol:
Hey!! you did not add "gettoken" right now because it already works in v7.80.0020. So how many more functions are you hiding from us?

admin
Site Admin
Posts: 60612
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: music teacher need a hand

Post by admin »

serendipity wrote:Hey!! you did not add "gettoken" right now because it already works in v7.80.0020. So how many more functions are you hiding from us?
You're kidding, no! I don't hide nothing from you! :mrgreen:

admin
Site Admin
Posts: 60612
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: music teacher need a hand

Post by admin »

Okay, this is the PFA item (one line!) that should do the whole job for you, music teacher:

(needs version v7.80.0021!)

Code: Select all

|"Clapton" mp3;pdf>::$name=gettoken(<curbase>,,"-"); goto "I:\WAV COURS All\;G:\MUSIC PDF\tunes\?$name"; sortby "n";
Should show command "Clapton" (rename as you like) in the Portable OpenWith Menu (POM) of MP3 and PDF files; when you select the "Clapton" command it will search the 2 folders for the extracted name part of the current file, and finally sort the search results by name ascending.

calude
Posts: 355
Joined: 13 Aug 2008 10:16
Location: Switzerland
Contact:

Re: music teacher need a hand

Post by calude »

Works fine
absolutely brilliant
Don, Serendipity,
thanks a lot for the help

Calude

admin
Site Admin
Posts: 60612
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: music teacher need a hand

Post by admin »

calude wrote:Works fine
absolutely brilliant
Don, Serendipity,
thanks a lot for the help

Calude
Great! :D

Actually, being a guitar player myself, I might come back to you some day. :) But for the time being, if you feel the urge to return something, you might consider writing a review! This is a great way to promote XYplorer and make me happy! :D

Here are some places for reviews:
http://www.xyplorer.com/promote.htm

Thanks,
Don

calude
Posts: 355
Joined: 13 Aug 2008 10:16
Location: Switzerland
Contact:

Re: music teacher need a hand

Post by calude »

will do

and just a detail about the script how would you assign a keyb shortcut to this search

or better that this PFA only works in those 2 folders.
I am currently trying but to no avail
this doesnt work

Code: Select all

"Find Artist" G:\MUSIC PDF\tunes\pdf; I:\WAV COURS All\mp3 wma m4a>::$name=gettoken(<curbase>,,"-"); goto "I:\WAV COURS All\;G:\MUSIC PDF\tunes\?$name"; sortby "n";

Calude

admin
Site Admin
Posts: 60612
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: music teacher need a hand

Post by admin »

calude wrote:will do

and just a detail about the script how would you assign a keyb shortcut to this search

or better that this PFA only works in those 2 folders.
I am currently trying but to no avail
this doesnt work

Code: Select all

"Find Artist" G:\MUSIC PDF\tunes\pdf; I:\WAV COURS All\mp3 wma m4a>::$name=gettoken(<curbase>,,"-"); goto "I:\WAV COURS All\;G:\MUSIC PDF\tunes\?$name"; sortby "n";
You have to state the full path pattern for each case:

Code: Select all

... I:\WAV COURS All\*.mp3;G:\MUSIC PDF\tunes\*.pdf>...
For a KS you'd rather do a UDC (of type "Run Script"). But then you won't get the context sensitivity of the POM: you must decide whether the current file is a music file (should not be too hard :wink: ) -- you cannot limit a UDC to work just on PFDs. OTOH you can make the script check whether the current file is a PDF... so everything is possible. :)

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: music teacher need a hand

Post by serendipity »

calude wrote:will do

and just a detail about the script how would you assign a keyb shortcut to this search

or better that this PFA only works in those 2 folders.
I am currently trying but to no avail
this doesnt work

Code: Select all

"Find Artist" G:\MUSIC PDF\tunes\pdf; I:\WAV COURS All\mp3 wma m4a>::$name=gettoken(<curbase>,,"-"); goto "I:\WAV COURS All\;G:\MUSIC PDF\tunes\?$name"; sortby "n";

Calude
For the second, maybe try this:

Code: Select all

"Find Artist" G:\MUSIC PDF\tunes\*.pdf;I:\WAV COURS All\*.mp3;wma;m4a>::$name=gettoken(<curbase>,,"-"); goto "I:\WAV COURS All\;G:\MUSIC PDF\tunes\?$name"; sortby "n";

Post Reply