SlideShow [v0.9]

Discuss and share scripts and script files...

SlideShow [v0.9]

Postby FluxTorpedoe » 09 Jun 2013 11:47

Hi'

=============
SlideShow v0.9
=============
Tested under XYplorer v12.40 (probably doesn't work with XY < v12)

Updated 2013-06-24 - Main Points (see full changelog at bottom of post)

+++ MUCH SMOOTHER AND NATURAL EXPERIENCE :D
• No "script interrupted" or SlideShow tab remaining when canceling slide show (with ESC)
• No XY tweaking needed to navigate with arrow/page keys
• Ability to zoom/unzoom with +/- (Tip: don't forget to "lock zoom")
• In fact, all Preview KeyboardShortcuts work



FEATURES:

Run a simple slide show of your images.
:arrow:
Available in two flavors:
• a simple "no questions asked" slide show.
• a custom slide show, with an input where you can:
- define duration between slides
- enable loop
- slide through all pictures in folder including all subfolders!
:arrow: Can be run from:
• the filelist (automatically opens fullscreen preview, and close it on slide show end), or
• directly from the floating or fullscreen preview (via a keyboard shortcut).



TIP:

You can use other file-related Keyboard Shortcuts during the slide show (*).
:cup: e.g. Tag or Label your pics on the fly - and more! :cup:

(with CKS assigned to "Edit Tags by List..." or to Labeling)


(*) Requires XY>=v12.40.0213 with FPEnableCKS activated.



NOTES:

• Slide show can be interrupted by pressing ESC (optional: click and press ESC again to exit fullscreen preview).
• Before running the slide show, the script opens a new tab listing image files only. Tab will be closed automatically on slide show end (if not interrupted).
• By default, it will only show standard images (jpg, gif, png+).
- If you have image codecs (FastPictureViewer CodecPack, SageThumbs...), it can make a slide show of all images.
- Also, if you use the PowerLauncher script, it can use your image "definitions" from PL's definition file.
:arrow: In any case, just add/remove the corresponding comment ("//" sign) in the header of the script.


USAGE:

• Install the SlideShow script (procedure below)
      Optional: Assign Custom Keyboard Shortcuts (CKS) via "User | Manage Command... | Load Script File"
e.g. "Shift+Enter" to SlideShow and "Alt+Shift+Enter" to Custom SlideShow

• Go to a folder that contains images, then
  - Left Click on the SlideShow button (or Shift+Enter), or
- Right Click on the SlideShow button and choose "Custom SlideShow" (or Alt+Shift+Enter),
In the window, enter e.g. 1SL (i.e. Duration: 1sec, include Subfolders, Loop),


and...

• Enjoy the show!
& don't hesitate to post your questions, suggestions, comments... 8)
Flux


--------------------------
################
### Installation ###
################


To use this script, first, copy the following file into XYplorer scripts folder: <xyscripts> ,
Slideshow.xys
(5.3 KiB) Downloaded 77 times
then either:
Add load "SlideShow.xys"; to the "on click" and load "SlideShow.xys", "CustomSlideShow"; to the "on right-click" of your custom button, or

Use the following snippet (with Don's litteral instructions):
-a) Paste ::snippet; into the address bar and press ENTER. A text box will open to enter snippet.
-b) And here comes the copy+paste ready snippet. It will create a new button at the right end of your toolbar.
Code: Select all
Snip: CTB 1
  XYplorer 12.40.0000, 13-06-09 19:22:29
Action
  NewUserButton
Name
  SlideShow
Icon
  %winsysdir%\shell32.dll /141
ScriptL
  load "SlideShow.xys", "SlideShow";
ScriptR
  load "SlideShow.xys", "CustomSlideShow";
FireClick
  0

Or to integrate with another button, add the following lines to your CTB:
Code: Select all
"SlideShow|%winsysdir%\shell32.dll /141"
  load "SlideShow.xys", "SlideShow";
"Custom SlideShow"
  load "SlideShow.xys", "CustomSlideShow";


--------------------------
################
### Changelog ###
################


v0.9
+++ ESC cancels slideshow without interrupting script
=> no annoying message, no need to ESCape again to leave preview, no remaining tab
+++ SlideShow accepts all default Floating/Fullscreen Preview Keyboard Shortcuts
(Note: still works well with your own shortcuts via FPEnableCKS)

v0.6.1
! Fixed Default SlideShow not ending (bug introduced with last version)
v0.6
* Optimized visual experience in Recurse Subfolders mode
+ Script remembers last setting used in Custom SlideShow
+ Added an "Alternate SlideShow" for CKS use, i.e. a predefined inputless Custom SlideShow (check bottom of script) (opt.)
* Default slide duration of default SlideShow is now accessible in script header
! Fixed bug where Looped SlideShow would stop when started from last pic

v0.5b4
+ Use Left and Right arrows to navigate between files during slide show (opt.)
+ Resume interrupted slide show (smartly reusing SlideShow tab)
v0.5b3
! Fixed tab misbehavior (with settings OpenNewTabsNextToCurrent & CycleTabsInRecentlyUsedOrder OFF)
Last edited by FluxTorpedoe on 25 Jun 2013 09:29, edited 20 times in total.
FluxTorpedoe
 
Posts: 491
Joined: 05 Oct 2011 12:15

Re: SlideShow [v0.5b1]

Postby FluxTorpedoe » 09 Jun 2013 11:58

Yikes,
Just after posting this, I had the idea to search the forum and I saw that serendipity had already wrote one slide show script!
At first glance it seems we don't use the same approach, so each might have its use.

One thing for sure is that if you have a too old version of XY and my script doesn't work, then serendipity's XYSlideshow might be the solution.
I'll update my post with the XY version warning.

---------

For the curious out there, basically I'm using:
Code: Select all
while (get("FocusedPos") <  get("CountItems")) {
  sel "+1";
}
FluxTorpedoe
 
Posts: 491
Joined: 05 Oct 2011 12:15

Re: SlideShow [v0.5b1]

Postby klownboy » 09 Jun 2013 13:35

Hey Flux,
Nice script. Thanks for sharing. I noticed that after the last slide and getting the last picture message the script will leave me in a different folder from where I started and it's not the parent (in both versions - regular and custom). I started in: "G:\Pictures\Emory" and ended up in "G:\TV - Misc\". I haven't looked at the code details yet, but it seemed a bit strange and I figured I'd pass it on. I'd suggest not having the message popping up at the start and end and maybe simply have a status bar message (i.e., something we wouldn't have to click through) or an option for no messages. It can get a bit annoying when you have a small number of pictures especially since you typically get a sound along with the message.
Thanks again,
Ken
klownboy
 
Posts: 992
Joined: 28 Feb 2012 19:27

Re: SlideShow [v0.5b2]

Postby FluxTorpedoe » 09 Jun 2013 18:16

Hi'
Thanks for the feedback!
The messages were annoying indeed... ;)
So I just removed them (they can still be activated in the script header). You can download the updated beta 2 (with this only change).

Regarding the mix-up of folders, I can't repro here (neither on my XY, nor on a clean one). :shock:
What's you XYplorer version?
Could you tell me if when ending up in this different folder, it's in in a new tab, or an old tab that already had this location, or an old tab overwritten with this new location?
Maybe it's related to the automatic closing of the "slideshow" tab (created to list images only), and a setting related to tab cycling... I'll check up on this as soon as I can.
FluxTorpedoe
 
Posts: 491
Joined: 05 Oct 2011 12:15

Re: SlideShow [v0.5b2]

Postby klownboy » 10 Jun 2013 00:54

Hi Flux,
Beta 2 - much better without the messages. :) I still end up in a different folder than where I started though - same as I mentioned before - I know you didn't change anything concerning that. I'll take a look at the code later and step through it to see what's happening.

