Freezing / lagging during thumbnail creation

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
highend
Posts: 9099
Joined: 06 Feb 2011 00:33

Re: Freezing / lagging during thumbnail creation

Post by highend » 29 Mar 2020 23:44

Code: Select all

    $command = <<<>>>
"<xy>" /path="D:\your picture path\" /new /script="::#307;wait 1000;#1001;#501;wait 3000;#1001;if(get('instance')=='2') {exit 'n';}"
>>>;
    run $command, "%TEMP%", 2, 1;
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

m48tx
Posts: 248
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx » 30 Mar 2020 00:41

Thank you, highend. I guessed this is to be coded as a script, so I copied the code into my file run.xys in the roaming Scripts folder, changed the path, then typed load "run.xys"; into the address bar, hit the enter key and the script ran as expected [with XYplorer in C:\Program Files (x86)]. I did change /path="D:\your picture path\" to /path="<curpath>" and I click on the appropriate path first.

klownboy, is it possible to fold this logic into your script (version 1.18)? If you could provide some help I will gladly make the change to my copy of the script.
Last edited by m48tx on 30 Mar 2020 05:00, edited 1 time in total.

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

Re: Freezing / lagging during thumbnail creation

Post by klownboy » 30 Mar 2020 01:17

Thanks highend. Should have thought of using a heredoc. It does seem to resolve many of the issues in running these type of scripts.

For setups with XY in Program files folder or other folders with spaces, is it necessary to have "%Temp%" in the directory field. Just curious. For me your code line works both with and without the %Temp% in the directory field, but would it not work for m48tx?
@m48tx could you try it again with that field blank to see if it still works properly. ...run $command, , 2, 1; Thanks.

Thanks again highend. In my next update for the Thumbnail Maintenance script, I'll adapt this to suit. I'm in the process of eliminating any dubious syntax errors encountered with Syntax checking on.

m48tx
Posts: 248
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx » 30 Mar 2020 02:14

klownboy, your requested modification works properly.
Last edited by m48tx on 30 Mar 2020 05:00, edited 1 time in total.

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

Re: Freezing / lagging during thumbnail creation

Post by RalphM » 30 Mar 2020 03:26

m48tx, for the sake of all forum users here, could you please refrain from quoting the whole previous post in your replies?
It doesn't add anything to the readability of the thread.
Thanks.
Ralph :-)
(OS: W10 1909 Home x64 - XY: Current beta - Office 2019 32-bit)

m48tx
Posts: 248
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx » 30 Mar 2020 05:09

RalphM, for your sake, I edited my entries. :|

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

Re: Freezing / lagging during thumbnail creation

Post by highend » 30 Mar 2020 08:50

is it necessary to have "%Temp%" in the directory field
No, it's just a "better be on the safe side".
If the folder you're currently in is deleted (3rd party utility | a subfolder of temp | etc. <-> / not available (network or anything else), the script command will fail.
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

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

Re: Freezing / lagging during thumbnail creation

Post by RalphM » 30 Mar 2020 08:58

I hope you didn't just do it for my sake but got the point I was trying to make?! :appl:
Ralph :-)
(OS: W10 1909 Home x64 - XY: Current beta - Office 2019 32-bit)

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

Re: Freezing / lagging during thumbnail creation

Post by klownboy » 30 Mar 2020 13:04

highend wrote:
30 Mar 2020 08:50
No, it's just a "better be on the safe side".
OK I see what you mean, but in my specific case, in the "command" field the full path of XY is provided via <xy>. Help for SC run directory field states, The working directory, allows you to skip the path in command; defaults to current path. So it defaults to current path if the path is not in command field. It doesn't appear that the current folder has any bearing for my case at least it shouldn't as long as the full path of the executable command is provided. No a big deal obviously just making sure I understand. Thanks highend and thank you m48tx for testing...again.

m48tx
Posts: 248
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx » 30 Mar 2020 21:32

highend & klownboy,

I created a toolbar button to run this script to create thumbnails in new instance of XY (option to create all thumbnails at once must be ticked):

Code: Select all

$command = <<<>>>
"<xy>" /path="<curpath>" /new /script="::#306;wait 200;exit 'n';"
>>>;
    run $command, , 2, 1;
I was hoping I could start multiple instances of the script simultaneously from instance 1 of XY, but that does not work. Is a script limited to one instance at a time?

** quote free post **

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

Re: Freezing / lagging during thumbnail creation

Post by highend » 30 Mar 2020 21:38

And you did read the help regarding the run command? Doesn't seem so...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

m48tx
Posts: 248
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx » 30 Mar 2020 21:49

I read the help on run before I posted. Ok, I changed 2 to 0.

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

Re: Freezing / lagging during thumbnail creation

Post by klownboy » 31 Mar 2020 00:34

Hey m48tx, through out the script and my first post in this thread it is " ...2, 0". I changed the "0" to "1" only so you could better see what was going on when troubleshooting.

Hi highend, throughout the Thumbnail script I was using cmd /c as the lead-in for running the script in the background. It really seems it wasn't necessary for this situation so I'm going to remove it. I started using it for a different situation where where I found that if I didn't I would see the the hour glass momentarily on the screen. It was discussed in the Expandable Drive Button thread viewtopic.php?f=7&t=10272&start=45#p94029, but those scripts used the "/flg=2" to feed scripts into the existing instance of XYplorer. Thanks again.

matija
Posts: 3
Joined: 26 Mar 2020 00:36

Re: Freezing / lagging during thumbnail creation

Post by matija » 31 Mar 2020 18:28

Great to see an enthusiastic response to my topics, but it looks like XY can't be the TC upgrade I was hoping for..

m48tx
Posts: 248
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx » 04 Apr 2020 17:23

klownboy, thank you for your help in this thread. Your willingness to help without harshness is most appreciated. I used your feedback and searched the forums for examples to create a script that starts at the selected image path in the tree, descends through all sub folders and creates #1 thumbnails. There are two configuration requirements and no safeguards but it does what I need. The scripting function of XY is a powerful tool. Again, thank you.

Code: Select all

$savepath = "<curpath>"; // save the starting path
  #311;                  // generate path list via branch view
                         // (configuration must be set to display folders only in branch view)
  #250;                  // select all paths in the list
  foreach($item, <get selecteditemspathnames>, <crlf>) {
    goto "$item"; #306;
}                        // for each item in the path list, go to the path then generate thumbnails #1
                         // (configuration must be set to create all thumbnails at once)
  goto "$savepath";      // once finished with path list, return to the starting path
  #1010;                 // collapse the starting path tree

Post Reply