Problem with opening precedence

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
David233
Posts: 26
Joined: 07 Dec 2019 23:09

Problem with opening precedence

Post by David233 »

Hello,

I'm having problem with precedence of a simple opening script.

Code: Select all

if not DEFINED IS_MINIMIZed set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit

START "1" "C:\Program Files (x86)\XYplorer\XYplorer.exe" /script="::#353; goto 'C:\'; tab('new', 'C:\Users\David\Pictures 1');"
timeout /t 15
START "2" "C:\Program Files (x86)\XYplorer\XYplorer.exe" /script="::#353; goto 'F:\'; tab('new', 'F:\Pictures 2');"

exit
Despite the timeout set to 15, it still very often mixes up the 2 directories. Where Pictures 2, comes before Pictures 1. The script itself is saved inside a .bat file

Kind regards
...

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

Re: Problem with opening precedence

Post by highend »

? What exactly should these two commands do, what should the end result look like?
One of my scripts helped you out? Please donate via Paypal

David233
Posts: 26
Joined: 07 Dec 2019 23:09

Re: Problem with opening precedence

Post by David233 »

highend wrote: 24 Jun 2020 20:25 ? What exactly should these two commands do, what should the end result look like?
They're supposed to open two instances of XYplorer with the set directories, in a chronological/precedent manner. Where at the moment, they get mixed up instead.

Code: Select all

START "2"
for some reason, often times comes before

Code: Select all

START "1"
, despite the timeout between them

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

Re: Problem with opening precedence

Post by highend »

You mean that the second instance (with drive F:) is opened before the first instance (with drive C:) appears?

If that's the case, open one instance, make sure
Configuration | General | Startup & Exit | [ ] No network browsing on startup
is unchecked, save settings.

Try your script again.

If this doesn't help, open one instance again and post the result of this command (execute it from the address bar):
text get("loadtimes");
One of my scripts helped you out? Please donate via Paypal

David233
Posts: 26
Joined: 07 Dec 2019 23:09

Re: Problem with opening precedence

Post by David233 »

highend wrote: 24 Jun 2020 20:41 You mean that the second instance (with drive F:) is opened before the first instance (with drive C:) appears?

If that's the case, open one instance, make sure
Configuration | General | Startup & Exit | [ ] No network browsing on startup
is unchecked, save settings.

Try your script again.

If this doesn't help, open one instance again and post the result of this command (execute it from the address bar):
text get("loadtimes");
Was unchecked, but got this from the command:
(closed the C:\ instance first, then F:\, before running it)

Code: Select all

XY ver: 	XYplorer 19.90.0100
OS:     	Windows 10 Windows 8, 64-bit, Release 1903, Build 18362.778
Loaded: 	2020-06-24 20:51:30 in 4,696 ms

     0 ms:     390 ms - Start Load
   390 ms:      22 ms - Init Language
   412 ms:      64 ms - Load Language
   476 ms:     108 ms - Load Settings
   584 ms:       9 ms - Init Custom File Icons
   593 ms:      47 ms - Init Controls
   640 ms:     124 ms - Init Graphics
   764 ms:      32 ms - Init Tabs
   796 ms:      85 ms - Create Info Panel
   881 ms:     153 ms - Set Interface Font
 1,034 ms:      45 ms - Init Panes
 1,079 ms:       0 ms - Init Tree
 1,079 ms:       0 ms - Add Spec Folders
 1,079 ms:       0 ms - Add Links Folder
 1,079 ms:       1 ms - Add Desktop Folder
 1,080 ms:       0 ms - Add Documents Folder
 1,080 ms:       0 ms - Add Downloads Folder
 1,080 ms:       0 ms - Add User Folder
 1,080 ms:       5 ms - Drives To Array
 1,085 ms:       5 ms - Add Drives
 1,090 ms:       5 ms - Add Portable Devices
 1,095 ms:       0 ms - Init Start Path
 1,095 ms:       6 ms - Tab Icons
 1,101 ms:       0 ms - Load Catalog
 1,101 ms:       1 ms - Load Tags
 1,102 ms:   2,454 ms - Load Maxi Tree
 3,556 ms:      22 ms - Go Start Path Expanded: F:\Pictures 2\
 3,578 ms:       0 ms - Init Custom Toolbar Buttons
 3,578 ms:       8 ms - Init UDC and KS
 3,586 ms:       7 ms - Layout Window
 3,593 ms:      97 ms - Show Window
 3,690 ms:     934 ms - Load This Pane
 4,624 ms:      70 ms - Load Other Pane
 4,694 ms:       2 ms - Init Menus
 4,696 ms:            - Load Done

MaxiTree: Rows=351, Nodes=356, Expanded=16
Remember Tree State: Yes (6 stored paths)
Check Existence of Subfolders in Tree: Yes
Pane 1: Items=20/1379, Pane 2: Items=4/36, Catalog: Items=8

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

Re: Problem with opening precedence

Post by highend »

Mh, sorry, 5 seconds is not long enough so that the second instance would appear before the first with a 15 seconds timeout in between...
Can't reproduce that behavior here at all.

When you extend your bat /script calls with a ; text get('loadtimes'); at the end, does the first instance (when it appears after the second)
give any hints in the loadtimes list, why it took so long to startup?
One of my scripts helped you out? Please donate via Paypal

David233
Posts: 26
Joined: 07 Dec 2019 23:09

Re: Problem with opening precedence

Post by David233 »

highend wrote: 24 Jun 2020 21:06 Mh, sorry, 5 seconds is not long enough so that the second instance would appear before the first with a 15 seconds timeout in between...
Can't reproduce that behavior here at all.

When you extend your bat /script calls with a ; text get('loadtimes'); at the end, does the first instance (when it appears after the second)
give any hints in the loadtimes list, why it took so long to startup?
I tried testing it with just:

Code: Select all

START "1" "C:\Program Files (x86)\XYplorer\XYplorer.exe" /script="::#353; text get('loadtimes'); goto 'C:\'; tab('new', 'C:\Users\David\Pictures 1');"
And got this blank XYplorer window, after the instance with the directory, appeared for a few seconds:
Image

David233
Posts: 26
Joined: 07 Dec 2019 23:09

Re: Problem with opening precedence

Post by David233 »

David233 wrote: 24 Jun 2020 21:44
highend wrote: 24 Jun 2020 21:06 Mh, sorry, 5 seconds is not long enough so that the second instance would appear before the first with a 15 seconds timeout in between...
Can't reproduce that behavior here at all.

When you extend your bat /script calls with a ; text get('loadtimes'); at the end, does the first instance (when it appears after the second)
give any hints in the loadtimes list, why it took so long to startup?
I tried testing it with just:

Code: Select all

START "1" "C:\Program Files (x86)\XYplorer\XYplorer.exe" /script="::#353; text get('loadtimes'); goto 'C:\'; tab('new', 'C:\Users\David\Pictures 1');"
And got this blank XYplorer window, after the instance with the directory, appeared for a few seconds:
Image
Got a normal window back now, after running the new script for the second time, but I can't click on the 'Copy', as though the window isn't 'really there'

Image

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

Re: Problem with opening precedence

Post by highend »

Loaded in 2,331 ms...

Is it loaded from a HDD that is dying? Sorry, no other ideas here...
One of my scripts helped you out? Please donate via Paypal

David233
Posts: 26
Joined: 07 Dec 2019 23:09

Re: Problem with opening precedence

Post by David233 »

highend wrote: 24 Jun 2020 21:49 Loaded in 2,331 ms...

Is it loaded from a HDD that is dying? Sorry, no other ideas here...
Doesn't seem to look that way here 🤔

Image

But yeah, it does take a bit of time to load things sometimes, not super long, but at times maybe like 2-5 seconds.

Perhaps I should increase the timeout even more, although I kind of already did. But yeah, you'd think C:\ would just load first, and then F:\, whenever it is ready...

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

Re: Problem with opening precedence

Post by RalphM »

Not exactly what you wanted but maybe worth considering.
Why not make use of dual panes in XY and load the two paths in a pane each?
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

David233
Posts: 26
Joined: 07 Dec 2019 23:09

Re: Problem with opening precedence

Post by David233 »

RalphM wrote: 25 Jun 2020 02:02 Not exactly what you wanted but maybe worth considering.
Why not make use of dual panes in XY and load the two paths in a pane each?
Good point/alternative, but I'm too used to running them separately, so I think I'll live with the 'inconvenience', for the time being

Post Reply