For example, create a file goto.xys and paste this:
Code: Select all
Desktop
C:\WINDOWS\system.ini
C:\WINDOWS\system32Hey, in v9.60.0014 also this will work:
Code: Select all
Desktop
%tmp%
<xydata>
C:\WINDOWS\system.ini
C:\WINDOWS\system32Code: Select all
Desktop
C:\WINDOWS\system.ini
C:\WINDOWS\system32Code: Select all
Desktop
%tmp%
<xydata>
C:\WINDOWS\system.ini
C:\WINDOWS\system32SkyFrontier wrote:Is there a way to easily import (options:) pane 1, pane 2 or both panes' tabs to such "favs.xys", people...?
Code: Select all
//collect paths from all tabs in current pane:
$TabCount = tab(,"c"); //how many tabs are open?
//$Pane = getinfo("Pane"); //which pane is active?
$Loop = 1;
$Tabs = "";
while ($Loop<=$TabCount) //for each tab do
{
$Tabs = $Tabs . tab("get", "path", $Loop) . "<crlf>";
incr $Loop;
}
writefile("C:\Temp\fav.xys", $Tabs);
//add CTB:
//http://www.xyplorer.com/xyfc/viewtopic.php?p=51737#p51737
$CTB = <<<Heredoc
Snip: CTB 1
XYplorer
Action
NewUserButton
Name
My Temp Favorites
Icon
:favs
ScriptL
Load "C:\Temp\fav";
ScriptR
FireClick
1
Heredoc;
snippet $CTB;
Code: Select all
"Menu FAVORITES|:favs"
load "<xyscripts>\favs.xys";
"Set Favorites from Tabs/Active Pane|:conf"
//collect paths from all tabs in current pane:
$TabCount = tab(,"c"); //how many tabs are open?
//$Pane = getinfo("Pane"); //which pane is active?
$Loop = 1;
$Tabs = "";
while ($Loop<=$TabCount) //for each tab do
{
$Tabs = $Tabs . tab("get", "path", $Loop) . "\<crlf>";
incr $Loop;
}
writefile("<xyscripts>\favs.xys", $Tabs);
sel;
status "Tabs stored as (Favorites) favs.xys!";
"Edit/Check Favorites File|:udc"
open "<xyscripts>\favs.xys";
Code: Select all
"PERMAfavorites|:favfiles"
load "<xyscripts>\favsp.xys";
"Menu FAVORITES|:favs"
load "<xyscripts>\favs.xys";
"Set Favorites from Tabs/Active Pane|:conf"
//collect paths from all tabs in current pane:
$TabCount = tab(,"c"); //how many tabs are open?
//$Pane = getinfo("Pane"); //which pane is active?
$Loop = 1;
$Tabs = "";
while ($Loop<=$TabCount) //for each tab do
{
$Tabs = $Tabs . tab("get", "path", $Loop) . "\<crlf>";
incr $Loop;
}
writefile("<xyscripts>\favs.xys", $Tabs);
sel;
status "Tabs stored as (Favorites) favs.xys!";
"Edit/Check Favorites File|:udc"
open "<xyscripts>\favs.xys";
"Set PERMAFavorites from Tabs/Active Pane|:conf"
//collect paths from all tabs in current pane:
$TabCount = tab(,"c"); //how many tabs are open?
//$Pane = getinfo("Pane"); //which pane is active?
$Loop = 1;
$Tabs = "";
while ($Loop<=$TabCount) //for each tab do
{
$Tabs = $Tabs . tab("get", "path", $Loop) . "\<crlf>";
incr $Loop;
}
writefile("<xyscripts>\favsp.xys", $Tabs);
sel;
status "Tabs stored as (Favorites) favs.xys!";
"Edit/Check PERMAFavorites File|:udc"
open "<xyscripts>\favsp.xys";
Currently not. This might be important information for the user running the script so I think it should stay as it is.SkyFrontier wrote:Added the following code to get the thing running under CTRL+F (free as default);
-it has the tab("get", "path", $Loop) . "\<crlf>"; parameter so each path will end with a "\", which will pop a message asking to create a currently non-available location (ideal solution for us, portable soldiers!) - only possible thanks to the freak paths handling and the create folders for non-existent locations trick.
--but when you cancel creating such folder XY pops an "scripting error" message... Can this be avoided?
Agree on this but still see as a valid request since disabling such dialogs individually and temporally (like the "AllowRecursion" trick) makes sense for known scripts - the ones we tested over time and see that the only (minor) issue is this.SkyFrontier wrote:Currently not. This ("scripting error" message) might be important information
In that case the script writer can work around it by checking the existence with Exists and then prompting (Confirm) the user to create (New) or ignore.SkyFrontier wrote:Agree on this but still see as a valid request since disabling such dialogs individually and temporally (like the "AllowRecursion" trick) makes sense for known scripts - the ones we tested over time and see that the only (minor) issue is this.
The skilled script writers, you mean?TheQwerty wrote:In that case the script writer can work around it by checking the existence with Exists and then prompting (Confirm) the user to create (New) or ignore.SkyFrontier wrote:Agree on this but still see as a valid request since disabling such dialogs individually and temporally (like the "AllowRecursion" trick) makes sense for known scripts - the ones we tested over time and see that the only (minor) issue is this.
I actually have to take that back anyhow... I wasn't paying attention but with the implied goto, and the format of the above script there really isn't a way for you to add such a check easily.SkyFrontier wrote:The skilled script writers, you mean?![]()
Thanks for the tip, TheQwerty - hope I manage to achieve that effect (there's a good bunch of my own scripts I'd need to revise against this, but - not for now while I don't know how...).
Code: Select all
v9.60.0014 - 2010-10-19 13:02
+ Scripting: The multi-script goto-shorthand now also supports
environment and native variables, name searches, and visual
filters. For example:
Desktop
%tmp%
<xydata>
C:\WINDOWS\system.ini
C:\WINDOWS\system32
C:\WINDOWS\system32?a*
C:\WINDOWS\system32?:a* or b*
C:\WINDOWS\system32?:a* | b*
C:\WINDOWS\system32?tag:blue
C:\WINDOWS\system32|a*
----C:\Documents and Settings\Admin\Dados de aplicativos\Local Stuff\Administrative\System Wide\Microsoft\SystemCertificates\My\Certificates\|*VISUAL FILTER* (whatever value)|:props (Icon)|Admin SysCerts (caption to be displayed instead of this longish path)
Would you mind in building a sample code on this actually working?However, it might be easier to get one of the existing tab manager scripts working with a simple flat favorites file.
My suggestion avoids seeing XY's "create?" dialog entirely.SkyFrontier wrote:Would you mind in building a sample code on this actually working?However, it might be easier to get one of the existing tab manager scripts working with a simple flat favorites file.
I just can't see how this could be done the way you describe (sorry...).
Remember: the aim is to avoid the (now called) XYplorer Scripting message when clicking "Cancel" at the "not available: create?" dialog, invoked by trying to go to a currently non-existent location from the new file-based favs.
This is a shorthand version for those who are happy with the vanilla choices. If you want more use the longhand:SkyFrontier wrote:The thing is powerful - I used the "goto "*?tag:*"" pattern in it and IT WORKED!!!Code: Select all
v9.60.0014 - 2010-10-19 13:02 + Scripting: The multi-script goto-shorthand now also supports environment and native variables, name searches, and visual filters. For example: Desktop %tmp% <xydata> C:\WINDOWS\system.ini C:\WINDOWS\system32 C:\WINDOWS\system32?a* C:\WINDOWS\system32?:a* or b* C:\WINDOWS\system32?:a* | b* C:\WINDOWS\system32?tag:blue C:\WINDOWS\system32|a*![]()
Don, do you plan to offer custom icons and label/caption support for this one, too?
Code: Select all
"Caption|Icon" goto "C:\Windows";