EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   browser questions (https://www.eq2interface.com/forums/showthread.php?t=11076)

pooka 05-27-2008 09:32 AM

browser questions
 
#1) Is there anyway to get data out of the browser and into the UI programatically? I know I can copy/paste manually, but I'm lazy when playing, and would like to be able to insert item links and waypoints directly.

I see that there is some local dynamic data, but I'm not sure if I can use it this way. Having a single line (window.status, or title, or something) would work.


#2) I've noticed that calling /browser website when the browser is already open, doesn't take me to the new website. I can hit refresh on the browser window and it'll update though. I suppose I can just have the UI click the refresh button though. Nevermind, guess this isn't really an issue.


Thanks!

gm9 05-27-2008 10:02 AM

#1) Since you cannot manipulate strings in eq2 UI scripting, you cannot extract text from a larger body of text, therefore extracting item links or waypoints out of webpages could not be automated. You cannot progammatically access the clipboard via UI scripts either.

#2) The browser links in my UI at least used to update the browser window automatically. This may have changed of course, I haven't been in game in a long while.

pooka 05-27-2008 11:26 AM

Right! :) but, I can manipulate strings in the browser via javascript. I'd like to take that modified string, as a whole and place it into an element so it can be accessed via the UI. What do the dynamic data fields in the browser do? Do any of them reflect page title or window.status or anything that I might be able to set?

I'll have to look at your browser window. I've been playing with the default.

Thank you for your time and effort despite not being an active player. Your insight is greatly appreciated.

gm9 05-27-2008 11:40 AM

I do not remember to what extent JavaScript works for the ingame browser. I have doubts that you will be able to set Browser.Status, but you could probably set Browser.URI. Trial and error, you'll figure it out. :)

pooka 05-29-2008 07:35 AM

Right again regarding setting the URI. This means that using javascript, we can strip color code, set our new value to be the URI and pull it back into the UI.

Code:


<script language="JavaScript">
<!--
var str = location.hash;
str=str.replace(/\\/g,"");
str=str.replace(/#....../g,"");
document.write(str);
}
// -->
</script>



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

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