ISXVG now makes it easier to acquire information about items via item "links" (ie, the item examine popup window). The methodology for this is actually quite easy.
I. Activating an item link
An 'item examine window' can be activated by using the Vanguard command "/itemlinkrequest <LinkString>" (ie: "vgexecute /itemlinkrequest ${Me.Inventory[item name].Link}"). To acquire the "LinkString", one need only have the item in your inventory and use:
Once you have the "LinkString", then you can store it in a database and use it at your leisure.
II. Getting Information from the Examine Item Window (popup)
Each time that you click on a link (or use the /itemlinkrequest command), an event will fire within ISXVG called VG_onClickItemLink. Unlike most events, VG_onClickItemLink does not have arguments; however, it does come with a contextual LSObject!
Rather than explain it, I'm going to simply give you a sample (simple) script. This script simply runs forever until you end it or unload ISXVG. When you click on a link (or use the /itemlinkrequest command), it will echo information to the console.
I. Activating an item link
An 'item examine window' can be activated by using the Vanguard command "/itemlinkrequest <LinkString>" (ie: "vgexecute /itemlinkrequest ${Me.Inventory[item name].Link}"). To acquire the "LinkString", one need only have the item in your inventory and use:
Code:
echo ${Me.Inventory[item name].Link}
II. Getting Information from the Examine Item Window (popup)
Each time that you click on a link (or use the /itemlinkrequest command), an event will fire within ISXVG called VG_onClickItemLink. Unlike most events, VG_onClickItemLink does not have arguments; however, it does come with a contextual LSObject!
Rather than explain it, I'm going to simply give you a sample (simple) script. This script simply runs forever until you end it or unload ISXVG. When you click on a link (or use the /itemlinkrequest command), it will echo information to the console.
Code:
atom(script) VG_onClickItemLink()
{
; The Item being linked (as an 'item' datatype object) is sent as ${Context}
echo Item Link Clicked:: ${Context.Name} (${Context.Description})
}
function main()
{
; If ISXVG isn't loaded, then no reason to run this script.
if (!${ISXVG(exists)})
return
;Initialize/Attach the event Atom that we defined previously
Event[VG_onClickItemLink]:AttachAtom[VG_onClickItemLink]
do
{
waitframe
}
while ${ISXVG(exists)}
;We're done with the script, so let's detach all of the event atoms
Event[VG_onClickItemLink]:DetachAtom[VG_onClickItemLink]
}