EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   Help!?!?! (https://www.eq2interface.com/forums/forumdisplay.php?f=24)
-   -   URL Prefix in Browser Button (https://www.eq2interface.com/forums/showthread.php?t=12527)

Lanadad 03-16-2009 02:21 AM

URL Prefix in Browser Button
 
I'm trying to get a button in the target window that allows me to open a browser with an URL prefix appended with the name of the target.

I've tried fiddling with the code from ProfitUI (credits: GM9), but I think I'm making an error somewhere. Do I have to escape part of the URL characters?

Currently, this only opens a browser:

Code:

<Button Name="LookUp" OnPress="browser http://www.somewebsite.com/search?name= ## Parent.Name.LocalText" Tooltip="Strategy" />
Any help is appreciated.

Drumstix42 03-16-2009 04:31 AM

My target window has a button that does this if you want to take a look:
http://www.eq2interface.com/download...edWindows.html

gm9 03-16-2009 09:00 AM

Also on your code: You can't do it all in one line, first build the URL, then pass it to the browser command.

Lanadad 03-16-2009 09:51 AM

Thanks!
 
Drumstix42, that's a very nice UI. And thanks for pointing that out to me. It's working now. :)

Code:

<Button Location="2,2" Name="LookUp" OnPress="URL=&apos;http://eq2.wikia.com/wiki/Special:Search?search=&apos; ## Parent.Name2.LocalText&#xD;&#xA;browser URL" Size="18,18" Style="/WindowElements.WindowFrame.data.settings.style" Tooltip="EQ2Wikia" />

<Button Location="20,2" Name="Strat" OnPress="URL=&apos;http://localhost/wiki/Special:Search?search=&apos; ## Parent.Name2.LocalText&#xD;&#xA;browser URL" Size="18,18" Style="/WindowElements.WindowFrame.data.settings.style" Tooltip="Strat"/>

<Button Location="40,2" Name="Loot" OnPress="URL=&apos;http://lootdb.com/?t=mob&amp;q=&apos; ## Parent.Name2.LocalText&#xD;&#xA;browser URL" Size="18,18" Style="/WindowElements.WindowFrame.data.settings.style" Tooltip="Loot"/>

ps.
GM9, I've added a feature request to the list. Hope you'll consider it.

gm9 03-16-2009 11:14 AM

Quote:

Originally Posted by Lanadad (Post 81465)
ps.
GM9, I've added a feature request to the list. Hope you'll consider it.

Yeah Zoltaroth asked me for the mob lookup a while ago already. It's on the list. I think it should only lookup your target if it is a raid or heroic mob, right? The other question is the other click to search links I have usually allow you a selection of search targets, but on the target window there isn't really much space. I might arrange several transparent buttons horizontally though and allow you to distinguish via the tooltip. Looking at the code you posted above that's somewhat like Drum did I guess.

I'm not sure what you mean by your zone lookup request though. You can't target zones.

gm9 03-16-2009 12:15 PM

PS: Do enemy players on PVP servers get heroic/epic etc. brackets?

Lanadad 03-16-2009 01:22 PM

Quote:

Originally Posted by gm9 (Post 81468)
Yeah Zoltaroth asked me for the mob lookup a while ago already. It's on the list. I think it should only lookup your target if it is a raid or heroic mob, right? The other question is the other click to search links I have usually allow you a selection of search targets, but on the target window there isn't really much space. I might arrange several transparent buttons horizontally though and allow you to distinguish via the tooltip. Looking at the code you posted above that's somewhat like Drum did I guess.

I'm not sure what you mean by your zone lookup request though. You can't target zones.

Don't have to I think. You already have the dynamic data for it below the compas/time in yellow text. If the text area is clickable that'd work.

Search string for zone is:
http://lootdb.com/?t=zone&q=

Btw, if you are planning to implement extended searches. It would be great to make them customizable through the existing _ProfitUI_StandardSearches.txt file. :D

gm9 03-16-2009 01:29 PM

Run the updater for the target/implied target stuff. In the end I had it look up all tiers of mobs, not just heroic/epic.

And ok I guess I could add search buttons to the clock window also (it would have to be a different dynamicdata though, what's showing is the region name, not the zone name). I thought you were requesting this for the target window.

Lanadad 03-16-2009 01:34 PM

Cool. I'll run the auto-updater now. :D

I'd have to check in the dynamicdata list if "zone" is available. I assumed so for the clock and I guess eq2maps uses it to get the right map up. :)

/crossfingers

EDIT: That looks really nice and clean. I like the "red" area on mouse-over. It makes it very clear where the button is. Thanks!

gm9 03-16-2009 01:43 PM

Yes the DynamicData is available, don't worry. EQ2MAP works differently though. :)

And glad you like it. Hope it works everywhere, it uses a couple of tricks to determine whether the target is a mob or not.

Lanadad 03-16-2009 02:59 PM

I like that, kind of trying to get the hang of this XML. Putting in some time to understand the mechanics of what you built into that nifty UI. :)

gm9 03-16-2009 03:26 PM

Quote:

Originally Posted by Lanadad (Post 81477)
I like that, kind of trying to get the hang of this XML. Putting in some time to understand the mechanics of what you built into that nifty UI. :)

For the code I just added, the important parts are:

If you are in detailed con mode it switches the mode, delays execution for a moment until (hopefully) the simple mode con brackets have been initialized by game code, and then switches the con mode back. If you are already in simple con mode it goes directly to the next step.

Then it checks whether the info text is visible. If it is not, the target is not attackable, in which case the search buttons are hidden (I know some named mobs are not attackable until a certain condition is met but I thought that didn't warrant a specific lookup code for those).

If the target is attackable, then it checks whether any con brackets are visible in the (now initalized) v1 page. If yes, it assumes a mob (I'm not sure about this assumption and PvP servers) and uses the search plugin to search the web. If no, it assumes a player and does an /inspect_player.

Quote:

Originally Posted by gm9 (Post 81472)
And ok I guess I could add search buttons to the clock window also (it would have to be a different dynamicdata though, what's showing is the region name, not the zone name). I thought you were requesting this for the target window.

actually thinking about this more it might make more sense to add this as an EQ2MAP plugin, that way you could lookup any selected zone.

Drumstix42 03-16-2009 09:42 PM

It's good to have Target look-up for a couple things, as you can target stuff like pickups from the ground, and NPCs and see what quests they are a part of.


All times are GMT -5. The time now is 07:25 AM.

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