Batch Art Finder 4.2 - Updated 03/07/2012

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby Guest » Wed Mar 07, 2012 7:22 pm

My system is Win 7 32-bit with IE8. The "try next image" link was showing "[No Results]" even though there are in fact more results. This worked fine on XP where I would initially get an ActiveX warning prompt. So, I looked around in the code and found the function "showimage" is responsible for handling this action. I added some msgbox lines for debugging and determined that the variables "cur" (current) and "tot" (total) do not seem to populate properly. They remain empty / null. Thus it returns "[No Results]". However, when I comment out the "If" statement that checks the values of those variables, the "try next image" link starts working! It briefly shows a red X icon but a second or two later, the next image shows up. Honestly, I cannot follow how that works in the code, but I'm happy now nonetheless. The "previous" link doesn't work though as it still advances forward, but I can do just fine without that. I just wanted to share this "hack" for those who may want to try it. I had tried just increasing the results in the Options menu before this, but it seems there's a bug where it always saves the last image rather than the one selected.

Here's the code to look for. Near the middle are the lines to comment out (just add an apostrophe at the front) as well as the "End If" near the bottom.

Code: Select all
  doc.WriteLine "Function showimage(id,dir)"
  doc.WriteLine "  On Error Resume Next"
  doc.WriteLine "  Set SDB = CreateObject(""SongsDB.SDBApplication"")"
  doc.WriteLine "  If Not (SDB Is Nothing) Then"
  doc.WriteLine "    Set data = SDB.Objects(""BAFData""&id)"
  doc.WriteLine "    If Not (data Is Nothing) Then"
  If Images = 1 Then 
    doc.WriteLine "      Dim div : Set div = document.getElementById(""img""&id)"
  Else
    doc.WriteLine "      Dim div : Set div = document.getElementById(""img""&id&""-1"")"
  End If
  doc.WriteLine "      If Not (div Is Nothing) Then"
  doc.WriteLine "        Call div.setAttribute(""found"","""")"
  If Images = 1 Then 
    doc.WriteLine "        Dim div2 : Set div2 = document.getElementById(""dim""&id)"
  Else
    doc.WriteLine "        Dim div2 : Set div2 = document.getElementById(""dim""&id&""-1"")"
  End If
  doc.WriteLine "        If Not (div2 Is Nothing) Then"
  doc.WriteLine "          data.Item(""result"") = 1"
  doc.WriteLine "          Dim cur : cur = Int(data.Item(""result""))+dir"
  doc.WriteLine "          Dim tot : tot = Int(data.Item(""count""))"
 
  'doc.WriteLine "          If (cur < 1) Or (cur > tot) Then"
  'doc.WriteLine "            div.innerHTML = ""[Nooo results!!!] cur="" & cur"
  'If Images = 1 Then
  '  doc.WriteLine "            div2.innerHTML = """""
  'Else
  '  doc.WriteLine "            div2.innerHTML = ""&nbsp;"""
  'End If
  'doc.WriteLine "          Else"[/color]

  doc.WriteLine "            Dim src : src = data.Item(""img""&cur)"     
  doc.WriteLine "            data.Item(""image"") = cur"
  doc.WriteLine "            data.Item(""source"") = src"
  doc.WriteLine "            If dir = 1 Then"
  doc.WriteLine "              data.Item(""previous"") = 0"
  doc.WriteLine "            Else"
  doc.WriteLine "              data.Item(""previous"") = 1"
  doc.WriteLine "            End If"
  doc.WriteLine "            Dim str : str = ""<img src='""&src&""' title='""&src&""' count='""&cur&"" of ""&tot&""'"""
