←  Suggestions

ComputerCraft | Programmable Computers for Minecraft

»

"Open Link" function

Zudo's Photo 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.
Quote

Lyqyd's Photo Lyqyd 21 Jun 2014

That would almost certainly be used more for abusive/griefing purposes than anything else.
Quote

Saldor010's Photo Saldor010 21 Jun 2014

while true do
  os.openURL(MaliciousSite)
end
Quote

awsmazinggenius's Photo 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.
Quote

Xfel's Photo 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.
Quote

H4X0RZ's Photo H4X0RZ 21 Jun 2014

Maybe CC can close the GUI and "whisper" the URL to the player.
Quote

Bomb Bloke's Photo 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.
Quote

Sebra's Photo 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.
Quote

Bomb Bloke's Photo Bomb Bloke 21 Jun 2014

View PostSebra, 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.

View PostSebra, 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.
Quote

Cranium's Photo 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.
Quote

Symmetryc's Photo Symmetryc 21 Jun 2014

View PostCranium, 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.
What could happen is, as Bomb Bloke said, it could open up a prompt that allows you to either follow the link, not follow the link, or terminate the program. That way, if the program is simply spamming link prompts, you could just terminate it.

I think this idea would be quite nice.
Quote

Bomb Bloke's Photo 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.
Quote

Cranium's Photo 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.
Quote

Slash0mega's Photo 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.
Quote

apemanzilla's Photo 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.
Quote

Sebra's Photo Sebra 22 Jun 2014

View PostBomb 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.
This is even worse. You turn Computer into device_to_show_urls.

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.
Quote

apemanzilla's Photo apemanzilla 25 Jun 2014

View PostSebra, on 22 June 2014 - 06:17 PM, said:

View PostBomb 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.
This is even worse. You turn Computer into device_to_show_urls.

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.
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.
Quote

Saldor010's Photo 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.
Quote

Bomb Bloke's Photo Bomb Bloke 25 Jun 2014

*cough*paste event*cough*http API*cough*
Quote

Sebra's Photo Sebra 25 Jun 2014

View Postapemanzilla, 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.
Space separated.

View PostJiloacom, 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.
I'm agree.
Quote