Link entries in Journler

i want to link two Journler entries. The simple script i wrote works, with a little defect:
i cannot switch directly from entry 2 to entry 1 by url link, because the link points to the original file, instead to the contents of the file i want to get.

--Link entries
--journler

tell application "Journler"
	set hy to (get selected entries)
	try
		set {e, f} to {item 1 of hy, item 2 of hy}
		set {ur1, ur2} to {(uri representation of e), (uri representation of f)}
	on error
		display dialog "Choose two entries and pay attention to the hierarchy of entries in the list view" buttons "End"
		return 0
	end try
	set the clipboard to ur2 --paste and assign this link on a specific word in entry 1 (works perfectly)
	
	set all_txt to rich text of f
	set rich text of f to (rich text of f & return & ur1)--paste this url as link (of entry 1) to the foot line of entry 2
	set paragraph -1 of f to (name of e as rich text) 
end tell

Worked perfectly for me. I chose two entries, call the first one A and the second B, ran your script, and found at the bottom of B a link to A that worked. What don’t I understand?

On the Journler forum I’m NovaScotian, btw

Hi Adam!

sure, it works. But the url reference of file 2 points not to the (text) contents of file 1.
(click onto the url of file 2 -result: you get the file icon of entry 1 on the screen)
As example:
Lets say i’ve 750 entries in my Journal, then i select 2 entries i wish to connect and run my script.

Now, the script pastes 1500 as text on the bottom of entry 2, but the reference url rests still 750- (mouse over the url link of file 2 to see the assigned number)
We see, there is a difference between pasted urls (via script) and assigned urls (via the link -command of Journler).


(at least on Leo 10.5.7)

Ahh; my lack of understanding arises because I don’t know how to link two entries in Journler – it’s not something I do. :o If you’ll explain, I’ll compare.

reason:

explanation of methods: (2 methods)

The only way to switch from file 2 to file 1 is to open the resource panel and to click manually on the reference.

Then I didn’t misunderstand. On my machine clicking on the link at the end of file 2 returns me to file 1 in the contents pane.

Thanks for your feedback;
its likely a tecnical issue related to the version number of my operating system, elsewhere i cannot explain why it does not work for me.
Anyway, its ok- and hopefully useful for others too.

The difference I am seeing is that when the link is added to the second entry it is a reference and not an entry.

The uri representation is:

journler://entry/35

The link when using the script is:

journler://reference/35

Somehow the link is converted to a reference when using Rich Text.