I find it very weird:
if I run like this:
Local $aCoord = PixelSearch($posX, $posY, $sizeX, $sizeY, '0xFF455E')
If I run like this:
Local $metaColor1 = '0xFF455E' or like this Local $metaColor1 = "0xFF455E" or Local $metaColor1 = "'0xFF455E'"
Local $aCoord = PixelSearch($posX, $posY, $sizeX, $sizeY, $color)
it doesn't want to work! So something with variable is not working and yes if I print it out like this:
ConsoleWrite(@LF & $posX & ":"& $posY & ":"& $sizeX & ":" & $sizeY & ":" & $color&@LF)
So I dont see the problem, maybe some of you people?
I'm trying to get a "double" value from memory . However my code gives me error.
Opt("WinTitleMatchMode", 4) Global $ProcessID = WinGetProcess("TI Pro") If $ProcessID = -1 Then MsgBox(4096, "ERROR", "Failed to detect process.") Exit EndIf Local $DllInformation = _MemoryOpen($ProcessID) If @Error Then MsgBox(4096, "ERROR", "Failed to open memory.") Exit EndIf Local $dAddress = 0x1FECD474 Local $tNbSteps = DllStructCreate("double", $dAddress) Local $value = DllStructSetData($tNbSteps, 1, (_MemoryRead($dAddress, $DllInformation))) MsgBox($MB_SYSTEMMODAL, $value)
I need help about pixel search. The problem with the script below is that PixelSearch does not continue on the coordinates where it has stopped.
When the first pixelsearch finds the 1st pixel, it should move the mouse over it and new pixels would appear just like hovering over menus. Then upon hover, there would be another PixelSearch to see if the second red pixel is found. If not found, then it should resume the first PixelSearch instead of starting from left to right again.
For example we are doing a pixelsearch on two straight lines with coordinates [x,y] :
[0,0] [1,0] [2,0]
[1,0] [1,1] [1,2]
Pixelsearch finds the coordinate [1,0] matching our color. So it checks the pixel just below it which is [1,1] to see if it is color red. If not red then it should continue searching starting on coordinates [2,0] instead of going back to [0,0]
Local $bflag = False Do ToolTip("finding..",0,0,"") Sleep(500) $var = PixelSearch(591, 169, 1365, 740, 0x464950,50) ; look for initial pixel If Not @error Then ; MouseMove($var,$var,0) ;move on the button to show new selections, new pixels sleep(1000) ;search for the red pixel on an area above the first pixel coords which was ;generated when mouse cursor was hovered on the first pixel found. $redpixel = PixelSearch($var-50,$var-50,$var+50,$var+50,0xFF0048) If Not @error Then ; Found the 2nd pixel ToolTip("found...",0,0,"") $bflag = True EndIf EndIf Until $bflag I can pay 50USD through Paypal for a working solution. thanks
I'm trying to read value of a base pointer + offset.
With only address I can easily the value but with base addres (pointer) I really don't know how I can do that.
I have a bunch of SDL_Surfaces loaded into memory. I want to list them in a ComboBox.
Using this code, I can load images to the combobox from file but not from existing SDL_Surface memory
CODE ISN"T MEANT TO RUN
; Create combobox pic list example $aControl[$iControl_id][$eControl_data] = _GUICtrlComboBoxEx_Create($gui, $data_value, $data_x, $data_y, $data_w, $data_h, $CBS_DROPDOWNLIST) ; Image List for ComboboxEx Local $hImage = _GUIImageList_Create($gTile_w, $gTile_h, 6) ; Fill hImage with SDL_Surfaces stored in memory: aNPC_surf[scale][type][way][frame] For $i = 0 To 1 ; This works but only from file: ;_GUIImageList_AddBitmap($hImage, $gFolder_graphics & $gaWorld_info[$player.iWorld_cur][$eWi_filename] & "Tiles\" & $i & ".bmp") ; I've broken up a sprite sheet and want to insert into combobox from memory ;_GUIImageList_Add($hImage, $aNPC_surf[$i]) _GUIImageList_Add($hImage, _GDIPlus_BitmapCreateFromMemory($aNPC_surf[$i]), True) ;_GDIPlus_BitmapCreateFromMemory($aNPC_surf[$i]) ; Add the index number to combobox item _GUICtrlComboBoxEx_AddString($aControl[$eNPC_iPic_type][$eControl_data], $i, $i, $i) Next ; Set hImage list to combobox control _GUICtrlComboBoxEx_SetImageList($aControl[$eNPC_iPic_type][$eControl_data], $hImage) Anyone know if I can convert from SDL_Surface to hBitmap? Maybe I'm doing something else wrong.
I've seen hBitmap converted to SDL_Surface but I don't really understand it yet:
My full script can be found here: