"Open Link" function
Zudo 21 Jun 2014
So my idea is that a function, maybe os.openURL() could exist, allowing programs to open links in the user's default web browser. This would work like the "clicking links in chat" feature in Minecraft, where clicking on a link prompts the user to open the URL. However, it is called from a function.
Lyqyd 21 Jun 2014
That would almost certainly be used more for abusive/griefing purposes than anything else.
awsmazinggenius 21 Jun 2014
By default, in Minecraft, you are prompted before opening links, allowing the user to decide whether they want to open the link. This feature could be useful for many things, like a link to email or Skype chat with the program author, so I support it.
Xfel 21 Jun 2014
Yes, but in normal minecraft, you have to explicitly click on the link in the chat window, it's solely a client side thing. The server shouldn't be able to do such stuff.
Bomb Bloke 21 Jun 2014
Assuming the user is prompted before opening the link (by ComputerCraft itself, as opposed to the script), and the prompt includes an option to terminate the script instead, I don't see any problems. Assuming common sense is incorporated into the implementation, this strikes me as a reasonable idea.
Sebra 21 Jun 2014
1. Which user's browser you want to use? All around?
2. Computer cannot even beep now, how would it "whisper"? Special device?
3. Launching any external program without explicit user demand is quite bad. Especially inet access.
2. Computer cannot even beep now, how would it "whisper"? Special device?
3. Launching any external program without explicit user demand is quite bad. Especially inet access.
Bomb Bloke 21 Jun 2014
Sebra, on 21 June 2014 - 06:09 PM, said:
1. Which user's browser you want to use? All around?
The default browser of the user that clicks the link.
Sebra, on 21 June 2014 - 06:09 PM, said:
3. Launching any external program without explicit user demand is quite bad. Especially inet access.
The idea is that the user is prompted - by ComputerCraft / MineCraft, as opposed to the script - as to whether or not the link should be opened.
Cranium 21 Jun 2014
Again, this opens a whole can of worms, where someone could spam links constantly with an infinite loop, and hide the computer. This is just a bad idea.
Symmetryc 21 Jun 2014
Cranium, on 21 June 2014 - 07:19 PM, said:
Again, this opens a whole can of worms, where someone could spam links constantly with an infinite loop, and hide the computer. This is just a bad idea.
I think this idea would be quite nice.
Bomb Bloke 21 Jun 2014
Though really, users would need to trigger even that prompt manually - it's no good if malicious users could simply restart the script over and over until someone mis-clicked and opened a webpage they didn't want to.
The way to go would be to define areas of an advanced system/monitor's display to act like a link. Some sort of special "print" function would be required, one that drew a line under the rendered text and flagged it as a URL.
It's certainly do-able, but a fair bit of work would be involved. The question is whether it's worth it.
The way to go would be to define areas of an advanced system/monitor's display to act like a link. Some sort of special "print" function would be required, one that drew a line under the rendered text and flagged it as a URL.
It's certainly do-able, but a fair bit of work would be involved. The question is whether it's worth it.
Cranium 21 Jun 2014
I think the only proper way to do it would be only from the gui, and the user MUST click on the url to visit the page, rather than a popup. That way, even if it's spammed, the person must click it to open it up, otherwise it's just a bit of text in the computer, and you can safely esc out of it.
Slash0mega 22 Jun 2014
while i doubt that this will make it into computercraft, i think i got a solution to the loop worry
allow users to disable the promt from appering on there client with a "stop showing prompts this session" showing in the prompt. that way if a user loops the promt, you can click that and no matter how many times the script requests the promt, it wont effect you.
now, here is another problem, how would the computer know who to show the prompt too? whoever has the gui open at the time? if that was the the case another solution to prompt spam is just to not open that terminal again after it kicks you out of the cc interface for the prompt the second or third time.
allow users to disable the promt from appering on there client with a "stop showing prompts this session" showing in the prompt. that way if a user loops the promt, you can click that and no matter how many times the script requests the promt, it wont effect you.
now, here is another problem, how would the computer know who to show the prompt too? whoever has the gui open at the time? if that was the the case another solution to prompt spam is just to not open that terminal again after it kicks you out of the cc interface for the prompt the second or third time.
apemanzilla 22 Jun 2014
This feels like it would break the fourth wall too much and also allow too many malicious uses with the current system in place for links. Sorry.
Sebra 22 Jun 2014
Bomb Bloke, on 21 June 2014 - 07:43 PM, said:
The way to go would be to define areas of an advanced system/monitor's display to act like a link. Some sort of special "print" function would be required, one that drew a line under the rendered text and flagged it as a URL.
How about special button it GUI? Player can click on it, then any string on the screen to try to open it in default browser.
This way no special function needed, player initiate browser launch himself, no screen change needed.
apemanzilla 25 Jun 2014
Sebra, on 22 June 2014 - 06:17 PM, said:
Bomb Bloke, on 21 June 2014 - 07:43 PM, said:
The way to go would be to define areas of an advanced system/monitor's display to act like a link. Some sort of special "print" function would be required, one that drew a line under the rendered text and flagged it as a URL.
How about special button it GUI? Player can click on it, then any string on the screen to try to open it in default browser.
This way no special function needed, player initiate browser launch himself, no screen change needed.
Saldor010 25 Jun 2014
I vote that we don't do this at all. I don't think CC computers should be allowed to access your real computers program (in this case, a web browser), no matter what method. It breaks the fourth wall way too much.
Sebra 25 Jun 2014
apemanzilla, on 25 June 2014 - 12:48 AM, said:
How would you identify the entire string from the point where the player clicked? You could only accurately get a single character based on their click without havig to guess at what is and isn't part of what they tried to click.
Jiloacom, on 25 June 2014 - 02:53 PM, said:
I vote that we don't do this at all. I don't think CC computers should be allowed to access your real computers program (in this case, a web browser), no matter what method. It breaks the fourth wall way too much.