In the past I used the following batch file, which I started from
contextmenu:
---
@echo off
if %3==d set location=desktop
if %3==f set location=favori~1
For /F "delims=] tokens=2" %%i in ('Find /n /i "</title>" %2') do (set
name="%%i"&&goto kuerzen1)
:kuerzen1
echo %name%|find /i ".write"
if not errorlevel=1 set name="%name:~23,-12%"
echo %name%|find /i "/title"
if not errorlevel=1 set name="%name:~8,-9%"
:kuerzen2:
echo %name%|find ">"
if not errorlevel=1 (
set name="%name:~2%
goto kuerzen2)
For /F "delims=\/:*?| tokens=1" %%i in (%name%) do set name="%%i"
echo [InternetShortcut]>"%userprofile%"\%location%\%name%.url
echo URL=%1>>"%userprofile%"\%location%\%name%.url
exit
---
It placed an .url file on the desktop. Since a recent Opera update, this
does't work any longer.
Is there another possibility?
Brgds.
Steffen
thank you. I just updated Opera and with the current version my
batchfile works again smoothly. My entry in [Document Popup Menu] is:
Item, "Create link on Desktop"=Execute Program, "cmd.exe", "/C
c:\programme\opera\link.bat %U %S d"
just in case you wanna try.
Thanks again,
Steffen
"Guy" <Use-Reply-To-Address-Header@[127.1]> schrieb im Newsbeitrag
news:9B536ABC0E3F8EAC2E...@127.0.0.1...
> I do not look too closely at your batch file.
> But maybe Opera is not passing your %2 and %3 parameters.
>
>
>> Is there another possibility?
>>
>>
>
>
> I use another solution with non-native tool.
> (Not so elegant as your's)
>
> Using Nir Sofer's NirCmd <http://www.nirsoft.net/utils/nircmd.html>
>
> I use shortcut (.LNK) to script with properties to run Minimized
> to avoid the "DOS box flash".
> NirCmd does all the translation of illegal filename characters.
> I do like substr() to remove the resultant leading "http---"
> and limit to a somewhat reasonable length.
>
> :: begin script
> @title CreateDesktopShortcut & echo off
> set name=%1
> set name=%name:~8,40%
> "e:\program files\nirsoftutilities\nircmd\nircmd.exe" urlshortcut %1
> "~$folder.desktop$" "%name%"
> :: end script
>
> My menu.ini entries:
>
> [Link Popup Menu]
> Item, "Create Desktop Shortcut to Link"="Copy link & Execute program,
> "c:\batch\opera\createdesktopshortcut.lnk","%L""
>
> [Document Popup Menu]
> Item, "Create Desktop Shortcut to Page"="Execute program,
> "c:\batch\opera\createdesktopshortcut.lnk", "%U"
>
> --
> OpenPGP: id=18795161E22D3905; preference=signencrypt;
> url=http://guysalias.fateback.com/pgpkeys.txt