376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 22 October 2014 - 04:38 AM
Give http a new function, hyperlink.
It basically puts the "make sure you know what your doing" gui from clicking a link chat on your screen.
Pretty sure you guys could piece together the rest. So you can use "pastebin put" and not have to copy the code down then type it again
7083 posts
Location
Tasmania (AU)
Posted 22 October 2014 - 05:02 AM
Hmm. I wonder if posting links via ChatBox peripherals (eg the one in MoarPeripherals) works for this.
2151 posts
Location
Auckland, New Zealand
Posted 22 October 2014 - 05:57 AM
I was thinking about this a while ago. I can definitely see it being useful, especially for links to help topics. The biggest issues I see with this is it would essentially require Dan to add text formatting, or at the very least underlining. You'd also need to figure out how to decide what pixels are hyperlinked and what pixels aren't. You have something like term.setHyperlink that would function similar to setTextColour in that anything after that would be that URL unless reset.
724 posts
Posted 22 October 2014 - 03:40 PM
Do you want click on screen to open some annoying popup window each time some text looks like url? I'm not.
Do you want Computer to decide would you see that popup window when you click on that point on the screen? But user is unknown at that moment !
In order to open link from Computer I can suggest:
1. Check for urls on printed page - it has no mouse interaction but user is known.
2. Add a function for Computers to "beep" and add some text to "chat" for all nearby players. So you can open it from chat if you want.
376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 23 October 2014 - 04:29 PM
Do you want click on screen to open some annoying popup window each time some text looks like url? I'm not.
Do you want Computer to decide would you see that popup window when you click on that point on the screen? But user is unknown at that moment !
In order to open link from Computer I can suggest:
1. Check for urls on printed page - it has no mouse interaction but user is known.
2. Add a function for Computers to "beep" and add some text to "chat" for all nearby players. So you can open it from chat if you want.
It wouldn't check automatically, It would use oeeds
setHyperlink("true","http://www.computercraft.info/forums2/index.php?/")
idea, then have it turn to different shades of blue when the mouse is hovering over it
724 posts
Posted 24 October 2014 - 03:34 PM
First idea overrides current mouse behavior.
Second idea overrides both mouse and screen behavior.
Both are bad. (no offence)
7508 posts
Location
Australia
Posted 24 October 2014 - 03:37 PM
Hmm. I wonder if posting links via ChatBox peripherals (eg the one in MoarPeripherals) works for this.
yep it indeed would work, assuming the client has links in chat enabled
376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 24 October 2014 - 10:59 PM
First idea overrides current mouse behavior.
Second idea overrides both mouse and screen behavior.
Both are bad. (no offence)
How would the first idea override mouse behavior?
it calls a function that creates the GUI
it doesnt create a button
Edited on 24 October 2014 - 09:01 PM
724 posts
Posted 25 October 2014 - 06:39 AM
You click a point on screen and (suddenly) GUI popup opens. So great for annoying sheet (advert).
And you did not describe, would Computer register such click.
Also you did not describe, how to clear such link. Text on screen is not static.
Edited on 27 October 2014 - 04:24 PM
376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 26 October 2014 - 07:14 AM
You click a point on screen and (suddenly) GUI popup opens. So great for annoying shit (advert).
And you did not describe, would Computer register such click.
Also you did not describe, how to clear such link. Text on screen is not static.
Sigh.
Let me explain in terms you can 'understand'
http.direct or http.hyperlink will automatically cause the popup
No mouse needed.
So in order to make it clickable you need something like this
x = 1
y = 1
repeat
local event,button,clickX,clickY = os.pullEvent("mouse_click")
until clickX == x and clickY == y
http.hyperlink("www.example.com")
--# Then the popup appears, understand now?
Also, this is supposed to be a child-friendly forum, and bad language is not accepted
724 posts
Posted 27 October 2014 - 05:24 PM
But in the moment of calling http.hyperlink() player is not known.
Sorry for using non_child_friendly word. I'm always angry about annoying advert. "Sheet" is better in that place ;)/>
598 posts
Location
The United States
Posted 27 October 2014 - 07:28 PM
But in the moment of calling http.hyperlink() player is not known.
Sorry for using non_child_friendly word. I'm always angry about annoying advert. "Sheet" is better in that place ;)/>
I believe your point just made this entire topic crumble.
How would the computer know which player needed the link message?