AutoHotkey Community

It is currently May 27th, 2012, 4:20 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: February 21st, 2010, 11:57 am 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2010, 1:23 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Yup, its name is InsertInteger. You can find it all around.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2010, 1:53 am 
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? :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2010, 2:06 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Separate your code into multiple lines or use something like

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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2010, 2:12 am 
Thank you! :)


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], JSLover, Mickers, rbrtryn and 70 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group