This function i use for out of process read num of items in bags. It uses item Id to count not a name.
Code:
Func GetNumItemsByID($id)
Local $Scount=0
$s_curMgrlvl1Pointer = _MemoryRead($OM_CLIENT_CONNECTION,$handle,'ptr') ;(p)
$s_curMgr = _MemoryRead($s_curMgrlvl1Pointer + $OM_OFFSET_1,$handle,'ptr') ;(p)
$curObj = _MemoryRead($s_curMgr + $OM_OFFSET_FIRST_OBJ,$handle,'ptr')
For $i=0 To 1000
$cTYPE = _MemoryRead($curObj + $OBJECT_OFFSET_TYPE,$handle,'int')
If $cTYPE = 1 Then
$ofield = _MemoryRead($curObj + 0x8,$handle,'ptr')
$ItemID = _MemoryRead($ofield + 0x3*4, $handle,'Int')
If $ItemID=$id Then
$Scount+= _MemoryRead($ofield + 0x38, $handle,'Int')
EndIf
EndIf
$nextObj = _MemoryRead($curObj + $OM_OFFSET_NEXT_OBJ,$handle,'ptr')
if $nextObj = $curObj then
ExitLoop
else
$curObj = $nextObj
endif
Next
return $Scount
EndFunc
Shoud be simple convert it into another language
By the way how do you plan to transmit information to a cell?