Change "command shell" here

This is a place for users to discuss Altap Salamander. Please feel free to ask, answer questions, and express your opinion. Please do not post problems, bug reports or feature requests here.
eblis
Posts: 22
Joined: 25 Jun 2006, 21:51

Change "command shell" here

Post by eblis »

Is there any way i could change the command prompt that's started by "Num /" ? I would like to replace the normal command prompt (cmd.exe) with Console. It's just a frontend for other console programs (like cmd.exe, 4NT, monad ...) but it's better than using cmd itself (resizable :D). I know i can add it to the User menu and user F9 to start it but it's not the same :(

If this is not possible could you please let me know so i can post a feature request :D ?
User avatar
AbteriX
Posts: 94
Joined: 12 Mar 2006, 20:55
Location: Deutschland
Contact:

Post by AbteriX »

HI,
there is no keymapping adjustment right now, but planed though.

Do you know/use AHK?

Here is a workaround:
#IfWinActive,ahk_class SalamanderMainWindowVer16
NumpadDiv:: run notepad
RETURN
Replace 'notepad' with your "Console.exe "
AbteriX
eblis
Posts: 22
Joined: 25 Jun 2006, 21:51

Post by eblis »

Thanks for the reply.

If i understand correctly keymapping adjustment would allow me to change the hotkey that starts "cmd.exe" and not the actual program itself (maybe i misunderstood).
#IfWinActive,ahk_class SalamanderMainWindowVer16
NumpadDiv:: run notepad
RETURN
But this won't open the cmd window in the current folder SS is in, right ?
User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Post by th. »

Salamander is reading the environment variable "ComSpec" to get the name of the command shell program which it starts when Num/ is pressed.

So the solution is:
In the settings of Console set the Shell entry to cmd.exe.
In System properties set ComSpec to the complete path of console.exe.

Of course that means that every program that reads the ComSpec variable will now start Console instead of cmd.

BTW I like Console too.
User avatar
AbteriX
Posts: 94
Joined: 12 Mar 2006, 20:55
Location: Deutschland
Contact:

Post by AbteriX »

eblis wrote:Thanks for the reply.

If i understand correctly keymapping adjustment would allow me to change
the hotkey that starts "cmd.exe" and not the actual program itself (maybe i misunderstood).
If Altap implement the remapping the way i would expect this
you should be able to adjust the keymaps as you like:
e.g.
Crtl+D = opens the DOS-Box
NumpadDIV = opens YOUR tool

Till them you could use a third party keymap remap tool like www.AutohotKey.com:
AbteriX wrote: #IfWinActive,ahk_class SalamanderMainWindowVer16
NumpadDiv:: run notepad
RETURN
I look here if the Sala window is active... then i say..
if the '/' -key on the numpad is pressed (opens normal the DOS-Box)
then do THIS command behind '::' (f.ex. here 'RUN NOTEPAD')
But this won't open the cmd window in the current folder SS is in, right ?
No this remapping didn't open the cmd window...
but we can change this piece of 'code' to react only
if you press NumPadDIV twice quickly... one press would open
the cmd window as bevor.
AbteriX
eblis
Posts: 22
Joined: 25 Jun 2006, 21:51

Post by eblis »

th. wrote:Salamander is reading the environment variable "ComSpec" to get the name of the command shell program which it starts when Num/ is pressed.

So the solution is:
In the settings of Console set the Shell entry to cmd.exe.
In System properties set ComSpec to the complete path of console.exe.

Of course that means that every program that reads the ComSpec variable will now start Console instead of cmd.

BTW I like Console too.
Thanks, that works. The more programs that open Console the better :D
Yay, Console with PowerShell as a shell, open UNC paths and everything. Thanks again.
AbteriX wrote: If Altap implement the remapping the way i would expect this
you should be able to adjust the keymaps as you like:
e.g.
Crtl+D = opens the DOS-Box
NumpadDIV = opens YOUR tool
Yes, you're right. My mistake :)
oliiscool
Posts: 2
Joined: 24 Sep 2010, 18:05

Re: Change "command shell" here

Post by oliiscool »

Hi guys, I have a new way to launch Console2 from Salamander. I have documented my findings on my blog at http://oliiscool.blogspot.com/2010/09/c ... ether.html but the short version is:
  1. Create Automation script (I used VBScript) that launches Console2:

    Code: Select all

    Set ShellApp = CreateObject("Shell.Application")
    ShellApp.ShellExecute "E:\Program Files (x86)\Altap Salamander 2.54\Console2\Console.exe", "-d """ & Salamander.SourcePanel.Path & """", ""
  2. Bind script to some unused key combination, say Alt+-
  3. Use AutoHotKey to intercept Numpad / to Alt+- when Salamander has focus:

    Code: Select all

    #IfWinActive,ahk_class SalamanderMainWindowVer25
    NumpadDiv::SendEvent !-
    RETURN
  4. You're done!
Post Reply