Differences
This shows you the differences between the selected revisions of the page.
extension_generate_http_url 2017-10-13 | extension_generate_http_url 2020-09-22 (current) | ||
Line 2: | Line 2: | ||
This extension allows you to generate HTTP URL of the selected file. | This extension allows you to generate HTTP URL of the selected file. | ||
- | For the extension to work correctly, you may need to configure web root folder and possible other options. | + | For the extension to work correctly, you may need to configure web root folder and possibly other options. |
~~AD~~ | ~~AD~~ | ||
Line 10: | Line 10: | ||
<code powershell - GenerateHttpUrl.ps1> | <code powershell - GenerateHttpUrl.ps1> | ||
# @name Generate &HTTP URL | # @name Generate &HTTP URL | ||
- | # @command powershell.exe -ExecutionPolicy Bypass -STA -NoProfile -File "%EXTENSION_PATH%" -webRoot "%WebRoot%" -rootPath "%RootPath%" -hostName "%HostName%" -serverName "!@" -path "!/" %Https% %Pause% %Clipboard% %Open% !& | + | # @command powershell.exe -ExecutionPolicy Bypass -STA -NoProfile ^ |
+ | # -File "%EXTENSION_PATH%" -webRoot "%WebRoot%" -rootPath "%RootPath%" ^ | ||
+ | # -hostName "%HostName%" -serverName "!@" -path "!/" %Https% %Pause% ^ | ||
+ | # %Clipboard% %Open% !& | ||
# @description Generates HTTP URL of the selected file | # @description Generates HTTP URL of the selected file | ||
# @flag RemoteFiles | # @flag RemoteFiles | ||
# @flag ShowResultsInMsgBox | # @flag ShowResultsInMsgBox | ||
- | # @version 4 | + | # @version 5 |
- | # @homepage https://winscp.net/eng/docs/extension_generate_http_url | + | # @homepage ~~SELF~~ |
- | # @require WinSCP 5.10 | + | # @require WinSCP 5.12 |
# @option - -site group "URL" | # @option - -site group "URL" | ||
# @option - -site label "These options are site-specific." | # @option - -site label "These options are site-specific." | ||
Line 27: | Line 30: | ||
# @option Clipboard checkbox "Copy URL to clipboard" "-clipboard" "-clipboard" | # @option Clipboard checkbox "Copy URL to clipboard" "-clipboard" "-clipboard" | ||
# @option Open checkbox "Open URL in web browser" "" "-open" | # @option Open checkbox "Open URL in web browser" "" "-open" | ||
- | # @optionspage https://winscp.net/eng/docs/extension_generate_http_url#options | + | # @optionspage ~~SELF~~#options |
param ( | param ( | ||
Line 122: | Line 125: | ||
$result = 0 | $result = 0 | ||
} | } | ||
- | catch [Exception] | + | catch |
{ | { | ||
Write-Host "Error: $($_.Exception.Message)" | Write-Host "Error: $($_.Exception.Message)" | ||
$result = 1 | $result = 1 | ||
- | $pause = $true | ||
} | } | ||
Line 132: | Line 134: | ||
</code> | </code> | ||
- | ===== Options ===== | + | ===== [[options]] Options ===== |
&screenshotpict(extension_generate_http_url) | &screenshotpict(extension_generate_http_url) | ||
Line 155: | Line 157: | ||
Check the //Open %%URL%% in web browser// to open the generated URL in your web browser. | Check the //Open %%URL%% in web browser// to open the generated URL in your web browser. | ||
+ | |||
+ | In the //Keyboard shortcut//, you can specify a [[custom_key_shortcuts|keyboard shortcut]] for the extension. | ||
~~NOTOC~~ | ~~NOTOC~~ |