Cap0 Posted May 14, 2007 Posted May 14, 2007 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
PsaltyDS Posted May 14, 2007 Posted May 14, 2007 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
Cap0 Posted May 15, 2007 Author Posted May 15, 2007 Hi, works good, but how do i make this string: $string = "0x40,0x30,0x20,0x10" not a string? but like 0x40 0x30 etc..?
PsaltyDS Posted May 15, 2007 Posted May 15, 2007 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now