Jump to content

jinred

Members
  • Posts

    12
  • Joined

  • Last visited

jinred's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Easy for you , Thanks you helped me a lot!
  2. Hi I would like to load string from file into array, but i cant use StringSplit couse i haven't delimeter. My temp.txt contains C1B1F300 string, so with simple code: $File = FileOpen("C:\temp.txt", 1) $Read = String(FileRead('C:\temp.txt')) FileClose($File) i can load string, but how to load it into array to get result: $Read[0]=C1 $Read[1]=B1 $Read[2]=F3 $Read[3]=00 Thanks for any help!
  3. Hi Quite a old post, but for anyone who have same problem Replace Local $v_Struct = DllStructCreate ('byte[' & $i_nSize & ']') oÝ÷ Û­«­¢+Ø)1½°ÀÌØíÙ}MÑÉÕÐô±±MÑÉÕÑ ÉÑ Ìäí¥¹ÑlÌäìµÀìÀÌØí¥}¹M¥éµÀìÌäítÌäì¤( ^^,
  4. ok now i know how to compile scripts under beta ^^, thx #include <Mem.au3> Global $xpos Global $pid Global $keys Global $keymem Global $keymem1 $pid = WinGetProcess(" ") $keymem = _MemOpen($pid) $keymem1 = _MemCreate($keymem) _MemWrite($keymem, 0x00126e20, chr(guictrlread($keys)) MsgBox(262144, guictrlread($keys), Asc(_MemRead($keymem, 0x00126e20))) _MemClose($keymem) I have found on forum, working fine... but it's totaly ussles for me, Asc(_MemRead($keymem, 0x00126e20) returns ASCII, i need something like this (just idea): $xpos = integer returned from (_MemRead($keymem, 0x00126e20) under 0x00126e20 are stored only integers from 0 to 255 some conversion asc to int ??? eh..stuck again
  5. Thanks for replays in Autoit help i found something about DllStructCreate.... ;========================================================= ; Create the struct ; struct { ; int var1; ; unsigned char var2; ; unsigned int var3; ; char var4[128]; ; } ;========================================================= $str = "int;ubyte;uint;char[128]" $a = DllStructCreate($str) if @error Then MsgBox(0,"","Error in DllStructCreate " & @error); exit endif ;========================================================= ; Set data in the struct ; struct.var1 = -1; ; struct.var2 = 255; ; struct.var3 = INT_MAX; -1 will be typecasted to (unsigned int) ; strcpy(struct.var4,"Hello"); ; struct.var4[0] = 'h'; ;========================================================= DllStructSetData($a,1,-1) DllStructSetData($a,2,255) DllStructSetData($a,3,-1) DllStructSetData($a,4,"Hello") DllStructSetData($a,4,Asc("h"),1) ;========================================================= ; Display info in the struct ;========================================================= MsgBox(0,"DllStruct","Struct Size: " & DllStructGetSize($a) & @CRLF & _ "Struct pointer: " & DllStructGetPtr($a) & @CRLF & _ "Data:" & @CRLF & _ DllStructGetData($a,1) & @CRLF & _ DllStructGetData($a,2) & @CRLF & _ DllStructGetData($a,3) & @CRLF & _ DllStructGetData($a,4)) ;========================================================= ; Free the memory allocated for the struct ;========================================================= $a=0 ... but when i compile it i got nice **** errors D:\Program Files\AutoIt3\beta\Examples\Helpfile\DllStructCreate.au3(11,28) : ERROR: DllStructCreate(): undefined function. $a = DllStructCreate($str) ~~ ~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\AutoIt3\beta\Examples\Helpfile\DllStructCreate.au3(25,25) : ERROR: DllStructSetData(): undefined function. DllStructSetData($a,1,-1) ~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\AutoIt3\beta\Examples\Helpfile\DllStructCreate.au3(34,59) : ERROR: DllStructGetSize(): undefined function. MsgBox(0,"DllStruct","Struct Size: " & DllStructGetSize($a) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\AutoIt3\beta\Examples\Helpfile\DllStructCreate.au3(35,42) : ERROR: DllStructGetPtr(): undefined function. "Struct pointer: " & DllStructGetPtr($a) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\AutoIt3\beta\Examples\Helpfile\DllStructCreate.au3(37,24) : ERROR: DllStructGetData(): undefined function. DllStructGetData($a,1) ~~~~~~~~~~~~~~~~~~~~~^ using autoit-v3.1.1.120 beta and SciTE v.1.68 whats wrong?
  6. Hi My script need to read data from local memory adress, i found these adress with Memory Gutter, and now what? Please help, im stuck...
  7. Great it working , thx for help
  8. Here HotKeySet ("{F5}", "Start" ) HotkeySet ("{F8}", "Stop" ) Func Start() While (1) Move() WEnd EndFunc Func Move() For $x = 240 to $x = 380 Step 20 For $y = 100 to $x = 240 Step 20 If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then MouseMove($x,$y) EndIf Next Next EndFunc While (1) Sleep (1) WEnd Func Stop() While 1 = 1 Sleep (1000) Wend EndFunc
  9. I want to move mouse cursor, here is script, but it does't work why? Func Move() For $x = 240 to $x = 380 Step 20 For $y = 100 to $x = 240 Step 20 If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then MouseMove($x,$y) EndIf Next Next EndFunc
  10. hmm, in C++: int*w; int k; w=&k; Is there any possibilities to make something similar in AutoIt?
  11. Probably it is, couse I have started this topic ,but my question is "How to get var from winXp memory?"
  12. How to get var from winXp memory? Example: Func mem_get() $mem = 00126E20 Func returns integer
×
×
  • Create New...