Welcome, Guest
Python Scripts for ComicRack

TOPIC: [Script] Find Missing Comics using CV Offline (Updated: 20-Sep-2017, NEW FORMAT)

[Script] Find Missing Comics using CV Offline (Updated: 20-Sep-2017, NEW FORMAT) 2 weeks 13 hours ago #48243

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 350
  • Thank you received: 94
  • Karma: 20
It appears I only had to add an icon to appear there... XD

Realising that I learnt a lot of new things though about comicrack interface...
The administrator has disabled public write access.

[Script] Find Missing Comics using CV Offline (Updated: 20-Sep-2017, NEW FORMAT) 1 week 6 days ago #48245

  • rmagere
  • rmagere's Avatar
  • Offline
  • Gold Boarder
  • Posts: 219
  • Thank you received: 23
  • Karma: 6
Yes - that is actually the only thing I know as I had repackaged your old script myself by adding an icon (a question mark) :silly: .
I was about to do the same with the new version but thought we would all benefit from it ;)
The administrator has disabled public write access.
The following user(s) said Thank You: Xelloss

[Script] Find Missing Comics using CV Offline (Updated: 20-Sep-2017, NEW FORMAT) 1 week 6 days ago #48246

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 350
  • Thank you received: 94
  • Karma: 20
It is funny, because I thought Library hook was for that... (instead of books), but I wanted also to keep the "book hook", so I began doing what I always do for scripting, opening other scripts and looking for the things I want to add to my script (in this case I used Library organizer), and see I could add multiple hooks per .py file... so I added a hook for Library and built a function that called the original function (later I realised you can put multiple hooks in the same function with "," XD), but I didn't see any changes... So I thought... ok, I need to add an icon to do that, which was quite easy to find how to XD, and so I added the icon in the Library hook, and, just by chance, I added it also to the "books hook" (for cosmetic only). This time it worked... but not because what I thought it did... (it was because I added the icon to the "book hook" and not the library hook)...

After that, I realised I had to put a filter so that if no book is selected, the script didn't do anything (something that from the Automation link was imposible before), and I added this condition to the function called in the "library hook". Of course, it didn't work, because the button was calling to the book hook... and that was unchanged... After A LOT of trial and error, I realised that the library hooks is for the "file -> automation" menu, and the book hook is for edit -> automation and bar buttons... (the second only shown when the book hook has an icon XD)

Al this to learn this:

book hook is for "Second Click -> automation" in selected comic (with or without an icon), and also for the button bar IF iIT HAS AN ICON
library hook is for "File->automation" (with or without an icon)

You can add multiple "hooks (with their name and icons)" in a py file, and it apply to the function it is hooked to...
You can also add multiple hook types for a function by using "," in the hook type (for example in my script it is now "books, library")

Also, THANKS! all ideas to improve my scripts are always super welcome!
Last Edit: 1 week 6 days ago by Xelloss.
The administrator has disabled public write access.
The following user(s) said Thank You: rmagere
Time to create page: 0.164 seconds

Who's Online

We have 270 guests and one member online