
c7aesa7r
Active Members-
Posts
40 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
c7aesa7r's Achievements

Seeker (1/7)
0
Reputation
-
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
-
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
-
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. 🤭
-
#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
-
I have a loop changing her value each time, i would need store each new value in a array and ignore a value that already been saved 0,1 6750216 0,2 16777071 I would need store 6750216,16777071, etc How could be done?
-
-Edit- I did it, nothing with "Switch" @FrancescoDiMuro thank you for your 'precious' help, i dont know why people come in others post with no intention to help and only say go "look help file". $var = 0 $x = 0 While 1 $var = $var + 1 Call("Sel") ConsoleWrite("var = " & $var & @LF) ConsoleWrite("x = " & $x & @LF) ConsoleWrite(" " & @LF) sleep(2000) If $var = 5 Then $var = 0 WEnd Func Sel() Select Case $var = 1 $x = 1 Case $var = 2 $x = 2 Case $var = 3 $x = 3 Case $var = 4 $x = 4 EndSelect EndFunc
-
@FrancescoDiMuro i have read the link you post, but im still dont understand how do it, i also look in help for switch $var = 0 $x = 0 Switch $var Case $var = 1 $x = 1 Case $var = 2 $x = 2 Case $var = 3 $x = 3 Case $var = 4 $x = 4 EndSwitch While 1 $var = $var + 1 ConsoleWrite("var = " & $var & @LF) ConsoleWrite("x = " & $x & @LF) sleep(500) If $var = 5 Then $var = 0 WEnd I also tried: $var = 0 $x = 0 While 1 $var = $var + 1 If $var = 1 Then $x = "carlos" If $var = 2 Then $x = "bea" If $var = 3 Then $x = "thaynara" If $var = 4 Then $x = "pedro" If $var = 5 Then ExitLoop WEnd While 1 $var = $var + 1 ConsoleWrite($x & @LF) sleep(500) If $var = 5 Then $var = 0 WEnd Im trying $x have value according to actual $var number
-
😸Gracias. @Nine how can i call a value stored in var? I tried execute,call.😳😳 I mean when $var be = 1 Then $x = carlos, $var be = 2 ,$ x = etc $var = 0 $x = 0 If $var = 1 Then $x = carlos If $var = 2 Then $x = bea If $var = 3 Then $x = thaynara If $var = 4 Then $x = pedro While 1 $var = $var + 1 Execute($var) ConsoleWrite($x & @LF) WEnd
-
$key = "{a}" $hwd = '0x001C1000' $hwd2 = WinGetHandle("[CLASS:TFormMain]") consolewrite("hwd = " & $hwd & @CR ) consolewrite("hwd2 = " & $hwd2 & @CR) ControlSend($hwd,"","",$key) ControlSend($hwd2,"","",$key) In the script above when i use ControlSend with handle (hw2) stored by WinGetHandle it work perfectly, and when i use ControlSend with the handle (hwd) stored in a variable it never works. Don't want be rude, but im not looking for alternative ways to my script, i would like just understand why with hwd2 it works and hwd don't.
-
Get text from specific toolbar tray icon.
c7aesa7r posted a topic in AutoIt General Help and Support
#Include <GuiToolBar.au3> ; Get handle of taskbar $hWnd = ControlGetHandle("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32;INSTANCE:1]") ; <<<<< If it does not work check the INSTANCE ; Get number of buttons $iCount = _GUICtrlToolbar_ButtonCount($hWnd) ; Loop through buttons For $i = 1 To $iCount - 1 Step 1 ; <<<<< You may need single step $iCmdID = _GUICtrlToolbar_IndexToCommand($hWnd, $i) $sText = _GUICtrlToolbar_GetButtonText($hWnd, $iCmdID) ConsoleWrite($sText & @CRLF) Next $string = $sText $searchstring1 = "Desktop 1" If StringInStr($string, $searchstring1) Then Msgbox(0,"","OK") EndIf This script get text from toolbars on tray, and this is what the script write on console: Im trying read just the message "Desktop 1", so i did: $string = $sText $searchstring1 = "Desktop 1" If StringInStr($string, $searchstring1) Then Msgbox(0,"","OK") EndIf But this is what $sText is storing: I need read just that tray, with icon 1, but each time new tray icon is opened or pc is restarted, it changes her oder in the taskbar, and values index and command id changes; How i could store all results in different strings ? If so i could compare all they using StringinStr. -
Can i have a example please? Im trying change the var name in the end of each loop, name1 became name2 next loop name3 etc.
-
Is it possible to edit part of a variable name? While 1 If $name1 = " " EndIf If $name2 = " " EndI If $name3 = " " EndIf Local newvar = $name(+= 1) WEnd I mean adding +1 in the var name instead +1 in var value.
-
I really dont know why you still here in this forum? You don't have intention to help anybody, you just want people know you're the superior, the man who knows everything and dont need help from anyone. Oh, obvious you're here just to tell people to go search
-
#RequireAdmin $key1 = "{^o}" $key2 = "{o}" AutoItSetOption("WinTextMatchMode",2) $hWin = WinGetHandle("WhatsApp") $hWin2 = WinGetHandle("WhatsApp") $controlid = "" $text = "" ControlSend($hWin,$text,$controlid,$key1) ControlSend($hWin2,$text,$controlid,$key2) Omg, didn't even remember that post, it work great Jos just one last double =( Its possible send two keys at same time? Trying send ctrl+o. Tried ^o but the command dont recognize it, tried $key1 = "{lctrl}" $key2 = "{o}" ..... but it dont send both keys at same time.
-
If i cant do that using winlist how could i do it?