Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-27-2005, 02:41 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
url in a gui window

How do I put an url in a gui text window?
I am using the GuiMLTextProfile
and in the text="<a href=http://url.here>link here</a>";
the link can be clicked on
but no web page opens.
I searched these forums and the wiki but could not find an answer.

What I found on the wiki on page http://wiki.graal.us/GScript#GuiMLTextCtrl: and am using is this
PHP Code:
<a href=urltext </a> - when the user clicks on 'text' then 
  a web browser is opened 
for the specified url 
but no web browser pops up when i click the link...
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such

Last edited by prozac424242; 11-27-2005 at 03:33 AM..
Reply With Quote
  #2  
Old 11-27-2005, 04:34 AM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
Are you sure this isnt a technical problem conserning your browser?

I know firefox has a long warmup time, and sometimes flags in other programs arent picked up by it.
__________________

I hope for nothing. I fear nothing. I am free.
Reply With Quote
  #3  
Old 11-27-2005, 06:16 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quoted from the very same part of the page you linked to:
Quote:
onURL(url) when clicked on url
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #4  
Old 11-28-2005, 06:32 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
The onURL(url) command
has insufficient documentation for it to be useful (as is the case with much of the wiki).
I could find no example of it in use.
I understand that the http://website.address.com goes betweek the parentheses, but where does the text for what you want the user click on go?
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #5  
Old 11-28-2005, 07:14 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Look what happens when you try:
PHP Code:
function onURL(url) {
  
openURL(temp.url);

__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #6  
Old 11-28-2005, 07:50 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Please post GS2-specific questions in the GS2 subforum. Redirects will be left for now for convenience.
Reply With Quote
  #7  
Old 11-28-2005, 03:37 PM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
Well nano, I tried it, and I see that nothing happens.
no link shows up in the text place regardless of where I add that code.

PHP Code:
        new GuiMLTextCtrl("Welcome_Text") {

          
profile "GuiMLTextProfile";
             function 
onURL(url) {openURL(temp.url);}
          
position "15 25";
          
extent "500 50";
          
text "<img src=orb6.gif id=1><shadow:1:1><shadowcolor:000000>Welcome to Sanstrata Classic, " @player.nick;
           } 
that block of code is of course within a GuiWindowCtrl. The welcome message shows up, I see the welcome message, but there is no link.
I tried putting the function in the text string too, but all that does is convert the function to display text. I tried putting it where the @player.nick is but that does not show anything either.

What am I doing wrong here?
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #8  
Old 11-28-2005, 11:16 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
First off, I do not see a URL in what you posted. URLs are defined using the standard HTML <a href> tag or the Torque script <a:url>, also do not include the http://.

Try using a catch event instead.
HTML Code:
thiso.catchevent(name, "onURL", "urlClicked");
Then add to somewhere in the code:
HTML Code:
function urlClicked(obj, url) openURL(url);
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.