GithubHelp home page GithubHelp logo

Comments (5)

Kalamity avatar Kalamity commented on August 20, 2024

Hi mate,
I don't really understand the problem.
0x1622ff is equal to 0x00000000001622FF - they are the same number. Leading zeroes are never shown.

from classmemory.

 avatar commented on August 20, 2024

I need them to show is that possible?

Also im pretty sure it sometimes shows the leading zeroes and sometimes it doesnt.

from classmemory.

Kalamity avatar Kalamity commented on August 20, 2024

This isn't anything to do with the class.
The number is stored/read as a numerical value like any other - it's just how AHK itself is displaying it. There are various settings in AHK which impact this.

How are you converting the number to HEX - that is, how are you getting the script to output the value as 0x1622ff & 0x010000000E125AFF?

from classmemory.

Kalamity avatar Kalamity commented on August 20, 2024

If you just want them padded to a certain length, then you can use a function like this:

msgbox % clipboard := hexPad(0, "Int64")        ; --> 0x0000000000000000
msgbox % clipboard := hexPad(0x1622ff, "Int64") ; --> 0x00000000001622FF

; 0x1622ff hex = 1450751 dec
msgbox % clipboard := hexPad(1450751, "Int64")  ; --> 0x00000000001622FF
msgbox % clipboard := hexPad(1450751, "UInt")   ; -->         0x001622FF

return 

hexPad(numberIntOrHex, type := "UInt")
{
    static width := {   "UChar":    2,      "Char":    2   
                            , "UShort":  4,     "Short":    4   
                            ,   "UInt":  8,     "Int":      8   
                            ,   "Int64": 16}

    if !width.haskey(type)
        throw Exception(A_ThisFunc "() - Type '" type "' not found.", -1) 
    return format("0x{:0" width[type] "X}", numberIntOrHex)
}

from classmemory.

 avatar commented on August 20, 2024

Dude tysm for help i got it working ur the best really 😄
Btw u should add this function to the classMemory because its really useful.

from classmemory.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.