Ola!
I need help with making a script, the idea of the script is to make all files/folder open in XYplorer. This is for application that support links/shortcuts and don't support custom browser. The application will always open the files/folder in windows explorer.
The idea is.
1. move the selected file(s)/folder(s) to a specific folder (example selected files youtube videos webm, move to videos folder)
2.get the path of the file(s)/folder(s)
3. combine the path of the file(s)/folder(s) and the path of xyplorer executable ( c:\xyplorer\xyplorer.exe path of files/folder)
4. create a shortcut/ link to the clipboard to be pasted
The scripts command.
1. moveto (using built in dialog)
2. copy path of the files/folders
3. copytext "path"; copytext "<br><xypath>\<xyexe>", a; (append the xypath)
4. new(, "link"); //creates shortcut to currently selected item
How to combine these into a script?
TIA!
Help with making a script
Re: Help with making a script
Sorry but can you give a real world example with the execution of all steps because there are a few things that don't make much sense to me
To which folder? Is that a fixed one?1. move the selected file(s)/folder(s) to a specific folder (example selected files youtube videos webm, move to videos folder)
Which inbuilt dialog when used from a script?1. moveto (using built in dialog)
? Show how this should look like inside the clipboard3. copytext "path"; copytext "<br><xypath>\<xyexe>", a; (append the xypath)
The selected files were moved to a different folder. So which current selected item should this be?4. new(, "link"); //creates shortcut to currently selected item
One of my scripts helped you out? Please donate via Paypal
Re: Help with making a script
Sounds like you want another application to open file/folders in Xyplorer. That can't be accomplished from XY's side.pleiades wrote:This is for application that support links/shortcuts and don't support custom browser. The application will always open the files/folder in windows explorer.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Help with making a script
Thanks for the assistance sir highend!
For files (I believe this will play in XYplorer association which is the intended outcome)
"C:\XYplorer\XYplorer.exe" "E:\Youtube-videos.webm"
For Folders ( This will open the videos folder)
"C:\XYplorer\XYplorer.exe" "F:\Videos"
if its a file, then it will open XYplorer, go to the folder path and play the file.
if its a folder, it will open XYplorer and go to the folder path.
--------------
I like to add fixed tags/labels to this script
User set fixed location
1. User sets the folder location
2. User sets the tags/label
The user process goes
1. The user selects files/folders in XYplorer
2. The user then clicks on the automated script - wait for it to finish
3. The user would then paste the clipboard lnk/shortcut to the 3rd-party-app
This is the connection between XYplorer and other apps
3.a If the user clicked on the lnk/shortcut of the 3rd-party-app, it will open XYplorer plus the files/folders
Script process
1. The script will move the selected files/folder to new folder location
2. The script will then tag/label the files/folders, only the first folder no subfolders
3. After the tags/label, the script will then copy the path of the files/folders
4. Then add the XYplorer executable path to the files/folders path
5. Create a lnk/shortcut to the paths ("C:\XYplorer\XYplorer.exe" "Files/folder path")
6. Copy it to the clipboard
TIA!
It can be fixed, I will just create multiple scripts for multiple folder locationsTo which folder? Is that a fixed one?
the dialog I'm refering is the Shift + F7 shortcut dialog, I see that you can add locations there and it stays there. but the folder location can also be fixed so removing the need for this dialog.Which inbuilt dialog when used from a script?
This will show as? Show how this should look like inside the clipboard
For files (I believe this will play in XYplorer association which is the intended outcome)
"C:\XYplorer\XYplorer.exe" "E:\Youtube-videos.webm"
For Folders ( This will open the videos folder)
"C:\XYplorer\XYplorer.exe" "F:\Videos"
The new location would be used, to be pasted on the 3rd-party application, so if you click on the 3rd-party application,The selected files were moved to a different folder. So which current selected item should this be?
if its a file, then it will open XYplorer, go to the folder path and play the file.
if its a folder, it will open XYplorer and go to the folder path.
--------------
I like to add fixed tags/labels to this script
User set fixed location
1. User sets the folder location
2. User sets the tags/label
The user process goes
1. The user selects files/folders in XYplorer
2. The user then clicks on the automated script - wait for it to finish
3. The user would then paste the clipboard lnk/shortcut to the 3rd-party-app
This is the connection between XYplorer and other apps
3.a If the user clicked on the lnk/shortcut of the 3rd-party-app, it will open XYplorer plus the files/folders
Script process
1. The script will move the selected files/folder to new folder location
2. The script will then tag/label the files/folders, only the first folder no subfolders
3. After the tags/label, the script will then copy the path of the files/folders
4. Then add the XYplorer executable path to the files/folders path
5. Create a lnk/shortcut to the paths ("C:\XYplorer\XYplorer.exe" "Files/folder path")
6. Copy it to the clipboard
TIA!
Re: Help with making a script
Thanks for the reply sir SammaySarkar,Sounds like you want another application to open file/folders in Xyplorer. That can't be accomplished from XY's side.
The idea is to use lnk/shortcuts to connect XYplorer and 3rd-party-apps that supports lnk/shortcut.
Re: Help with making a script
Why should files / folders now be labelled / tagged?
And how (which tags / labels should be given)?
To step 3:
5. Where exactly should this lnk / shortcut now be created? With which name?
And while this is easy for a single folder, how should this be done if multiple files have been selected?
Because for multiple files you'd need a script to be executed when XYplorer is invoked that is able
to select all items...
And how (which tags / labels should be given)?
To step 3:
Code: Select all
$dstFolders = <<<>>>
R:\destination1
R:\destination2
>>>;
$selectedItems = get("SelectedItemsPathNames", <crlf>);
$dstFolder = popupmenu($dstFolders, 6:=<crlf>);
if (!$dstFolder || !$selectedItems) { status "No destination folder chosen / no items selected, aborted!", "8B4513", "stop"; end 1==1; }
moveto $dstFolder, $selectedItems, , 2;
And while this is easy for a single folder, how should this be done if multiple files have been selected?
Because for multiple files you'd need a script to be executed when XYplorer is invoked that is able
to select all items...
One of my scripts helped you out? Please donate via Paypal
Re: Help with making a script
For the user to know which files/folders is already added to the 3rd party application.Why should files / folders now be labelled / tagged?
And how (which tags / labels should be given)?
Single file/folder is okay, i thought it was possible.5. Where exactly should this lnk / shortcut now be created? With which name?
And while this is easy for a single folder, how should this be done if multiple files have been selected?
Because for multiple files you'd need a script to be executed when XYplorer is invoked that is able
to select all items...