|
03-16-2009, 02:21 AM
|
A Crazed Gnoll
|
|
Join Date: Apr 2005
Server: Splitpaw
Posts: 21
|
|
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.
|
03-16-2009, 09:00 AM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
Also on your code: You can't do it all in one line, first build the URL, then pass it to the browser command.
|
03-16-2009, 09:51 AM
|
A Crazed Gnoll
|
|
Join Date: Apr 2005
Server: Splitpaw
Posts: 21
|
|
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='http://eq2.wikia.com/wiki/Special:Search?search=' ## Parent.Name2.LocalText
browser URL" Size="18,18" Style="/WindowElements.WindowFrame.data.settings.style" Tooltip="EQ2Wikia" />
<Button Location="20,2" Name="Strat" OnPress="URL='http://localhost/wiki/Special:Search?search=' ## Parent.Name2.LocalText
browser URL" Size="18,18" Style="/WindowElements.WindowFrame.data.settings.style" Tooltip="Strat"/>
<Button Location="40,2" Name="Loot" OnPress="URL='http://lootdb.com/?t=mob&q=' ## Parent.Name2.LocalText
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.
|
03-16-2009, 11:14 AM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
Quote:
Originally Posted by Lanadad
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.
|
03-16-2009, 12:15 PM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
PS: Do enemy players on PVP servers get heroic/epic etc. brackets?
|
03-16-2009, 01:22 PM
|
A Crazed Gnoll
|
|
Join Date: Apr 2005
Server: Splitpaw
Posts: 21
|
|
Quote:
Originally Posted by gm9
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.
Last edited by Lanadad : 03-16-2009 at 01:30 PM.
|
03-16-2009, 01:29 PM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
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.
|
03-16-2009, 01:34 PM
|
A Crazed Gnoll
|
|
Join Date: Apr 2005
Server: Splitpaw
Posts: 21
|
|
Cool. I'll run the auto-updater now.
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!
Last edited by Lanadad : 03-16-2009 at 01:39 PM.
|
03-16-2009, 01:43 PM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
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.
|
03-16-2009, 02:59 PM
|
A Crazed Gnoll
|
|
Join Date: Apr 2005
Server: Splitpaw
Posts: 21
|
|
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.
|
03-16-2009, 03:26 PM
|
gm10-1
|
|
Join Date: Feb 2006
Posts: 6,479
|
|
Quote:
Originally Posted by Lanadad
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
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.
|
03-16-2009, 09:42 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
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.
|
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 09:32 AM.
|
|