Cool VL Viewer forum
http://sldev.free.fr/forum/

Print an SLURL with LUA as-in, not converted into a link
http://sldev.free.fr/forum/viewtopic.php?f=5&t=2625
Page 1 of 1

Author:  g0rd0ngrfr33mailgr [ 2025-01-03 22:16:01 ]
Post subject:  Print an SLURL with LUA as-in, not converted into a link

Hello, Henri!

I made a button
Code:
SideBarButton(6, "U", "MakeDialog('SLURL', 'Put the UUID', '', 'Agent', 'Group', 'Dispatch', 'DialogClose()', 'DialogClose()', 'DialogClose()')", "Produce an SLURL and dispatch it")

with the code
Code:
function OnLuaDialogClose(title, button, text)
if title == "SLURL" then
    if button == 1 then
        slurl1 = "secondlife:///app/agent/" .. text .. "/about";
        print(slurl1);
        DispatchSLURL(slurl1);
    elseif button == 2 then
        slurl2 = "secondlife:///app/group/" .. text .. "/about";
        print(slurl2);
        DispatchSLURL(slurl2);
    elseif button == 3 then
        DispatchSLURL(text)
end
end
end


The idea is that I will feed it the UUID of an agent or group and it'll open the agent or group's profile, but also that it will paste the SLURL itself for me, as-is, that is the raw address and not the link, so I can give it to someone else, put it on notecard etc. The first part works, the second doesn't.

Example: If I feed it with b43c4b76-3816-49ce-933d-e1a4eef3226e, it opens your profile and prints in local
Quote:
[12:05:20 PST] Lua: Henri Beauchamp

while I'd like it to print secondlife:///app/agent/b43c4b76-3816-49ce-933d-e1a4eef3226e/about (or both!).

Is there some way I can do that? Thanks!

In the meantime I made a workaround:
Code:
print("secondlife:///app/agent/@" .. text .. "@/about")

Author:  Henri Beauchamp [ 2025-01-05 18:53:12 ]
Post subject:  Re: Print an SLURL with LUA as-in, not converted into a link

SLURLs are automatically converted to links in the chat history, so you cannot do that.

However, and since you want to copy/paste such SLURLs, why don't you just copy them via Lua in the copy/paste buffer, using SetClipBoardString() instead of print() ?

Author:  g0rd0ngrfr33mailgr [ 2025-01-05 20:18:10 ]
Post subject:  Re: Print an SLURL with LUA as-in, not converted into a link

Henri Beauchamp wrote:
However, and since you want to copy/paste such SLURLs, why don't you just copy them via Lua in the copy/paste buffer, using SetClipBoardString() instead of print() ?

Because it never crossed my mind! Thank you! :D

Author:  Ibrew Meads [ 2025-01-09 19:31:22 ]
Post subject:  Re: Print an SLURL with LUA as-in, not converted into a link

g0rd0ngrfr33mailgr wrote:
Henri Beauchamp wrote:
However, and since you want to copy/paste such SLURLs, why don't you just copy them via Lua in the copy/paste buffer, using SetClipBoardString() instead of print() ?

Because it never crossed my mind! Thank you! :D


LOL now we know why Henri gets paid the big bucks... er...

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/