Copy Link

Select Copy Link in the Edit menu or right-click the Label field in the AceText Editor and select Copy Link to create an URL that points to the active clip or folder and put that URL on the clipboard. The copied URL will look like this:

acetext:clip/9vhfWqB/Collection+File.atc/Folder/Clip+Label

The acetext: scheme indicates that this is an URL to be handled by AceText. Within AceText, such URLs always work. When AceText is installed on your computer, other applications that can open URLs in their associated applications can also launch AceText using acetext: URLs because AceText registers itself as the protocol handler in Windows for the acetext: URL scheme.

An AceText URL that points to a clip or a clip folder has a path that always starts with clip/. This part of the URL is fixed and mandatory.

The second part of a path is the identifier code of the clip or clip folder that the URL points to. It consists of up to 11 ASCII letters, digits, hyphens, and/or underscores. The ID uniquely identifies a clip or folder within a single AceText collection file. The ID does not change when a clip is edited. When the clip is duplicated the duplicate gets a new ID. AceText enforces unique IDs within a single collection. It tries to keep IDs unique between collections too. But it cannot ensure uniqueness between collections because you may make a copy of an AceText collection file outside AceText.

The third part is the URL-encoded file name of the collection that contains the clip. Links generated by AceText only specify the file name. But you can include the full path to the collection if you make sure to URL-encode all the slashes in the file path.

The last part is the path to the clip within the collection. If the clip is inside a clip folder, then the path includes the URL-encoded labels of all the parent folders separated by forward slashes. The path ends with the URL-encoded label of the clip.

All the parts after clip/ are optional. But you obviously need to specify at least one part for the URL to actually point to anything. If you omit the path to the clip or the file name and the path to the clip then you can omit trailing backslashes. But you cannot omit the backslashes that separate an omitted part from a following specified part.

AceText locates the clip pointed to by the URL as follows. If the URL specifies the full path to a collection then AceText opens that collection if it’s not open yet and makes that collection the active collection. If the collection cannot be opened then the URL has no effect. If the URL specifies the file name of a collection and you have a collection open by that file name then AceText activates that collection. If no collection by that file name is open then the URL has no effect. If the URL does not specify a collection file at all then URL processing continues using the collection that was already active.

If the URL specifies a path within the collection using folder and clip labels then AceText tries to locate that path within the active collection. If the path resolves to an item in the active collection then that item is activated and URL processing is complete.

If the URL does not specify a path or if the path does not point to an item then AceText uses the identifier code to find the clip. It first searches through the active collection. If an item with that ID is found then it is activated. If not then AceText searches for the ID through all other open collections from left to right. If found AceText activates the item and the collection it is found in. Either way, URL processing is done.

As you can see, the clip label path and the clip identifier in the URL are redundant. AceText needs only one for the link to work. Using both increases the likelihood that links to clip continue to work when collections are edited. AceText gives priority to the readable part of the URL. The opaque ID is used as a fallback.

So the full link, as specified above, is the most reliable if “Collection File.atc” is already open. It will survive the .atc file being moved to a different location on disk or a drive letter change. If you need the link to work even when the collection is not yet open, specify the full path:

acetext:clip/9vhfWqB/C%3A%5CMy Documents%5CCollection+File.atc/Folder/Clip+Label

If you want to use a link to point to another clip in the same collection then you can omit the file name to allow the URL to survive a change in the collection’s file name. The URL will then also continue to work if both the clip that contains the link and the clip that the link points to are moved to a different collection.

acetext:clip/9vhfWqB//Folder/Clip+Label

If you want your links to be really short, you can specify just the ID. The link will work as long as the collection that contains the target clip is open.

acetext:clip/9vhfWqB