Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2025-01-18 07:04:18



Reply to topic  [ 4 posts ] 
Print an SLURL with LUA as-in, not converted into a link 
Author Message

Joined: 2011-09-27 11:18:31
Posts: 218
Reply with quote
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")


2025-01-03 22:16:01
Profile

Joined: 2009-03-17 18:42:51
Posts: 5899
Reply with quote
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() ?


2025-01-05 18:53:12
Profile WWW

Joined: 2011-09-27 11:18:31
Posts: 218
Reply with quote
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


2025-01-05 20:18:10
Profile

Joined: 2010-03-14 21:12:58
Posts: 90
Reply with quote
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...


2025-01-09 19:31:22
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.