Work for scriptwriter!

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

Work for scriptwriter!

Post by chrisjj » Sun Nov 29, 2009 9:18 am

I want a script called Search for Similar that upon a hotkey press or menu command, pastes into the quick search bar this:

Title:<title> AND Artist:<artist> AND Genre:<genre> AND Year:<date>

properties being taken from the track selected (in Track List or Now Playing), but omitting terms for any blanks e.g. if Artists and Year are blank:

Title:<title> AND Genre:<genre>

Payment is available! Just quote a price first.

Thanks.
Chris

Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Re: Work for scriptwriter!

Post by Mizery_Made » Sun Nov 29, 2009 1:16 pm

Advanced Duplicate Find & Fix has a similar functionality to which you are looking for. It's not ran via hotkeys or commands, but it offers a "Find More from Same -> Custom Search" which would allow you to run that type of four properties matches based on the properties of the song you right click on. I would say that it also allows you to even set "Auto-Searches" but I can't recall if that ability is in 3.5.2 available in that thread, or if it's in a build Bex was working on a while back. It would allow you to set up default searches that would only be a right click and a couple movements of the mouse away. I don't believe the auto-searches would work with a conditional search (i.e., search for Artist, Title, Genre & Year for most cases, but if the selected track doesn't have a year, it wouldn't run the search minus the year)

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

Re: Work for scriptwriter!

Post by chrisjj » Sun Nov 29, 2009 1:30 pm

> Advanced Duplicate Find & Fix[/url] has a similar functionality to which you are looking for.

Indeed it has a sub-set (thanks) - it is the solution I am trying to improve upon.
Chris

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Work for scriptwriter!

Post by trixmoto » Mon Nov 30, 2009 6:01 am

I'm not sure it's possible to write into the search bar via scripting.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

Re: Work for scriptwriter!

Post by chrisjj » Mon Nov 30, 2009 6:12 am

trixmoto wrote:I'm not sure it's possible to write into the search bar via scripting.
Ah, useful info - thanks.

Is there any other scriptable method of doing a search?
Chris

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Work for scriptwriter!

Post by trixmoto » Mon Nov 30, 2009 7:04 am

No, not using the MM search functionality. A script would have to build and run the SQL itself and then load the results into the window.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Melloware
Posts: 339
Joined: Mon Aug 18, 2008 9:46 am
Location: Philadelphia, PA, US
Contact:

Re: Work for scriptwriter!

Post by Melloware » Tue Dec 01, 2009 10:36 pm

trixmoto wrote:I'm not sure it's possible to write into the search bar via scripting.
Well using Windows API SendMessage or PostMessage and Spy++ if it is a normal ComCtrl textbox it should be able to be modified and text entered into it.

Assuming HWND is the handle to the MM Search text box...

Code: Select all

[DllImport("user32.dll")]
private static extern int SendMessage(IntPtr hWnd, int wMsg, int
wParam, [MarshalAs(UnmanagedType.LPStr)] string lParam);

private const int WM_SETTEXT = 0x0C;

private void button1_Click(object sender, EventArgs e)
{
string txt = "Hello World";
SendMessage(hWnd, WM_SETTEXT,0, txt);
}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
MonkeyTunes - DACP Server for MediaMonkey
Intelliremote - Take Back Control of your HTPC!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

Re: Work for scriptwriter!

Post by chrisjj » Fri Dec 11, 2009 10:20 pm

Thanks. Is there anyone prepared to take on this task?
Chris

Post Reply