Code: Select all
SendObject := {
x: 2
}
x:=objdump(sendObject)
Code: Select all
SendObject := {
x: 2
}
x:=objdump(sendObject)
Code: Select all
SendObject := {
x: 2
}
size := objdump(sendObject, variable)
Code: Select all
SendObject := {
x: 2
}
size := objdump(sendObject, variable)
msgbox("The variable is " . variable)
ExitApp
sz is unitialized and the math operation throws an error. I started to update the code to make it compliant with latest version of AHK V2, but it's not the only line that needs correcting. And I started correcting the other 2 object serializers that seem to suffer similar problems - don't have the time to debug such compressed unfriendly code for my simple application.Error in #include file "J:\StandaloneApps\AutoHotkeyV2\Lib\objdump.ahk":
Type mismatch.
Line#
046: objects[obj]:=1
047: For k,v in obj
048: {
049: if IsObject(k)
050: sz+=objects.HasKey(k)?9:RawObjectSize(k,buf,objects)+9
051: Else
051: if Type(k)="String"
---> 052: sz+=StrPut(k)*2+9
053: Else
053: sz+=InStr(k,".")||k>4294967295?9:k>65535?5:k>255?3:k>-129?2:k>-32769?3:k>-2147483649?5:9
054: if IsObject(v)
055: sz+=objects.HasKey(v)?9:RawObjectSize(v,buf,objects)+9
056: Else
056: if Type(v)="String"
057: sz+=(buf?obj.GetCapacity(k):StrPut(v)*2)+9
The current thread will exit.
Code: Select all
SendObject := {
x: 2
}
size := objdump(sendObject, variable)
msgbox("The size of dumped memory is " size " bytes")
obj:=ObjLoad(&variable)
MsgBox obj.x
ExitApp
Code: Select all
objDump(A_ScriptDir "\test.bin", ComObjCreate("MSXML2.DOMDocument"))
Return to “Scripts and Functions (v1)”
Users browsing this forum: jsong55 and 127 guests