Jump to content

string/mem help


Recommended Posts

What's the difference between:

_MemWrite($open,0xbase,_MemCreate(0x40))

This works, but this doesnt:

Dim $a
$a = "0x" & "40"
_MemWrite($open,0xbase,_MemCreate($a))

this doesn't work

Link to comment
Share on other sites

What's the difference between:

_MemWrite($open,0xbase,_MemCreate(0x40))

This works, but this doesnt:

Dim $a
$a = "0x" & "40"
_MemWrite($open,0xbase,_MemCreate($a))

this doesn't work

$a was set to a string "0x40" instead of the number 0x40. This should work:

Dim $a
$a = 0x40
_MemWrite($open,0xbase,_MemCreate($a))

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi,

works good, but how do i make this string:

$string = "0x40,0x30,0x20,0x10"

not a string? but like 0x40 0x30 etc..?

You can't. Actual integer parameters are not passed that way. Either they will be completely separate parameters:

_MyFunc(0x40, 0x30, 0x20, 0x10)oÝ÷ Úíì°Y[z¬±çb©Ú®¶²jëh×6Dim $avParams[4] = [0x40, 0x30, 0x20, 0x10]
_MyFunc($avParams)

If you pass them as string like yours, then the function receiving the string will just have to do the work to break them out and convert into separate integers again. No big deal if it's your function, but most functions that need integers expect to receive integers.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...