If ini.BoolValue("BatchArtFinder","SetSize") Then
    ImageSize = """ width='"&ini.IntValue("BatchArtFinder","SetW")&"px' height='"&ini.IntValue("BatchArtFinder","SetH")&"px'"""
    doc.WriteLine "            str = str&"&ImageSize
  End If
  doc.WriteLine "            str = str&"" count='' cross='0' /></a>"""     
  If Images = 1 Then
    doc.WriteLine "            div.innerHTML = ""<a href=""""javascript://"""">""&str"
  Else
    doc.WriteLine "            div.innerHTML = ""<a href=""""javascript://"""" onclick=""""highlight('""&div.id&""')"""">""&str"
  End If 
  doc.WriteLine "            Call div2.setAttribute(""accept"","""")"
  doc.WriteLine "            div2.innerHTML = ""Image: ""&cur&"" of ""&tot&""<br />Loading..."""
       
  'doc.WriteLine "          End If"

  doc.WriteLine "        End If" 
  doc.WriteLine "      End If"
  doc.WriteLine "    End If" 
  doc.WriteLine "  End If" 
  doc.WriteLine "  On Error GoTo 0"
  doc.WriteLine "End Function"
Guest
 

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby Loogie » Tue Mar 27, 2012 9:21 pm

FeZ_temp wrote:
FeZ_temp wrote:Hi Trixmoto,
are there any news about posting
viewtopic.php?f=2&t=10435&start=1410#p291814 Postby johnbot

i tried to fix it by my own but i clouldnt find the correct place to fix the counter.
Any ideas how to handle this ?

tnx in advance.

FeZ


and btw, please dont care about Loogie´s words. I dont understand why some people can requests for updates. He/She should be thankful for the code you already provided for FREE.

surely you're kidding. I clearly stated I'm grateful and thankful and trixmoto owes us nothing. Mediamonkey is better because of trixmoto. How much more clear could I have been?

I'm merely asking for someone else to take over, since my coding skills are nill. Nobody is taking over, because Trixmoto is active on these boards, and he keeps saying he's ready and willing to fix it, so people keep on keepin' on.

I too have given up on many projects, when I really felt as though I wasn't giving up, but instead just needed a little bit more time...

the fact is, I'm distraught and upset that I can't use mediamonkey anymore, because trixmoto is no longer supporting this script, and for whatever reason, MediaMonkey has not incorporated it into the releases. It's a script that should be included and 100% supported by MM, and not the community. Much 95% of Trixmoto's scripts, it makes MM better than any other media solution available. Without Trixmoto. MM is merely "meh, pretty good", but with..it's brass balls.
Loogie
 
Posts: 4
Joined: Tue Jan 24, 2012 11:43 pm

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby Loogie » Tue Mar 27, 2012 9:23 pm

Trix, please, put up a "donate" link or something so we can motivate you to fix this thing man. What do we have to do? For the love of god, HELP US HELP YOU TO HELP US!!!

edit" subscribing, though I dont know why..I can see it coming a mile away...this script is dead.
Loogie
 
Posts: 4
Joined: Tue Jan 24, 2012 11:43 pm

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby nohitter151 » Wed Mar 28, 2012 1:06 pm

Loogie wrote:Trix, please, put up a "donate" link or something so we can motivate you to fix this thing man. What do we have to do? For the love of god, HELP US HELP YOU TO HELP US!!!

edit" subscribing, though I dont know why..I can see it coming a mile away...this script is dead.

His website already has a donation link:
http://trixmoto.net/mm/

And please don't feel so entitled to something that he develops in his spare time and provides for free! :roll:
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?
nohitter151
 
Posts: 21444
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby trixmoto » Sat Mar 31, 2012 1:43 pm

I always appreciate donations, they help to cover the hosting costs of my website. However, lack of motivation is not the problem, it's lack of time. I will be moving to Australia for work in a month, this will either give me lots of additional time (because my friends won't be there) or even less time (because I'll be working all the hours) - so keep your fingers crossed for the former, not the later. :)
Check out my scripts at trixmoto.net and subscribe to my RSS feed for updates.
Also check out my Uniface blog.
Get a free Dropbox account! :o

Image
trixmoto
 
Posts: 9703
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby anileator » Mon Apr 02, 2012 8:10 pm

Good luck with the move trix, my parents moved out a year ago. They find the time to relax and do activities and stuff nowdays so maybe you will too. Would be great to see an update or an alternative to this to fix google search and add amazon or something :)
anileator
 

