PreDefined Shortcuts - My Desktop

We welcome any suggestions for new features or improvements in Altap Salamander. Please post one suggestion per report.
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

PreDefined Shortcuts - My Desktop

Post by vld »

I've tried to add My Desktop as a predefined shortcut such as Network Neighborhood or My Documents or even a Hot Path. Problem I have is if I use Salamander as a portable on my thunmbdrive, My Documents always has that path working, but My Desktop path changes from system to system.

Is there a way to make a shortcut work on what ever system you use Salamander?
Textor
Posts: 39
Joined: 27 Jan 2006, 09:15

Re: PreDefined Shortcuts - My Desktop

Post by Textor »

vld wrote:I've tried to add My Desktop as a predefined shortcut such as Network Neighborhood or My Documents or even a Hot Path. Problem I have is if I use Salamander as a portable on my thunmbdrive, My Documents always has that path working, but My Desktop path changes from system to system.
Is there a way to make a shortcut work on what ever system you use Salamander?
I think so - every windows installation has a predefined system variable called %USERPROFILE%.

Which contains the location of the currently logged-in users' folder, e.g.
C:\Documents and Settings\ExampleUserJohnDoe\

The Desktop of this user will be at "%USERPROFILE%\Desktop".

The problem remaining is getting Salamander to go to that path - if I enter $[USERPROFILE]\Desktop in a user-menu-entry, it is not Salamander that opens this folder, but Windows Explorer instead. And it seems that HotPaths do not accept variables as entries.
User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Re: PreDefined Shortcuts - My Desktop

Post by th. »

You could use a vbs script like here: http://forum.altap.cz/viewtopic.php?f=3&t=1981 in a user menu entry.
Textor
Posts: 39
Joined: 27 Jan 2006, 09:15

Re: PreDefined Shortcuts - My Desktop

Post by Textor »

Or use an AutoHotkey script as descibed in http://forum.altap.cz/viewtopic.php?f=4&t=3438

Code: Select all

#IfWinActive, ahk_class SalamanderMainWindowVer25

+d::
send +{F7}
sendinput %A_Desktop% {enter}
return
Using only Salamander itself for that purpose, without relying on an external program, would of course be a more elegant solution.
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: PreDefined Shortcuts - My Desktop

Post by vld »

So I get the feeling that an external intervention needs to happen to get a PreDefined desktop shortcut to work......sounds like there is not way to get variables to work. :(
User avatar
Ether
Posts: 1471
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: PreDefined Shortcuts - My Desktop

Post by Ether »

You can add your +1 to the Hot Paths and Environmental Variables feature request. I think that's the place where your voice will be heard the most.
Ελληνικά rulez.
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: PreDefined Shortcuts - My Desktop

Post by vld »

Thanks for pointing it out. Will have to figure out something else.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5231
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: PreDefined Shortcuts - My Desktop

Post by Jan Rysavy »

$(WinDir), $(SysDir), $(SalDir), $[EnvironmentVariable] variables will be supported in Hot Paths from AS 2.52.
Thank you for your ideas!
Textor
Posts: 39
Joined: 27 Jan 2006, 09:15

Re: PreDefined Shortcuts - My Desktop

Post by Textor »

Congratulations, it works:
$[USERPROFILE]\Desktop
can now be used as an entry for Hot Paths, and opens the current user's Desktop-Folder.

Thank You!
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: PreDefined Shortcuts - My Desktop

Post by vld »

Jan Rysavy wrote:$(WinDir), $(SysDir), $(SalDir), $[EnvironmentVariable] variables will be supported in Hot Paths from AS 2.52.
Thank you for your ideas!
On a similar function....I've been playing around with a portable version of salamander using the BAT file posted here: http://forum.altap.cz/viewtopic.php?p=14625#p14625 I've made little modification with some error checking....just wish I could hide the command window. :oops: :oops: Anyway, I tried my Portable version on Win7. Though the Hotpaths and Variables worked, but default, I have Salamander starting in Documents and Settings in the left pane and root of a drive in the right pane. I edited the registry with a variable, ie $[HOMEPATH]\Desktop, and it always took me to My Documents. Can this be fixed for 2.53 so it will accept variables?
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5231
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: PreDefined Shortcuts - My Desktop

Post by Jan Rysavy »

You can use command line parameters:
salamand.exe -l "%homepath%\Desktop"
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: PreDefined Shortcuts - My Desktop

Post by vld »

Thanks...noted, but that is not as easy of loading up a generic configuration. I have converted the BAT file into a generic exe file for this portable version and all I need to do is drop a reg and exe file and salamander is portable.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5231
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: PreDefined Shortcuts - My Desktop

Post by Jan Rysavy »

Could you please share your "portable" version of Salamander with us?
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: PreDefined Shortcuts - My Desktop

Post by vld »

Here you go...it's real simple. Just one file in conjunction with a REG. It's a slightly modified version of the one posted in the other topic area (I will also place this there). This is very simple to use. If you take the code below and place it within your salamander folder and run it, if the files are there, it will work. If the needed files are not there, you will get an error. Just install Salamander, drop in the CMD file, create a portsal.reg config file for salamander and then you can copy the entire folder onto a thumbdrive.

PORTSAL.CMD

Code: Select all

@echo off
Title Portable Salamander
Color 1F
if not exist portsal.reg goto :noportsal
if not exist salamand.exe goto :noportsal

:begin
if "%1" neq "" goto %1
start/min cmd /c "%~nx0 hide >nul"
goto:eof

:hide
reg export HKCU\Software\Altap %tmp%\..\SP
set el=%errorlevel%
if %el%==0 reg delete HKCU\Software\Altap /f
reg import "portsal.reg"
salamand.exe
reg delete HKCU\Software\Altap /f
if %el%==1 exit /b
reg import %tmp%\..\SP
call >%tmp%\..\SP
del %tmp%\..\SP
goto:eof

:noportsal
cls
echo.
echo.
echo              	!!!   REQUIRED FILES MISSING   !!!
echo.
echo    Two files are needed for Altap Salamander Portable Launcher
echo    to operate.  One or both are not found.
echo.
echo    1) PORTSAL.REG  - Configuration file which contains your settings
echo                      You can rename your config_.reg to portsal.reg
echo    2) SALAMAND.EXE - Executable application file
echo.
echo    Please verify that these files exist and restart the Portable Launcher
echo.
echo.
echo.
echo.
echo    Press any key to exit.
pause > nul
goto:eof
Post Reply