I'm using the very latest beta 10.40.0304, Windows 7 x64. Yes, it did make the slideshow tab and when it ended it closed the tab and I end up in my locked "TV - Misc" folder. The folder I was slide-showing the pictures was a sub-folder of a locked folder "Pictures".

As a side note, when I used the sub-folder allowance (e.g., 2S) and escaped out of the slideshow after seeing quite a few pictures, the script closed a locked tab "Pictures" (in G:\Pictures" - it has a ton of sub-folders containing pictures under it) when it finished. Previously I was using it from a sub folder under pictures, which is not locked, so it goes to my "C:\" root drive since it's set as a default for all folders I view which are not locked. More later.

Thanks,
Ken
klownboy
 
Posts: 992
Joined: 28 Feb 2012 19:27

Re: SlideShow [v0.5b3]

Postby FluxTorpedoe » 10 Jun 2013 07:46

Thanks for the clarification, I've figured it out.
It was caused by your tab settings (OpenNewTabsNextToCurrent: OFF AND CycleTabsInRecentlyUsedOrder: OFF), i.e. new tabs are opened at the end, but when closed they don't switch to the previous active one but to the last one.
No it should work whatever the configuration.
8)

+ @all
I've added a cool TIP in the first post... :wink:
FluxTorpedoe
 
Posts: 491
Joined: 05 Oct 2011 12:15

Re: SlideShow [v0.5b4]

Postby klownboy » 10 Jun 2013 14:15

Thanks Flux,

Beta 0.5b4 works like a charm...no jumping to another folder at the end of the slideshow.

You are right about the tab settings. I like to work with fixed (locked) tabs and have my "C:\" act as the default for opening other folder locations.