Script - Batch Art Finder

Postby currong » Mon May 14, 2012 4:15 pm

I have been having error issues with the script Batch Art Finder. If I individually select the image for saving the script works and saves the image but if any of the image selecting boxes are selected, such as "next image", the script goes to a screen that says This program cannot display the webpage. This message also appears if doing a batch of albums and I select save all images box. Is there a tweek that I need to do with MM or the browser to stop the error messages?
Last edited by Lowlander on Mon May 14, 2012 4:21 pm, edited 1 time in total.
Reason: Merged with existing topic
currong
 
Posts: 1
Joined: Mon May 14, 2012 3:58 pm

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby ripndip » Wed Jun 06, 2012 4:21 pm

anileator wrote:Good luck with the move trix, my parents moved out a year ago. They find the time to relax and do activities and stuff nowdays so maybe you will too. Would be great to see an update or an alternative to this to fix google search and add amazon or something :)


I hope the move went well! Thank you for all your scripts Trix, only when you stop updating did we realize how much better Mediamonkey was with you! They should have hired you a long time ago and everyone would be better off.

I too notice the Google search is not working, is the post by Guest at the start of the page with a script hack working? I know nothing about code so I don't want to use something malicious. I don't know where to edit or enter it.

Thank you guys! I donated to show my love an support :D
ripndip
 
Posts: 38
Joined: Fri Oct 02, 2009 12:54 pm

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby trixmoto » Sat Jun 16, 2012 8:54 pm

Thanks, kind words indeed. I've not had a chance to have a look at the code, but as long as your backup the original first, it should be ok to try. As far as I can see they've just commented out some code, not added anything new.
Check out my scripts at trixmoto.net and subscribe to my RSS feed for updates.
Also check out my Uniface blog.
Get a free Dropbox account! :o

Image
trixmoto
 
Posts: 9703
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby borisag » Mon Jun 18, 2012 10:50 am

