|
03-01-2007, 08:36 PM
|
|
A Griffon
|
|
Join Date: Apr 2005
Server: Permafrost
Posts: 320
|
|
Problem with "Browser Buttons" in Info Center....
I'm trying to add a "useful links" page to the Info Center, now that we've got a working Web browser in the game. But I'm running into a bit of trouble.
I want to have buttons to open the browser to specific Web sites. But they don't work.
If I type "/browser http://eq2interface.com" in the chat window, for example, the browser opens up right to this Web site. But if I try to use that same command in a button (with OnPress="browser http://eq2interface.com"), pressing the button merely opens up the browser to a blank page.
Am I missing something, or is the command not as fully functional as it should be? (I really hope I'm just missing something!)
-- Darryl (Milquetowst)
__________________
Creator of the various Milquetowst mods
(But no longer actively modding)
|
03-01-2007, 09:13 PM
|
|
A Griffon
|
|
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
|
|
Normally, if the command uses an argument you have to use the syntax "command=argument" like in this post:
http://www.eq2interface.com/forums/s...cript+commands
So for you that would be OnPress="browser=http://eq2interface.com"
If there's more than one command you need to put them in twice, but I think for one command just once is ok.
Oh, one other thing. If you could, it would be nice if the minimize button stored the original window size and then put that back when you clicked on it to restore. I added that when I put it into my browser window.
|
03-01-2007, 10:06 PM
|
|
A Griffon
|
|
Join Date: Apr 2005
Server: Permafrost
Posts: 320
|
|
Quote:
Originally Posted by Othesus
Normally, if the command uses an argument you have to use the syntax "command=argument"....
|
OK, duh. I figured it was something obvious.
Quote:
Oh, one other thing. If you could, it would be nice if the minimize button stored the original window size....
|
As it happens, I already borrowed that little refinement from your browser window.
-- Darryl
__________________
Creator of the various Milquetowst mods
(But no longer actively modding)
|
03-02-2007, 03:27 AM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
I don't like the command=argument syntax, since you usually need to use it twice - I suppose once to define the argument and once to execute the command, regardless of how many commands there are. That uses up CPU cycles for nothing. Therefore, I much prefer to execute commands directly.
However, both with the direct and the indirect way, I would expect that you will need to enclose the argument in parenthesis where necessary, for example because of the : and / letters in URLs. I suppose that it is why your first try did not work.
So you would need set your OnPress to
browser "http://eq2interface.com"
|
03-02-2007, 02:46 PM
|
|
aka Mook
|
|
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
|
|
Quote:
Originally Posted by gm9
I don't like the command=argument syntax, since you usually need to use it twice - I suppose once to define the argument and once to execute the command, regardless of how many commands there are. That uses up CPU cycles for nothing. Therefore, I much prefer to execute commands directly.
However, both with the direct and the indirect way, I would expect that you will need to enclose the argument in parenthesis where necessary, for example because of the : and / letters in URLs. I suppose that it is why your first try did not work.
So you would need set your OnPress to
browser "http://eq2interface.com"
|
Holy crap, how long has that worked?
__________________
If it ain't broke, it needs more features!
|
03-02-2007, 06:33 PM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
Quote:
Originally Posted by Deathbane27
Holy crap, how long has that worked?
|
Ever since I started modding at least. I understand from your old threads that it didn't in the beginning, and ProfitUI was full of that "=" code. I think I asked at one time why everybody was still using it in other mods as well, but since I never learned of a reason for that I took out most of it by now.
|
03-02-2007, 06:35 PM
|
|
aka Mook
|
|
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
|
|
We were still using = because no one told us that using quotes would work.
__________________
If it ain't broke, it needs more features!
|
03-02-2007, 06:54 PM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
But it also works without quotes most of the time... (depends on the type of argument)
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:57 PM.
|
|