Page 1 of 1

Button script for displaying Thumbnails #2.

Posted: 03 Nov 2018 12:02
by Bart
I am seeking a non-toggle button script for displaying Thumbnails #2.

Re: Button script for displaying Thumbnails #2.

Posted: 03 Nov 2018 12:20
by highend

Code: Select all

#307;
The rest should be doable, right?

Re: Button script for displaying Thumbnails #2.

Posted: 03 Nov 2018 13:42
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";}

Re: Button script for displaying Thumbnails #2.

Posted: 08 Nov 2018 12:13
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.

Re: Button script for displaying Thumbnails #2.

Posted: 08 Nov 2018 12:15
by highend
Menu - Help - List All Commands...

Re: Button script for displaying Thumbnails #2.

Posted: 08 Nov 2018 12:23
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.

Re: Button script for displaying Thumbnails #2.

Posted: 08 Nov 2018 12:51
by Bart
Thanks you for the guidance.

Re: Button script for displaying Thumbnails #2.

Posted: 10 Nov 2018 03:01
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.

Re: Button script for displaying Thumbnails #2.

Posted: 10 Nov 2018 12:59
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.

Re: Button script for displaying Thumbnails #2.

Posted: 12 Nov 2018 13:32
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";}

Re: Button script for displaying Thumbnails #2.

Posted: 12 Nov 2018 13:53
by highend
No comment...

Re: Button script for displaying Thumbnails #2.

Posted: 12 Nov 2018 13:55
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.

Re: Button script for displaying Thumbnails #2.

Posted: 12 Nov 2018 14:10
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.

Re: Button script for displaying Thumbnails #2.

Posted: 12 Nov 2018 16:32
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: