XYplorer behave NortonCommander

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Germany, EU

XYplorer behave NortonCommander

Post by Stefan » 23 Nov 2008 14:55

I like XY but i am used to NC-style of workflow... so i try to simulate some NC behaves.

Code: Select all

F1	Help		<is XY standard>
F2	Rename	 				<is XY standard>
F3	View 					<F3 is Edit \ Find Now>
F4	Edit 	 		   		<F4 is View \ Refresh Tree>
F5  Copy to other pane  	<F5 is Refresh File List> 
F6	Move to other pane	   	<F6 is Cycle Focus>
F7  Create new folder 	   	<F7 is Go to Previous Location>
F8
F9
F10

Create new file:
Shift+F4 New Textfile "base.txt" <Shift+F4 was: Refresh Current Folder #483>



Switch drive:
Alt+F1 to choose the current drive for the left pane
Alt+F2 to choose the current drive for the right pane



Switch by pressing TAB-key:
Q: Is it possible to switch from one pane to the other by pressing Tab?
A: Goto "Tools>Configuration>Dual Pane" and set the 'Tab key:' to "Tab between both panes only".





Find me: Norton commander total commander windows commander tc wc nc vc volkov commander midnight commander
.
Last edited by Stefan on 15 Oct 2009 09:24, edited 3 times in total.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Germany, EU

Re: XYplorer behave NortonCommander

Post by Stefan » 23 Nov 2008 14:57

F3--------------------------------------------------------
View

Code: Select all

Universal Viewer (ATViewer) Free
http://www.uvviewsoft.com/download.htm
 Free version:
    * Portable http://www.uvviewsoft.com/files/UniversalViewerFreePortable.zip
    
1.) MD 'Tools' in XY-folder
2.) un-pack ZIP to X:\XYplorer\Tools\
            to get X:\XYplorer\Tools\UniversalViewerFreePortable
2b) i shorten the folder name to
                  X:\XYplorer\Tools\UViewer
                  
3.) right click on 'Viewer.exe' and chose 'To Clipboard > Item Path\Name' 
    to have "X:\xyplorer\Tools\UViewer\Viewer.exe" in clipboard


4.) User > Manage Commands
	Action: Run Script
	[New]
	Caption: Open current file with UniversalViewer
	Script:	Run """X:\xyplorer\Tools\UViewer\Viewer.exe""  ""<curitem>"""
	[OK]

	
4b) to be portable replace "X:\xyplorer" with "<xypath>"
	Script:	Run """<xypath>\Tools\UViewer\Viewer.exe""  ""<curitem>"""


5.) Tools > Costumize Shortcuts		
	Category: User
	Commands: Open current file with UniversalViewer
	Shortcut: F3 (was: Edit \ Find Now)
	[Assign]
	[OK]
OR

Code: Select all

4.) User > Manage Commands
	Action: Open With (Open selected List item(s) with specified application.)
	[New]
	Caption: Open current file with UniversalViewer
	Application: 	Tools\UViewer\Viewer.exe 
	Mode:	Single

      [Assign Keyboard Shortcut]
        Choose Alt+F3
      [OK]

	[OK]
----------------------------------------------------------

F4--------------------------------------------------------
Edit

Code: Select all

Notepad2 Free
http://www.flos-freeware.ch/notepad2.html
Free version:
    * Portable http://www.flos-freeware.ch/zip/notepad2.zip
   
	1.) MD 'Tools' in XY-folder
	2.) un-pack ZIP to X:\XYplorer\Tools\
        	    to get X:\XYplorer\Tools\notepad2
                 
	3.) right click on 'Notepad2.exe' and chose 'To Clipboard > Item Path\Name'
	    to have "X:\xyplorer\Tools\Notepad2\Notepad2.exe" in clipboard


	4.) User > Manage Commands
	Action: Run Script
	[New]
	Caption: Open current file with notepad
	Script:	Run """<xypath>\Tools\Notespad2\Notepad2.exe""  ""<curitem>"""
      (or use:       Run """%SystemRoot%\Notepad.exe""  ""<curitem>""" )

	[OK]

		
5.) Tools > Costumize Shortcuts		
	Category: User
	Commands: Open current file with notepad
	Shortcut: F4 (was: View \ Refresh Tree)
	[Assign]
	[OK]
OR

Code: Select all

1.) First remove hotkey 'Alt+F4' form 'Exit'-command:
    Tools > Costumize Shortcuts		
	Category: File
	Commands: Exit
	Shortcut: Alt+F4 
	[REMOVE]
	[OK]

2.) User > Manage Commands
	Action: Open With (Open selected List item(s) with specified application.)
	[New]
	Caption: Open current file with NotePad2
	Application: 	Tools\NotePad2\NotePad2.exe
	Mode:	Single

      [Assign Keyboard Shortcut]
        Choose Alt+F4 
      [OK]

	[OK]
----------------------------------------------------------

Hint:
"Tools\" is an sub-folder in my XYplorer Install-folder and used here as relative path.
Last edited by Stefan on 26 Nov 2009 14:57, edited 5 times in total.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Germany, EU

Re: XYplorer behave NortonCommander

Post by Stefan » 23 Nov 2008 14:58

Comes when DP is implemented ===> ===> Dual Pane - Formal Proposal Thread

Edit:
v8.00.0000 - 2009-06-15 12:00
= NEW OFFICIAL RELEASE. Main changes since last release:
+++ Dual Pane. Look at the contents of two folders side by side. Both
panes are multi-tabbed and can be arranged vertically or horizontally.


F5--------------------------------------------------------
Panes \ Copy to Other Pane ( Default hotkey is Ctrl+F6)

Code: Select all

   Tools > Customize Shortcuts      
   Category: Panes
   Commands: Copy to Other Pane
   Shortcut: (as second shortcut) F5 (was: View \ Refresh File List) or assign Alt+F5
   [Assign]
   [OK]
EDIT:
i miss an dialog to show me what will be copied, so use this script now:
(save this script, add it to an UDC, assign shortcut Alt+F5)

DialogCopy.xys

Code: Select all

//get list of selected files:
$filelist = getinfo("SelectedItemsNames");

  //get the amount of selected files:
  $count = getinfo("CountSelected");
 
  // decide between "1 item"  or "2 items":
  If ($count<2){$Item="item";}else{$Item="items";}
 
  //shorten the output if to many files are selected:
  if ($count > 25){
     $filelistshort="";
     $loop = 1;
     While ($loop < 26){
     $filelistshort = $filelistshort . gettoken($filelist, $loop, <crlf>) . <crlf>;
     incr $loop;
     }
     $filelist = $filelistshort . "...";
     }
 
  //prompt what will be done and ask:
  $ask = confirm(
    Copy.' '.$count $Item.'                                                                                 '.
    <crlf>from .' '. getinfo("Path").
    <crlf>to .'     '. getinfo("Path", i).
    <crlf><crlf>$filelist) ? "answerOK" : "answerCancel";
  
  //check what user answered:
  If ($ask=="answerOK")
   {
     //msg the answer was ok;
     #804; //execute command "Copy to other panel"
     //status bar and ping:
     status "Copy is done!",,ready;
     beep 800,100; beep 400,100; beep 600,100;
   }else{
     //msg the answer was no;
     status "Copy cancelled!",,ready;
     beep 800,100; 
   }
Working example:
DialogCOPY001.png
Example output of my DialogCOPY.xys script
DialogCOPY001.png (13.91 KiB) Viewed 2323 times
F6--------------------------------------------------------
Panes \ Move to Other Pane ( Default hotkey is Shift+F6)

Code: Select all

   Tools > Customize Shortcuts      
   Category: Panes
   Commands: Move to Other Pane
   Shortcut: (as second shortcut) F6 (was: Misc \ Focus \ Cycle Focus) or assign Alt+F6
   [Assign]
   [OK]


----------------------------------------------------------

If you want you can [Remove] the unneeded hotkey Ctrl+F6 and Shift+F6

Please note that this DP-copy/move is "silent", it just do it, but you will see no dialog.
And the normal copy Dialog (Shift+F7 / Ctrl+F7) will not have the "other" panel as default target path (http://www.xyplorer.com/xyfc/viewtopic. ... 133#p37133)

.
Last edited by Stefan on 05 Jun 2010 19:51, edited 4 times in total.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Germany, EU

Re: XYplorer behave NortonCommander

Post by Stefan » 23 Nov 2008 15:00

F7--------------------------------------------------------
New folder

(Default XY shortcut, to create an New folder, is now Ctrl+N)

Code: Select all

	Short form:
	1.) Tools > Costumize Shortcuts		
	Category: Edit
	Commands: New Folder
	Shortcut: (as second shortcut) F7 (was: Go to Previous Location)
                     Or use Alt+F7
	[Assign]
	[OK]	
	
	
	Long form:
	comes
	
----------------------------------------------------------


F8--------------------------------------------------------
Delete (to Recycle Bin)

I didn't like F8 for DEL because i hit F8 often by accident instead of F7, but to be complete...

Code: Select all