Hello
I was using the modified Batch Art Finder script that supports Bing but suddenly it stops working and began to show "No results" every time like Google searches (I KNOW THAT GOOGLE DOESN'T WORK A LONG TIME AGO that is why I was using Bing). I would like to know if somebody it's having the same problem or if it's only happening to me. Is there any solution?
Thanks
borisag
 
Posts: 24
Joined: Wed Jul 13, 2011 7:38 pm

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby Guest » Mon Jun 18, 2012 10:05 pm

Hi all,

Unfortunately google searches are also not working for me too... :-(

Initially I would always get no results even when there were results, and the log file showed me that the problem was in the decoding of the image file types, which can be fixed by changing the InFileTypes function to the following code:

Code: Select all
Function InFileTypes(arr,src,ext)
  InFileTypes = False
  ext = ""
  Dim i : i = InStrRev(src,".")
  If i > 1 Then
    Dim s : s = UCase(Mid(src,i))
    ext = LCase(s)
    For i = 0 To UBound(arr)
      If left(s,len(arr(i))+1) = "."&arr(i) Then
        InFileTypes = True
        Exit Function
      End If
    Next
  End If
End Function


Now I'm stuck with the images not displaying (red x)... :cry:
Guest
 

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby Aff » Sat Jun 23, 2012 5:17 pm

borisag wrote:I was using the modified Batch Art Finder script that supports Bing but suddenly it stops working and began to show "No results" every time like Google searches (...) I would like to know if somebody it's having the same problem (...)

Same here :(
Aff
 
Posts: 206
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby Aff » Sun Jun 24, 2012 10:36 am

OK - I've just fixed Google search! :D

Here is the old piece of code at line 2104...
Code: Select all
          If InStr(src,"http://images.google.com/imgres?imgurl=") = 1 Then
            src = Replace(src,"http://images.google.com/imgres?imgurl=","")
            If InStr(src,"&imgrefurl=") > 1 Then
              src = Left(src,InStr(src,"&imgrefurl=")-1)
            End If
          End If     

...that has to be replaced by:
Code: Select all
          If InStr(src,"http://images.google.com/imgres?") = 1 Then
             Dim RegEx : Set RegEx = New RegExp
             RegEx.IgnoreCase = True
             'Delete left from image file url
             RegEx.Pattern = "http://images.google.com/imgres\?.+&imgurl="
             src = RegEx.Replace(src, "")
             'Delete right from image file url
             RegEx.Pattern = "&.+"
             src = RegEx.Replace(src, "")
          End If     


This is a complete solution regarding Google search for the original script ("Try next image" and "Previous image" work perfectly without any further modification).
To apply the fix, edit BatchArtFinder.vbs in Notepad.
Aff
 
Posts: 206
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby ripndip » Mon Jun 25, 2012 4:21 pm

Anyone else get this error "the MSInet component could not be found, please install before running script"?


Aff wrote:OK - I've just fixed Google search! :D

Here is the old piece of code at line 2104...
Code: Select all
          If InStr(src,"http://images.google.com/imgres?imgurl=") = 1 Then
            src = Replace(src,"http://images.google.com/imgres?imgurl=","")
            If InStr(src,"&imgrefurl=") > 1 Then
              src = Left(src,InStr(src,"&imgrefurl=")-1)
            End If
          End If     

...that has to be replaced by:
Code: Select all
          If InStr(src,"http://images.google.com/imgres?") = 1 Then
             Dim RegEx : Set RegEx = New RegExp
             RegEx.IgnoreCase = True
             'Delete left from image file url
             RegEx.Pattern = "http://images.google.com/imgres\?.+&imgurl="
             src = RegEx.Replace(src, "")
             'Delete right from image file url
             RegEx.Pattern = "&.+"
             src = RegEx.Replace(src, "")
          End If     


This is a complete solution regarding Google search for the original script ("Try next image" and "Previous image" work perfectly without any further modification).
To apply the fix, edit BatchArtFinder.vbs in Notepad.


Is there a way to edit the mmip? I dont have the .vbs
ripndip
 
Posts: 38
Joined: Fri Oct 02, 2009 12:54 pm

Re: Batch Art Finder 4.1 - Updated 31/01/2011

Postby lostinthought » Mon Jun 25, 2012 5:19 pm

Aff wrote:OK - I've just fixed Google search! :D

Here is the old piece of code at line 2104...
Code: Select all
          If InStr(src,"http://images.google.com/imgres?imgurl=") = 1 Then
            src = Replace(src,"http://images.google.com/imgres?imgurl=","")
            If InStr(src,"&imgrefurl=") > 1 Then
              src = Left(src,InStr(src,"&imgrefurl=")-1)
            End If
          End If     

...that has to be replaced by:
Code: Select all
          If InStr(src,"http://images.google.com/imgres?") = 1 Then
             Dim RegEx : Set RegEx = New RegExp
             RegEx.IgnoreCase = True
             'Delete left from image file url
             RegEx.Pattern = "http://images.google.com/imgres\?.+&imgurl="
             src = RegEx.Replace(src, "")
             'Delete right from image file url
             RegEx.Pattern = "&.+"
             src = RegEx.Replace(src, "")
          End If     


This is a complete solution regarding Google search for the original script ("Try next image" and "Previous image" work perfectly without any further modification).
To apply the fix, edit BatchArtFinder.vbs in Notepad.


Hey there AFF...as you recomended, I edited BatchArtFinder.vbs, replacing the old code with your new code, saved the file and restarted MM4. I ran the edited script, but to no avail I am getting the same results as prior to the edit...it searches and then returns "[No results]". I am on a WIN7 64bit PC using MM4.05 Gold. Did I miss a step?
lostinthought
 
Posts: 25
Joined: Sun Oct 16, 2011 3:18 pm

PreviousNext

Return to Need Help with Addons?

Who is online

Users browsing this forum: Bing [Bot] and 14 guests