Button script for displaying Thumbnails #2.

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Button script for displaying Thumbnails #2.

Post by Bart »

I am seeking a non-toggle button script for displaying Thumbnails #2.
Highend outside this forum

highend
Posts: 13309
Joined: 06 Feb 2011 00:33

Re: Button script for displaying Thumbnails #2.

Post by highend »

Code: Select all

#307;
The rest should be doable, right?
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Button script for displaying Thumbnails #2.

Post by klownboy »

Assigning a button to #307; will put you in thumbnail view #2 but called a second time wil toggle it out of that view into a detail view. So if you truly don't want to toggle, you need to do something like this.

Code: Select all

	if !(get("View") == 5){
		#307; }
	else {
		Status "Current View is Thumbnail #2";}
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Re: Button script for displaying Thumbnails #2.

Post by Bart »

Thank you, it works. I want to implement it also for the other thumbnail views, but how to get the code #xxx for the other views?

If you have a reference I can study it further for the next time.
Highend outside this forum

highend
Posts: 13309
Joined: 06 Feb 2011 00:33

Re: Button script for displaying Thumbnails #2.

Post by highend »

Menu - Help - List All Commands...
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Button script for displaying Thumbnails #2.

Post by klownboy »

Go to Help > Help on Scripting commands. Click on the command get in the scripting commands list. Scroll way down to view. There you will see the indexes for the different views. For the view command IDs like the one for thumbnail #2, go to Help again and click on "List all commands...". In the search box below, type in thumbnails to see the various command IDs for the different views.
Last edited by klownboy on 08 Nov 2018 19:59, edited 1 time in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Re: Button script for displaying Thumbnails #2.

Post by Bart »

Thanks you for the guidance.
Highend outside this forum

Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Re: Button script for displaying Thumbnails #2.

Post by Bart »

I did apply the given code to three buttons representing thumbnails for the tree thumbnail views but it fails after using the third after clicking on two of them after each other. I have played around with the code but failed to get good result.
Highend outside this forum

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Button script for displaying Thumbnails #2.

Post by klownboy »

Please post post the code you are using to display thumbnail sizes #1, #2 and #3 so we can see why you're having an issue. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Re: Button script for displaying Thumbnails #2.

Post by Bart »

Code: Select all

if !(get("View") == 5){
    #306; }
  else {
    Status "Current View is Thumbnail #1";}

Code: Select all

if !(get("View") == 5){
    #307; }
  else {
    Status "Current View is Thumbnail #2";}

Code: Select all

if !(get("View") == 5){
    #308; }
  else {
    Status "Current View is Thumbnail #3";}
Highend outside this forum

highend
Posts: 13309
Joined: 06 Feb 2011 00:33

Re: Button script for displaying Thumbnails #2.

Post by highend »

No comment...
One of my scripts helped you out? Please donate via Paypal

RalphM
Posts: 1935
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Button script for displaying Thumbnails #2.

Post by RalphM »

Code: Select all

if !(get("View") == 5)
This tests whether the current view is anything but Thumbnail #2 and executes the code that follows only if the condition is true, so for different buttons you also need to change the value you test for.
Check help for scripting commands and find get View for the proper values.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Re: Button script for displaying Thumbnails #2.

Post by Bart »

Thanks for the help. Found the correct values in the help section. For Thumbnails 1 and 3, the Get "View" values should be 4 and 6.
Highend outside this forum

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Button script for displaying Thumbnails #2.

Post by klownboy »

Hey Bart, I'm glad you found the correct get "view" indexes for those thumbnail views (I referred you to those get "view" indexes in an earlier post). :tup:
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply