Page 1 of 1

Scripting Network Shares

Posted: 15 Nov 2010 15:04
by EnjoyRC
If I use a script in a catagory entry to set the 2 panes. All looks great. But if I exit XY and reopen it, I get an error in Pane #2. (see below)
If I manually navigate the left and right panes, I can close and open XY all I want without errors.

Code: Select all

    $p = get("#800", "DP", "SP");
    if $p == "SP" {
        #800;  //Toggle Dual Panes
    }
    focus p2;
    goto "\\servername\folder\videofiles";
    sortby Mod, d;
    focus p1;
    goto "%userprofile%\Videos";
    sortby Name, a;
Error:
Location currently not available
\\servername\folder\videofiles\

Also, if I choose the "Go Up" option from that scripted tab, it jumps to \\servername, instead of \\servername\folder.

Re: Scripting Network Shares

Posted: 15 Nov 2010 20:08
by admin
You say "If I use a script in a catagory entry to set the 2 panes. ..." Are you sure that this is a necessary prerequisite to produce the bug? What if you set the panes locations manually?

Re: Scripting Network Shares

Posted: 15 Nov 2010 22:46
by EnjoyRC
admin wrote:You say "If I use a script in a catagory entry to set the 2 panes. ..." Are you sure that this is a necessary prerequisite to produce the bug? What if you set the panes locations manually?
As mentioned in the last line
If I manually navigate the left and right panes, I can close and open XY all I want without errors

Re: Scripting Network Shares

Posted: 16 Nov 2010 08:26
by admin
EnjoyRC wrote:As mentioned in the last line
If I manually navigate the left and right panes, I can close and open XY all I want without errors
Oh, yes. :roll: I'll check that.

Re: Scripting Network Shares

Posted: 16 Nov 2010 08:34
by admin
Cannot reproduce.

Since you note the difference at startup, there must be a crucial difference in the configuration files depending on the method (script or manual navigation) after you close the app. Probably in XYplorer.ini or in either of <xydata>\panes\pane.ini. Can you spot that difference?

Re: Scripting Network Shares

Posted: 16 Nov 2010 14:03
by EnjoyRC
Can you believe it? Today it's working. :shock: I'll keep an eye on it and if it does it again, I'll check the INI file.

Edit: Sort of working. There is still the issue of "Go Up". When browsing a network share, no matter how deep you are, if you use the "Go Up" action it sends you all the way back to the root instead of simply the parent folder.

Example....
\\server\share\data\folder\deep folder\
[Go Up]
\\server

I anticipated it to go to \\server\share\data\folder\

Re: Scripting Network Shares

Posted: 16 Nov 2010 16:23
by EnjoyRC
Error is back.. gonna try and share differences in the pane.ini files. Just posting the sections that differ. Otherwise they all match.

Bad INI file:

Code: Select all

[ListNetwork]
Sort=-65536
Num=0
Style=1079
View=0
Date=0
Time=0
Age=0
Day=0
Visible=11
Columns=.200,.200

[Tabs]
Version=3
LastTab=0
MRU=A
Count=1
I1=1
C1=
D1=\\servername\folder\videofiles
A1=	0	Name.175,Ext.32,Size.52,Type.80,Modified.115,Created.115,Accessed.115,Attr.47,Len.28,Tag.50,Comment.75,	-32763	\\servername\folder\videofiles\FullDisc			0	0			Computer	11111100000	1079
H1=
M1=

[History]
Count=2
Cur=2
1=Computer
1t=1
2=\\servername\folder\videofiles
2t=1
Good INI file:

Code: Select all

[ListNetwork]
Sort=-65536
Num=0
Style=1079
View=0
Date=0
Time=0
Age=0
Day=0
Visible=11
Columns=Name.200,Comments.200,

[Tabs]
Version=3
LastTab=0
MRU=A
Count=1
I1=1
C1=
D1=\\servername\folder\videofiles
A1=	0	Name.175,Ext.32,Size.52,Type.80,Modified.115,Created.115,Accessed.115,Attr.47,Len.28,Tag.50,Comment.75,	-32763	+\\servername\folder\videofiles\advertisement.iso			0	0			C:\Users\mark\Videos\	11111100000	1079
H1=
M1=

[History]
Count=6
Cur=6
1=Computer
1t=1
2=\\servername\folder\videofiles
2t=1
3=\\servername\folder\videofiles
3t=1
4=\\servername\
4t=1
5=\\servername\folder
5t=1
6=\\servername\folder\videofiles
6t=1
Good INI is from manually browsing to the directory. Bad INI is set from a script. The [Tab] area seems different. The bad INI contains "\\servername\folder\videofiles\FullDisc". The FullDisc folder is on Pane 1. How is Pane 2's INI file picking up a folder from Pane 1? For my test, Pane 1 was pointing to C:\Users\mark\Videos\ and had a FullDisc subdirectory in it's listing.

I think i'm getting close to it here. Hope this helps.

Re: Scripting Network Shares

Posted: 16 Nov 2010 16:47
by admin
See the little "+" here: +\\servername\folder\videofiles

Try to add it to the BAD ini manually and see if it makes it a GOOD ini.

Re: Scripting Network Shares

Posted: 16 Nov 2010 18:21
by EnjoyRC
The + didn't do it... but it's that same path that is invalid

Code: Select all

\\servername\folder\videofiles\FullDisc
FullDisc isn't a subdirectory of videofiles. FullDisc is a subfolder in Pane #1. Is it somehow pulling that from Pane 1?

Re: Scripting Network Shares

Posted: 16 Nov 2010 18:37
by EnjoyRC
Just did another test.. looks like for it to work, it needs to have the + before the UNC and the path includes some file selected in the pane.

+\\server\share\data\filename.txt

Re: Scripting Network Shares

Posted: 16 Nov 2010 18:39
by EnjoyRC
I Got It !!!!!! If I use the script in the first post of this thread... and.... then I click a file in the left pane, and click a file in the right pane. Then exit. ALL WORKS. It's the fact that a script has the ability to GoTo a path without selecting a file in that pane. So if you exit XY, it corrupts the path info for that pane. (Disregard this.... even after clicking a file in each pane, it could come back with an error)

If you manually browse, an file entry is always selected for you. That's why manual browsing works all the time. Then once a file entry is selected there's NO way to unbox one of the entries in that list.

Addon: I also tried using a script that set Pane 1 to a C: path, and Pane 2 to a D: path. Both local drives. Exited. Reopened. That worked fine. Seems to be associated to Network paths.

New Test: I used the script from the first post here. It populated the 2 panes. I then swapped the panes and exited. Reopened... and guess what... all works. So swapping the panes updates something.

Hope all this helps.

Re: Scripting Network Shares

Posted: 16 Nov 2010 18:46
by EnjoyRC
Adding 'sel' statements to the code didn't help.

Code: Select all

    $p = get("#800", "DP", "SP");
    if $p == "SP" {
        #800;  //Toggle Dual Panes
    }
    focus p2;
    goto "\\server\support\videos";
    sortby Mod, d;
    sel 1;   //select first item
    focus p1;
    goto "%userprofile%\Videos";
    sortby Name, a;
    sel 1;   //select first item

Re: Scripting Network Shares

Posted: 16 Nov 2010 20:11
by admin
I'll check that tomorrow, thanks.

Re: Scripting Network Shares

Posted: 17 Nov 2010 08:35
by admin
EnjoyRC wrote:I Got It !!!!!! If I use the script in the first post of this thread... and.... then I click a file in the left pane, and click a file in the right pane. Then exit. ALL WORKS. It's the fact that a script has the ability to GoTo a path without selecting a file in that pane. So if you exit XY, it corrupts the path info for that pane. (Disregard this.... even after clicking a file in each pane, it could come back with an error)
Do I get you right that the "Disregard this..." part invalidates the "I Got It !!!!!!" part?

Whatever, I cannot reproduce it. Mysterious! :? I still doubt that the script is a necessary conditions for this.

Re: Scripting Network Shares

Posted: 17 Nov 2010 13:05
by EnjoyRC
admin wrote:Do I get you right that the "Disregard this..." part invalidates the "I Got It !!!!!!" part?
Yes, you got it right... it started acting up again, even when clicking an entry. The problem mostly seems to be due to using UNCs.