Just curious though, is the script generating new thumbnails as opposed to using existing one for the folder(s)? Because of the filtering there may not be anyway to avoid that situation I suppose. After a bit more testing, I noticed the generation seems to happen when I use the "s" to include sub-folders. It generated new thumbs when I used the "s" switch even when there were no sub-folders (obviously, I shouldn't have used the "s" when I knew there were no subs). It doesn't appear to generate "new" thumbs (when they previously existed) if you are slide showing only the current folder with no subs.

I did notice though on escaping the newly generated slideshow tab with the picture filters is still present. I'm not sure if it would be easy to clean up the remnant tab when escaping, maybe using "_Terminate" label.

Thanks again,
Ken
klownboy
 
Posts: 992
Joined: 28 Feb 2012 19:27

Re: SlideShow [v0.5b4]

Postby FluxTorpedoe » 10 Jun 2013 15:31

klownboy wrote:is the script generating new thumbnails as opposed to using existing one for the folder(s)? Because of the filtering there may not be anyway to avoid that situation I suppose. After a bit more testing, I noticed the generation seems to happen when I use the "s" to include sub-folders.
Per se, the script isn't using any thumbnail or thumbnail view at all, it just opens the preview and select images one by one.
So I guess the effect you're talking about is only when you start the slide show in one of the Thumbnails Views.
And after investigation, the fact that you notice it only in "Subfolder" mode comes from the thumbnails cache settings: for the script to list all images in folder including its subfolders, the branch mode (aka flatfiles) is activated, which is a form of search.
:arrow: So the solution would be to activate the setting "Cache thumbnails of search results, too".

:!: Anyway, that raised my interest, so I completely reordered the way the "Subfolder" mode is parsed, so it will be much faster and responsive even without this setting!

klownboy wrote:I did notice though on escaping the newly generated slideshow tab with the picture filters is still present. I'm not sure if it would be easy to clean up the remnant tab when escaping, maybe using "_Terminate" label.
Unfortunately, ESC really interrupts the whole script and all its dependencies AFAIK... So I fear there's no way to auto-close the tab after an interruption.
That's why in v0.5b4 I'd decided to take advantage of it and optimized the code to be able to resume a slideshow from the current slideshow tab.
So e.g. even this sequence works: Regular SlideShow (Opens a new filtered tab) > Interruption > CustomSlideShow with Subfolders (keep filtered tab but recurse it).

I'll give all this a day to try and see if there are other things to fix or enhance before posting the update.
Thanks for your remarks & don't hesitate if you have any other comment or suggestion! 8)
Flux
FluxTorpedoe
 
Posts: 491
Joined: 05 Oct 2011 12:15

Re: SlideShow [v0.5b4]

Postby klownboy » 10 Jun 2013 21:26

Hey Flux,
Thanks for the explanations. I was indeed in the thumbnail view when I started the slideshow. Typically, I would be since I have my picture and wallpaper folders set to view as thumbnails in Folder View Settings. It did look like it was redrawing the thumbnails before starting the slideshow when I used the "S" switch whether I had a sub-directory or not.

I was under the impression that if "_Terminate" was present in the script resource file, it would be run at the conclusion of the script whether it was escaped or not, but I guess that's not the case. Some previous posts with Don that raised the need for "_Initiate" and "_Terminate" led me to believe that though.
Thanks,
Ken
klownboy
 
Posts: 992
Joined: 28 Feb 2012 19:27

Re: SlideShow [v0.5b4]

Postby aurumdigitus » 12 Jun 2013 18:26

Would this be possible - when using Custom Slideshow could there be a MRU drop-down list? If that is too complex or impossible maybe at least have the dialog box remember the last value input. :!:
aurumdigitus
 
Posts: 783
Joined: 30 May 2008 20:02
Location: Lake Erie

Re: SlideShow [v0.6]

Postby FluxTorpedoe » 13 Jun 2013 08:29

@Ken
Things should be better now with thumbnails in Subfolders mode - though as I said, it's a search so they have to be rebuilt anyway (AFAIK).

@aurumdigitus
I like that idea...
Done! :)

Have a nice day, 8)
Flux
FluxTorpedoe
 
Posts: 491
Joined: 05 Oct 2011 12:15

Re: SlideShow [v0.6]

Postby klownboy » 13 Jun 2013 12:14

Hi Flux, You refer to v0.6 in the updated first post, but what I downloaded on June 13 is "0.5b5 - 2013-06-12" according to the file contents. I take it that 0.5b5 is really 0.6?
Thanks for the updates,
Ken
klownboy
 
Posts: 992
Joined: 28 Feb 2012 19:27

Re: SlideShow [v0.6]

Postby FluxTorpedoe » 13 Jun 2013 12:52

Ooops. :oops:
Right file but wrong header indeed... (Fixed)
I had a late thought that it was worthy of going out of beta. ;)
FluxTorpedoe
 
Posts: 491
Joined: 05 Oct 2011 12:15

Re: SlideShow [v0.6.1]

Postby FluxTorpedoe » 17 Jun 2013 13:58

Hi'
One of the last fixes introduced a bug, with the Default SlideShow remaining stuck on the last image... :bug:

Sorry for that. It's now fixed.

Have a nice day, 8)
Flux
FluxTorpedoe
 
Posts: 491
Joined: 05 Oct 2011 12:15

Re: SlideShow [v0.6.1]

Postby klownboy » 17 Jun 2013 22:43

Hey Flux, I had tried version 0.6.0 and it got me in some kind of fix that I couldn't get out of without exiting XY and restarting it. Those darn bugs...no harm done. Never got a chance to report back. SlideShow [v0.6.1] seems to be working fine.
Thanks,
Ken
klownboy
 
Posts: 992
Joined: 28 Feb 2012 19:27

Next

Return to Script Exchange



Who is online

Users browsing this forum: No registered users and 0 guests