EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Problem with "Browser Buttons" in Info Center.... (https://www.eq2interface.com/forums/showthread.php?t=7928)

DBurgdorf 03-01-2007 08:36 PM

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)

Othesus 03-01-2007 09:13 PM

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.

DBurgdorf 03-01-2007 10:06 PM

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

gm9 03-02-2007 03:27 AM

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"

Deathbane27 03-02-2007 02:46 PM

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?

gm9 03-02-2007 06:33 PM

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.

Deathbane27 03-02-2007 06:35 PM

We were still using = because no one told us that using quotes would work. :mad:

gm9 03-02-2007 06:54 PM

But it also works without quotes most of the time... (depends on the type of argument)


All times are GMT -5. The time now is 10:58 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI