Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Funcs Remove/RemoveAll can be found between lines 600-700 in DigitalDisplay.au3. Download the clean source from the link in the thread if your version is corrupted. And maybe read the Remarks section in the first fifty lines, which state: ; _DigitalDisplay_Remove($displayID,$background) ; Removes one exsting entry from array $DigiDispSpecs[][], ; and blanks the allocated GUI region with (default/specified) background colour ; ; _DigitalDisplay_RemoveAll($background) ; Clears the entire array $DigiDispSpecs[][] by repeated calls to _DigitalDisplay_Remove() ; The optional background parameter is parsed to _DigitalDisplay_Remove(). ; ; _DigitalDisplay_CleanUp() ; 1. Calls _DigitalDisplay_RemoveAll() ; 2. Disposes of all garbage produced by GDIPlus, to prevent memory leaks ; NB Call this UDF before exiting your application, else your universe may collapse, Earthling!
  3. Today
  4. I appreciate the feedback! All of that makes sense to me. I usually only declare locals in functions and globals at the top of script but I was so involved with getting the thing to work I slopped it together from the comments here 😂
  5. Maybe someone needs it. You can use https://mosquitto.org/download/ mosquitto_pub.exe mosquitto_sub.exe with run('PATH\Mosquitto\mosquitto_pub.exe -h HOST -t TOPIC -m "MSG", '', @SW_HIDE) read help if you need info mosquitto_pub.exe -- help mosquitto_sub.exe --help
  6. Exchanging data and searching using the hard drive's file is taking too long, how could I open this file from the disk in memory and make all the changes while it is open without writing to the disk?
  7. is there a way that allows you to use only the right and bottom sides as "handles" to resize a window? that is, the "SIZENS" and "SIZEWE" cursors should only appear when the pointer is positioned on the right and bottom edges of the window, allowing only these two to resize the window accordingly. I'm trying to resize a window not linearly, but in steps of 50 in width / height. Resizing the right and bottom edges the effect is quite ugly but still acceptable, but if the resizing is done from the left and top edges, the resulting effect is too ugly Thanks for any tip #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> GUIRegisterMsg($WM_SIZE, 'onResize') Global $hGUI = GUICreate('Test', 100, 100, Default, Default, $WS_THICKFRAME, $WS_EX_TOOLWINDOW) Global $iStep = 50 GUISetState() Do Until GUIGetMsg() = -3 Func onResize($hwnd, $iMsg, $iwParam, $ilParam) Local $aSize = WinGetPos($hwnd) Local $width = Round($aSize[2] / $iStep) * $iStep Local $height = Round($aSize[3] / $iStep) * $iStep WinMove($hwnd, '', Default, Default, $width, $height) Return $GUI_RUNDEFMSG EndFunc ;==>onResize
  8. Yesterday
  9. Thanks brother, could you provide the func code -> Func _DigitalDisplay_Remove I cannot find the _DigitalDisplay_Remove function in the DigitalDisplay.au3 Thank you~
  10. This really happened and now i'm researching with space before and after the number, now it works perfectly.
  11. Beware that in 100k rows you don't have '06 ' substrings in other places in the strings, else: '02 05 06 08 15 20 23 26 28 30 35 36 38 43 45 47 52 54 55 56 66 68 71 74 106 PM-Q12345' will give: '02 05 06 08 15 20 23 26 28 30 35 36 38 43 45 47 52 54 55 56 66 68 71 74 1| PM-Q12345' As always, know your own data!
  12. Same here so keep it and you'll get naughty spot time
  13. The DB rows in your example look like this: '02 05 06 08 15 20 23 26 28 30 35 36 38 43 45 47 52 54 55 56 66 68 71 74 75 PM-Q1' '02 05 06 08 15 20 23 26 28 30 35 36 38 43 45 47 52 54 55 56 66 68 71 74 75 PM-Q2' '02 05 06 08 15 20 23 26 28 30 35 36 38 43 45 47 52 54 55 56 66 68 71 74 75 PM-Q3' ... '02 05 06 08 15 20 23 26 28 30 35 36 38 43 45 47 52 54 55 56 66 68 71 74 75 PM-Q20' Your SQL update statement is: UPDATE Dados set Numeros= '06 ' where Numeros= '| ' No surprise no row is updated since no row equals '| ' If you want to update rows containing the string '06 ' and replace this part of the string by '| ', then you should do: UPDATE Dados set Numeros= replace(numeros, '06 ', '| ') where Numeros like '%06 %'
  14. I have a database with more than 100,000 rows and I need to replace data in it all when I send any number that has anywhere in this database, I did tests and I have no error return, but the exchange is not done in the database either, can anyone help? #include <SQLite.au3> #include <array.au3> Global $hQuery, $aRow, $sMsg, $sSql, $dados_linha Global $BASE_DB, $cod_cartela, $sorteado, $retarr _SQLite_Startup(@ScriptDir & "\sqlite3.dll") If Not FileExists("database.db") Then $dbn = _SQLite_Open("database.db") _SQLite_Exec($dbn, "CREATE TABLE Dados (Numeros);") For $i = 1 To 20 $dados = "02 05 06 08 15 20 23 26 28 30 35 36 38 43 45 47 52 54 55 56 66 68 71 74 75 PM-Q" & $i $sql = "INSERT INTO Dados VALUES('" & $dados & "');" _SQLite_Exec($dbn, $sql) Next Else $dbn = _SQLite_Open("database.db") EndIf $sorteado = "06 " $trocar = "| " _SQLite_Exec($dbn, "UPDATE Dados set Numeros= " & _SQLite_FastEscape($sorteado) & " where Numeros= " & _SQLite_FastEscape($trocar)); exchange all numbers for "| " $aResult = _SearchDatabase($trocar); Looking for line that has "| " If UBound($aResult) > 1 Then MsgBox(4096, 'OK', 'All numbers found have been replaced by "| "', 2) _ArrayDisplay($aResult) Else MsgBox(4096, 'ERROR', $sorteado & ' It was not exchanged for "| "') $aResult = _SearchDatabase($sorteado) _ArrayDisplay($aResult) EndIf _SQLite_Close() _SQLite_Shutdown() Func _SearchDatabase($sString) Local $sql, $sSql, $aTables, $aResult, $iState Local $tmp1, $tmp2 $sql = "SELECT Numeros, ""Dados"" AS ""table"", rowid FROM ""Dados""" $sSql = "SELECT * FROM (" & $sql & ") WHERE Numeros LIKE '%" & $sString & "%';" $iState = _SQLite_GetTable2d($dbn, $sSql, $aResult, $tmp1, $tmp2) If $iState <> $SQLITE_OK Then Return SetError(@error, 0, $iState) Else Return $aResult EndIf EndFunc ;==>_SearchDatabase
  15. Come back when you have given up on the crap attitude. Not in the mood for babysitting today.
  16. I know that, I looked at your code. But why ? I hardly can think of a browser application you could automate by searching pixel colors to be honest.
  17. Jos I don’t care about anything you say or think so Nine I’m trying search for pixels in back windows, I already achieved it with the script I post, but takes long for a full scan
  18. Could you explain what is it you try to achieve beside the technical issue ? Maybe understanding the end result of your automation would help us to provide a better solution ?
  19. What a load of bullocks and you know it, so let me add to you drama: you did have a very impolite answer to the simple question asked and you choose to remain sort of agressive in your last answer so what about trying to dim it or else i/we have no hesitation to shut you up....and yes this is also an agressive tone but that happens when you behave as an idiot. Jos
  20. AutoBert, Interesting, now i can at least use the function again, thanks for that :) TheAutomator
  21. I thank you if could stop the drama, and I don’t took an aggressive stance, it’s up to you, keep focus on the topic JLogan Ui automation wouldn’t help. Looking for a way to search pixel in back windows, my actual script takes so long to scan the screen
  22. Since Brave is based on Chromium, you may be able to use Chromedriver and the Webdriver UDF to automate it.
  23. c7easa7r, There is no need to get all excited - the game reference came up first when I searched. You might note that I asked politely and did not just lock the thread, so I fail to see why you took such an aggressive stance. Just chill a bit. M23
  24. And you could realize that a simple question was being asked, by someone who has the authority to do so, and choose not to be childish in answering. Or, you could have specified that you are trying to automate the Brave browser and you would have been directed toward UIAutomation as a stable way to do what you're after rather than trying to hack at it with Pixel Searches.
  25. You are obsessed about people asking for game automate? Brave is a browser like chrome,firefox,etc, you could had searched before, as some of you always like to tell people to go read help file. 🤭
  26. c7easa7r, It looks as if you are trying to automate a game: "Brave". Is this in fact the case? M23
  27. #include <WinAPI.au3> #include <GDIPlus.au3> #include <ScreenCapture.au3> $Title = "New Tab - Brave" $Hwnd = WinGetHandle($Title) ConsoleWrite("Handle "&$Hwnd&@CRLF) Local $BMP $xTime = TimerInit() $X = 0 $Y = 0 $Color = GetColor($x, $y, $hwnd) ConsoleWrite("Pixel COlor "&$Color&@CRLF) While 1 $aPixelColor = _GDIPlus_BitmapGetPixel($BMP, $X, $Y) $X = $X + 1 $R = Hex($aPixelColor, 6) ConsoleWrite(Dec($R) & @CRLF) If $X = 1920 Then ExitLoop WEnd $yTime = TimerDiff($xTime) ConsoleWrite("Time " & $yTime) Func GetColor($iX,$iY,$WinHandle) _GDIPlus_Startup() Local $aPos = WinGetPos($WinHandle) $iWidth = $aPos[2] $iHeight = $aPos[3] Local $hDDC = _WinAPI_GetDC($WinHandle) Local $hCDC = _WinAPI_CreateCompatibleDC($hDDC) $hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iWidth, $iHeight) _WinAPI_SelectObject($hCDC, $hBMP) DllCall("User32.dll", "int", "PrintWindow", "hwnd", $WinHandle, "hwnd", $hCDC, "int", 0) _WinAPI_BitBlt($hCDC, 0, 0, $iWidth, $iHeight, $hDDC, 0, 0, $__SCREENCAPTURECONSTANT_SRCCOPY) $BMP = _GDIPlus_BitmapCreateFromHBITMAP($hBMP) $aPixelColor = _GDIPlus_BitmapGetPixel($BMP, $iX, $iY) ;_WinAPI_ReleaseDC($WinHandle, $hDDC) ;_WinAPI_DeleteDC($hCDC) ;_WinAPI_DeleteObject($hBMP) ;_GDIPlus_ImageDispose($BMP) ;_GDIPlus_Shutdown() $P = Hex($aPixelColor, 6) Return Dec($P) EndFunc ;==>GetColor While 1 ;$BMP = _GDIPlus_BitmapCreateFromHBITMAP($hBMP) $aPixelColor = _GDIPlus_BitmapGetPixel($BMP, $X, $Y) $X = $X + 1 $R = Hex($aPixelColor, 6) ConsoleWrite(Dec($R) & @CRLF) If $X = 1920 Then $X = 0 $Y = $Y + 1 EndIf If $Y = 1080 Then ExitLoop Wend Any way to speed the searching? Took: Time 79340.229 on a 1920x1080 Do someone know if FastFind: 1. Possible to search pixel on background windows? 2. Search pixel inside a file image 3. Instead capturing a print, load it from a file https://www.autoitscript.com/forum/topic/126430-advanced-pixel-search-library/ Is possible capture images from background windows, if could make fastfind use it instead capturing the screen, then could be possible use ff to search pixels on back windows
  1. Load more activity
×
×
  • Create New...