|
#1
|
||||
|
||||
hyperlinks with command line options support
Do UR hyperlinks support command line options?
FoxitReader supports command line arguments so that I can choose at which page it will open the file. This is great for making notes from files: foxitreader.exe filename.pdf -n pagenumber I tried to add "-n 8" to hyperlink, so that it reads in UR File/UR: D:\documents\samplefile.pdf -n 8 but it does not work. It passes probably the whole string as a filename. Could you please add support for adding parameters to hyperlinks? Should be straightforward Thanks a lot! |
#2
|
||||
|
||||
In case you decide you implement it, please note that for example to view djvu files at certain pane, the format is
windjview.exe filename.djvu#pagenumber but it should still be straigforward to parse the hyperlink into filename and parameters. Thank you! |
#3
|
|||
|
|||
The best thing would be for FoxitReader to do what UR does: support a URL protocol (a URL format for command-line launching, ala ur://C:/Documents%20and%20Settings/user/My%20Documents/My%20Stuff.urd?item=1000). Should be straightforward :^).
Alternatively, create a Windows shortcut with the target + command-line parameters, and hyperlink to the shortcut file in UR. http://vlaurie.com/computers2/Articles/shortcuts1.htm http://www.google.com/search?q=how+t...ndows+shortcut |
#4
|
||||
|
||||
Quote:
OK, I change my question if the hyperlink parsing doesn't look good to you. What about giving user option to run any command line? So that the option in hyperlink would read File/URL/CMD In that case I'd drag/drop file to item note, go to hyperlink option, precede it with "foxitreader.exe" and add "-n pagenumber" at the end, or whatever needed for any other program. How does this sound? Aaaargh, this is not going to work because of relative paths ... ok, I give up ... have to find some other solution to read/annotate/hyperlink files in efficient way ... doing it in UR at the moment by pasting parts of the screenshorts from files, but if I cannot go directly to the point where the note comes from, it's too time consuming ... http://www.outlinersoftware.com/topi...notatebookmark |
#5
|
||||
|
||||
Quote:
|
#6
|
|||
|
|||
Their not "our" protocols. URL protocols are defined and processed by Windows itself (via a call to ShellExecute/ShellExecuteEx).
|
#7
|
||||
|
||||
Quote:
+ you don't provide support for the relative path of url protocol (at the moment) which makes it not very useful. It would be nice if dropping an item from another ur file below its directory structure creates relative path (optionally), just like the normal file does ... still, this whole discussion ... I don't know ... the simplest would be if UR parses the parameters and calls the right application ;-) |
#8
|
||||
|
||||
+ unlike UR and urd files, there are many applications that deal with pdf file extension. So it might be preferable to use the simple command line + arguments, because user could easily add the parameters at the end of file name according to application he/she is using. And this is also consistent with how UR works at the moment for all file formats when they are dropped in item text.
|
#9
|
||||
|
||||
What about adding another line for arguments in the hyperlink dialog? That would make life easy for you, no need to parse, just call the application if there is a link to file + add (if any) supplied arguments
Name: File/URL: Args: what do you think? |
#10
|
|||
|
|||
Hyperlinks are stored in a format defined by the RTF standard, which, like a web URL, is just a URL (there's no provision for multiple values/arguments except via query strings using a URL protocol, as previously shown).
We could investigate converting "relative" URLs linking to other apps (including the path of the .urd file) when launching, but I don't think the format is standardized enough for this to work generically for all applications/URLs. |
#11
|
||||
|
||||
Quote:
Thanks for taking time to respond. I registered pdf protocol, created a wrapper and it works fine for me. I precede the link with pdf:pagenumber: and get what I want ;-) But surely, in this way UR can run anything and could encode it inside its own ur protocol. You could create a dialog where user could choose application to run, arguments to supply ... and UR would run that ... |
|
|