Submitted by LeftEccoForIQ on 2023/01/15 16:53

In the grid, when I select a blank item and press CTRL-v to paste a file link or URL directly into the item (without first entering edit mode), no active hyperlink results. Could this be made to work? I often have items that are file links or URLs only and would rather not have to enter edit mode first and have to type more stuff after pasting for a hyperlink to be created.

My homebrew solution so far has been to check the clipboard against a regex pattern for file paths / URLs and if the clipboard has this form to replace the clipboard's contents with a hyperlink to that file / URL before pasting. Was hoping IQ could do that for me automatically.

Many thanks!

Comments

Hi Left,

  1. Files : Copy a file from Windows Explorer. In an IQ grid, Ctrl+V, a dialog will show with the following options (if nothing is shown, do Paste Special)

    1. File List: Shows Add File dialog, lots of options there
    2. File Name: Adds file name as text, no hyperlink
    3. File Hyperlink: Adds full file (path + name) as a hyperlink
  2. URL: Chrome puts the URL as plain text only. Paste will fill the URL field as Viking said. Edge (new Edge) puts both plain text and HTML formats, which is a big plus, as the link appears as the page title

Get back if you don't have this behavior

Pierre_Admin
IQ Designer

Thank you both for your help!

On principle, I'd rather have this work via a hyperlink in the item text itself rather than having to give up screen space to a URL field column and having to mouse over there to open the link, but maybe that's just me. Will try to solve this via Viking's SetLink function.

As for files:

So you guys always use Copy in Explorer as if you were going to copy and paste the file itself, rather than just its path? Coming from Total Commander, I'm used to copying the path to the clipboard as plain text only before pasting it, e. g. into IQ. In Explorer, that would equate to doing a Shift-Rightclick + selecting Copy As Path from the context menu (I'm using a simple shortcut to do this, of course). My approach seems a little cleaner to me and I would have thought "your" way of doing this might put a lot of unnecessary data on the clipboard. Checking with InsideClipboard from Nirsoft, I see that it's not actually a ton of data and not proportional to file size, which I feared (naively?) when I started thinking about this.

Since just going with Copy on files is more accessible, I might change my MO. The problem is that when I do this, my current clipboard history tracker does not register the file path, which I would require. Guess I'll have to add something to my Autohotkey script that takes care of that...

Suggestions