Differences
This shows you the differences between the selected revisions of the page.
| 2017-04-16 | 2017-06-02 | ||
| Placing ad (Petr) | 5.10 Extension output can be displayed in a message box. (martin) | ||
| Line 13: | Line 13: | ||
| # @description Generates HTTP URL of the selected file | # @description Generates HTTP URL of the selected file | ||
| # @flag RemoteFiles | # @flag RemoteFiles | ||
| + | # @flag ShowResultsInMsgBox | ||
| # @version 1 | # @version 1 | ||
| # @homepage ~~SELF~~ | # @homepage ~~SELF~~ | ||
| - | # @require WinSCP 5.9.3 | + | # @require WinSCP 5.10 |
| # @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 23: | Line 24: | ||
| # @option HostName -site textbox "&Web server hostname override (optional)" | # @option HostName -site textbox "&Web server hostname override (optional)" | ||
| # @option - group "Options" | # @option - group "Options" | ||
| - | # @option Pause checkbox "Display URL in console" "-pause" "-pause" | + | # @option Pause checkbox "Display URL" "-pause" "-pause" |
| # @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" | ||
| Line 56: | Line 57: | ||
| ($path.SubString(0, $webRoot.Length) -ne $webRoot)) | ($path.SubString(0, $webRoot.Length) -ne $webRoot)) | ||
| { | { | ||
| - | throw "The path $path is not under web root $webRoot." | + | throw "**The path $path is not under web root $webRoot.**" |
| } | } | ||
| Line 89: | Line 90: | ||
| $url = "$protocol$hostName$rootPath$urlPath" | $url = "$protocol$hostName$rootPath$urlPath" | ||
| - | Write-Host $url | + | if ($pause) |
| + | { | ||
| + | ········Write-Host $url | ||
| + | } | ||
| if ($clipboard) | if ($clipboard) | ||
| Line 109: | Line 113: | ||
| $result = 1 | $result = 1 | ||
| $pause = $true | $pause = $true | ||
| - | } | ||
| - | |||
| - | if ($pause) | ||
| - | { | ||
| - | Write-Host "Press any key to exit..." | ||
| - | [System.Console]::ReadKey() | Out-Null | ||
| } | } | ||