1.) Tools > Costumize Shortcuts		
	Category: File
	Commands: Delete Del	#169
	Shortcut: (as second shortcut) F8 (was: Show Navigation Panel	#663)
	[Assign]
	[OK]			
----------------------------------------------------------


F9 at NC was open 'User menu'
- is in XY "F9 Configuration... #600"
--- perhaps i will show here how to script an pop-up menu with user tools ?

F10 at NC was 'Close the app'
- is in XY not used right now
--- i think i show here nothing
.
Last edited by Stefan on 16 Aug 2012 10:11, edited 4 times in total.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Germany, EU

Re: XYplorer behave NortonCommander

Post by Stefan » 23 Nov 2008 15:01

Shift+F4 -------------------------------------------------
New File

(Default XY shortcut, to create an New File, is now Ctrl+Shift+N)


Short form:

Code: Select all

	1.) Tools > Customize Shortcuts		
	Category: Edit
	Commands: New Textfile "New Textfile.txt"
	Shortcut: (as second shortcut to 'Ctrl+Shift+N') Shift+F4 (was: Refresh Current Folder	#483)
                       Or use Shift+Alt+F4
	[Assign]
	[OK]		



Long form:

Code: Select all

1.) User > Manage Commands
	Action: Run Script
	[New]
	Caption: New Textfile "base.txt"
	Script:	$base = (<curbase>)? <curbase>: "New"; new $base.".txt", file, ,r;
	[OK]


	2.) Tools > Customize Shortcuts		
	Category: User
	Commands: New Textfile "base.txt"
	Shortcut: Shift+F4 (was: Refresh Current Folder	#483)
                       Or use Shift+Alt+F4
	[Assign]
	[OK]			
See "Help > Scripting Commands Reference" for more ideas like
Script: $base = (<curbase>)? <curbase>: "New <date yyyy-mm-dd>"; new $base.".txt", file, ,r;
or
Script: $item = (<curitem>)? <curitem>: "New"; new $item."<date yyyy-mm-dd>.bak", file, ,r;
----------------------------------------------------------


Longer form:

Code: Select all

1.) User > Manage Commands
   Action: Run Script
   [New]
   Caption: New Textfile "base.txt"

   Script:   Click on [Edit...] and paste the code from below
   [OK]

   Click on [Assign Keyboard Shortcut...]
   Press Shift+Alt+F4
   [OK]
   [OK]

*************The script starts at next line:**************
/* Purpose: Create an new *.txt-file.
   If cursor is over an file or folder, use this current name
   (base only, without extension) as name for the new file.
   F.ex.: this script on 'XYplorer.exe' creates new file 'XYplorer.txt'
   ELSE create an file with name "New file from 2009-10-15"
*/
// (1) Check if there is an file or folder selected
$base = (<curbase>)? <curbase>: "New file from <date yyyy-mm-dd>";
// (2) Add an '.txt' extension and prompt user to confirm the name:
    $base = Input('Create new file',New file name based on: $base, $base.".txt");
// (3) Create the new file in current dir,
// if the file name already exists XY does automatically add a number suffix
// (using format as defined on Configuration - Templates).
    new $base, file;
// (4) Open the new created file with notepad:
    //Run Notepad <curitem>;
    Run "<xypath>\Tools\NotePad2\NotePad2.exe" <curitem>;
*************The script ends on line above**************
Last edited by Stefan on 16 Aug 2012 10:12, edited 5 times in total.

admin
Site Admin
Posts: 46876
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: XYplorer behave NortonCommander

Post by admin » 23 Nov 2008 15:06

Nice, you are developing sort of a "snippet" syntax here... ("snippets" are a planned feature to give users one-click solutions for complex configuration procedures).

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Germany, EU

Re: XYplorer behave NortonCommander

Post by Stefan » 08 Oct 2009 13:11

Alt+F1--------------------------------------------------------
Alt+F2--------------------------------------------------------

Alt+F1 to choose the current drive for the left pane
Alt+F2 to choose the current drive for the right pane

Code: Select all

1.) User > Manage Commands
   Action: Run Script
   [New]
   Caption: My Computer (left panel)
   Script:   Focus "P1"; button "myco";

      [Assign Keyboard Shortcut]
        Choose Alt+F1
      [OK]

   [OK]
Explanation:
Focus "P1"; sets the focus to the left (or resp. upper) panel "Pane 1".
button "myco"; show the 'My Computer'-button

Code: Select all

2.) User > Manage Commands
   Action: Run Script
   [New]
   Caption: My Computer (right panel)
   Script:   Focus "P2"; button "myco";

      [Assign Keyboard Shortcut]
        Choose Alt+F2
      [OK]

   [OK]
Explanation:
Focus "P2"; sets the focus to the right (or resp. lower) panel "Pane 2".
button "myco"; show the 'My Computer'-button


Note: needs XYplorer v8.40.0106 or newer.
v8.40.0106 - 2009-09-19 10:16
+ Scripting got a new command.
Name: button
Action: Emulates a click on a toolbar button.
Examples:
::button "mru"; //pops MRU menu at key

Post Reply