How to add XnView to CD autoplay ?

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

User avatar
drMateo
Posts: 7
Joined: Sun Mar 04, 2007 2:13 pm

How to add XnView to CD autoplay ?

Post by drMateo »

Hi !

I was browsing the forum searching for threads concerning the auto-play feature. I found some topics but mainly related to USB devices.
I'd like to add my XnView to a common CD auto-play.
I have some knowledge about system registry and was able to successfully create new entries under ...Explorer\AutoplayHandlers\EventHandlers
but seems they don't want to work as they should.
I used "C:\Program Files\XnView\xnview.exe" "%1" and
"C:\Program Files\XnView\xnview.exe" -slide "%1" as command values.

Could you please give me some advices how to add XnView to my auto-play handlers. Should I use different command line parameters if my images are not directly on a CD and they are stored in separate directories ?

Thanks in advance for all your advices.
User avatar
XnTriq
Moderator & Librarian
Posts: 6363
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Post by XnTriq »

User avatar
drMateo
Posts: 7
Joined: Sun Mar 04, 2007 2:13 pm

Post by drMateo »

Thank you very much for your nice reply XnTriq.
I had some problems with posting here but the problem is already solved. I had a word in my signature that was treated as a spam word.

I visited all your references. I have some knowledge about creating autoplay handlers using a system registry. I have already created my own handlers for various applications. Just met with some troubles trying to create a handler for XnView.
I want add XnView to ShowPicturesOnArrival handler and I can do that. But I am not sure what command line should be used so that XnView can open a random picture file on my CD. Lets say I have a few various directories on my CD. Each one includes some pics. So I want XnView to the first file or load all of them to the slide show. Lets say the CD is not mine so it cannot contain anything like autorun or other ini file.
Regards,
Mateo
User avatar
XnTriq
Moderator & Librarian
Posts: 6363
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Post by XnTriq »

Hi again, drMateo.

Unfortunately I don't know of any way to do this with the command line switches currently available. :?

Info » Command line help...

Code: Select all

   Usage : xnview [options] files ....
       Options:

           -all               : Open a window for each picture
           -browser           : Launch the browser
           -slide <file>      : Launch slide show

           -full              : Start in fullscreen
           -fi                : Force Fit to Image
           -fa                : Force Xnview to Fit Image

           -ini <file>
           -scan
           -capture

           -clipaste
       You can use 'xnview <folder>' to start browser.

I guess one could write a small (Windows Shell or Visual Basic) script which gets invoked by the ShowPicturesOnArrival handler and scans the CD for image files, before passing the path and name of the first one it finds on to XnView:

Code: Select all

%ProgramFiles%\XnView\xnview.exe -full <file>
But even that wouldn't be a perfect solution, because you'd have to launch the slideshow manually by hitting the [SPACE] key. :|
User avatar
drMateo
Posts: 7
Joined: Sun Mar 04, 2007 2:13 pm

Post by drMateo »

Yeah. Thanks XnTriq.
I wonder how WMP, foobar2000, Nero or other software do this. Perhaps they have special command line options that activate searching for supported files even if a CD has a mixed content.

Greets !
Regards,
Mateo