AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

early version request, Need NUMPUT() library/function

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ahkglen
Guest





PostPosted: Sun Feb 21, 2010 10:57 am    Post subject: early version request, Need NUMPUT() library/function Reply with quote

hello, I have a script compiled on an earlier custom version of hotkey compiler. it lacks NumPut function. I am in need of this function, but cannot upgrade to get it since i have put so much effort into the compiler.

Does anyone have this function that is built-in these days?
Back to top
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Mon Feb 22, 2010 12:23 am    Post subject: Reply with quote

Yup, its name is InsertInteger. You can find it all around.
_________________
Back to top
View user's profile Send private message
ahkglen
Guest





PostPosted: Mon Feb 22, 2010 12:53 am    Post subject: Reply with quote

Thank you so very much Majkinetor.

I am wondering, if NumPut is InsertInteger, .. is NumGet -> ExtractInteger?

You see, I need NumGet also. When I put ExtractInteger in place of NumGet, I am getting a "Caller must pass a variable to this ByRef parameter"

I am using this as NumGet

Code:


ExtractInteger(ByRef pSource, pOffset = 0, pIsSigned = false, pSize = 4)  ; See DllCall for details.
{
    Loop %pSize%  ; Build the integer by adding up its bytes.
        result += *(&pSource + pOffset + A_Index-1) << 8*(A_Index-1)
    if (!pIsSigned OR pSize > 4 OR result < 0x80000000)
        return result  ; Signed vs. unsigned doesn't matter in these cases.
    return -(0xFFFFFFFF - result + 1)
}



specifically for

Code:


DllCall(NumGet(NumGet(1*pStream)+8),"UInt",pStream)



Any idea what may be up there? Smile
Back to top
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Mon Feb 22, 2010 1:06 am    Post subject: Reply with quote

Separate your code into multiple lines or use something like

Code:
 DllCall(NumGet(x := NumGet( ... ) )

_________________
Back to top
View user's profile Send private message
ahkglen
Guest





PostPosted: Mon Feb 22, 2010 1:12 am    Post subject: Reply with quote

Thank you! Smile
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group