function getInterpretablePointerFromSelectedAddress() --returns a string that getAddress will interpret local al=getAddressList() local mr=addresslist_getSelectedRecord(al) local r=""; if (mr~=0) and (userDataToInteger(mr)~=0) then address, buildup=memoryrecord_getAddress(mr) base=buildup[1] r=string.format("%x", base) for i=2, #buildup do r="["..r.."]+"..string.format("%x", buildup[i]) end end return r end function CopyAddressToClipboard() writeToClipboard(getInterpretablePointerFromSelectedAddress()) end function Init(t) object_destroy(t) al=getAddressList() for i=0, component_getComponentCount(al)-1 do local c= component_getComponent(al, i) if (object_getClassName(c)=="TTreeviewWithScroll" ) then pm=control_getPopupMenu(c) pmi=menu_getItems(pm) m=createMenuItem(pm) menuItem_setCaption(m, "Copy address to clipboard") menuItem_setShortcut(m, "Ctrl+Alt+C") menuItem_onClick(m, CopyAddressToClipboard) menuItem_add(pmi, m) end end end t=createTimer(nil,false) timer_onTimer(t, Init) timer_setInterval(t, 1) timer_setEnabled(t, true)