Search the Community
Showing results for tags 'detect'.
-
I want to know when a pop up in a game appear, i know i can do it with pixelgetcolor but i dont know if i can do it faster that place it in the main while My script is HotKeySet("{ESC}","_Terminate") While 1 Send("{LEFT down}") Sleep(500) Send("{LEFT up}") Send("{RIGHT down}") Sleep(500) Send("{RIGHT up}") WEnd Func _Terminate() Exit EndFunc
-
Hey. Is there anything that does the same thing as this? Namely I'm talking about detecting when something has changed on screen. The FastFind library is crashing without any errors after running: FFSnapShot($left, $top, $right, $bottom, 0) FFSnapShot($left, $top, $right, $bottom, 1) $diff = FFLocalizeChanges(0, 1) And then trying to overwritite the old snapshot (0 or 1). If I use always different snapshot numbers its using too much memory and will eventually crash my pc. I tried downloading older versions but they're not working and the author is inactive. It takes 2 snapshots and compares them returning the area that has changed very quickly (left, top, right ,bottom). Can anyone help me do this? Looping PixelGetColor would require a bunch of extra code to my purpose and its not as efficient... Thanks
-
Hello I have an inquiry please when i use the control get focus it don't detect the menu item there are any Method to do that? i'll use that to make a custom screen reader in my program please help me to do that I am waiting for your answers greetings to you Thank you in advance
-
Detect external GUI event close...
FrancescoDiMuro posted a topic in AutoIt General Help and Support
Good morning guys I was trying to not open another post, writing here my little issue, but seems that no one cares about, and so, I'm opening another post What I'm trying to do, is detect the event close sent from the virtual keyboard. Why? Because, I have an application which, when I set the focus on a textbox, if the virtual keyboard does not exist, then it is created, else, it's not created But, everytime I try to close the virtual keyboard, the focus remains on the textbox, and another $EN_FOCUS event it's launched and detected from my WM_COMMAND, and so, the virtual keyboard is opened again. How can I solve this little "issue"? I was trying to detect the event sent from the virtual keyboard, storing the handle of it in a variable, and setting: GUISetOnEvent($GUI_EVENT_CLOSE, "CloseVK", $hVirtualKeyboard) without any result. Can someone please help me? Thanks EDIT: Here I'd like to see @Melba23, @water, @Danyfirex... -
Hello everybody.. i have this picture here *attached* and this script here: $ImageToReadPath = @MyDocumentsDir & "\GDIPlus_Image2.jpg" $ResultTextPath = @MyDocumentsDir & "\Result" $OutPutPath = $ResultTextPath & ".txt" $TesseractExePath = @MyDocumentsDir & "\Tesseract.exe" ShellExecuteWait($TesseractExePath, '"' & $ImageToReadPath & '" "' & $ResultTextPath & '"', "", "", @SW_HIDE) If @error Then Exit MsgBox(0, "Error", @error) EndIf MsgBox(0, "Result", FileRead($OutPutPath)) FileDelete($OutPutPath) but tesseract doesnt recognized the correct word... and gives me trash back... this is the image >> and the result was >> "samm" the image was an normal jpg and generated with this code here: _ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image2.jpg", 712,268,853,284) Could anybody give me a hint what i can do better to get this easy image to text? thank u very much!!! Edit: i also tried to capture the screen as bmp with a higher resolution... nothing changed... _ScreenCapture_SetBMPFormat(4) _ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image.bmp", 712,279,853,295)
- 3 replies
-
- tesseract
- image to text
-
(and 3 more)
Tagged with:
-
I taught myself how to script and have done some pretty basic stuff so far. I wrote the script below to detect the current orientation of my monitor, then switch it to a different orientation. I'm bored and I've got the day off, so I'd like to tackle a new challenge. Please review the script below to get an idea of my skill level, then suggest something challenging for me to write. Just no API usage. Thanks! $Desktop_Height = @DesktopHeight $Desktop_Width = @DesktopWidth Run("control desk.cpl") WinWaitActive("Screen Resolution") ControlSend("Screen Resolution", "", "", "!o") If $Desktop_Height < $Desktop_Width Then ControlSend("Screen Resolution", "", "", "{Down}") ElseIf $Desktop_Height > $Desktop_Width Then ControlSend("Screen Resolution", "", "", "{Up}") EndIf ControlSend("Screen Resolution", "", "", "!a") WinWaitActive("Display Settings") ControlSend("Screen Resolution", "", "", "!k") WinWaitActive("Screen Resolution") ControlSend("Screen Resolution", "", "", "!{F4}") Exit
- 14 replies
-
- detect
- orientation
-
(and 3 more)
Tagged with:
-
Hello All, I have found a FileListToArray function that will search a location and find a certain file extension then put it into an array, What I am trying to figure out is how to only list the ones with multpile files in the directory. In this case I am looking for *.ost files only. I want to see what folders have more than one OST file in them so that I can delete the oldest one. Here is the array function #include <Array.au3> Global $a1, $b1 $b1 = _FileListToArrayEx("O:\", "*.ost", 12) ;_ArrayDisplay($b1,"OST Found") global $maxa = Ubound($b1) for $i = 0 to $maxa -1 msgbox(0,"test",$b1[$i]) next ; #FUNCTION# ======================================================================================================================== ; Name...........: _FileListToArray ; Description ...: Lists files and\or folders in a specified path (Similar to using Dir with the /B Switch) ; Syntax.........: _FileListToArray($sPath[, $sFilter = "*"[, $iFlag = 0]]) ; Parameters ....: $sPath - Path to generate filelist for. ; $sFilter - Optional the filter to use, default is *. (Multiple filter groups such as "All "*.png|*.jpg|*.bmp") Search the Autoit3 helpfile for the word "WildCards" For details. ; $iFlag - Optional: specifies whether to return files folders or both Or Full Path (add the flags together for multiple operations): ; |$iFlag = 0 (Default) Return both files and folders ; |$iFlag = 1 Return files only ; |$iFlag = 2 Return Folders only ; |$iFlag = 4 Search subdirectory ; |$iFlag = 8 Return Full Path ; Return values .: @Error - 1 = Path not found or invalid ; |2 = Invalid $sFilter ; |3 = Invalid $iFlag ; |4 = No File(s) Found ; Author ........: SolidSnake <MetalGX91 at GMail dot com> ; Modified.......: ; Remarks .......: The array returned is one-dimensional and is made up as follows: ; $array[0] = Number of Files\Folders returned ; $array[1] = 1st File\Folder ; $array[2] = 2nd File\Folder ; $array[3] = 3rd File\Folder ; $array[n] = nth File\Folder ; Related .......: ; Link ..........: ; Example .......: Yes ; Note ..........: Special Thanks to Helge and Layer for help with the $iFlag update speed optimization by code65536, pdaughe ; Update By DXRW4E ; =================================================================================================================================== Func _FileListToArrayEx($sPath, $sFilter = "*", $iFlag = 0) Local $hSearch, $sFile, $sFileList, $iFlags = StringReplace(BitAND($iFlag, 1) + BitAND($iFlag, 2), "3", "0"), $sSDir = BitAND($iFlag, 4), $FPath = "", $sDelim = "|", $sSDirFTMP = $sFilter $sPath = StringRegExpReplace($sPath, "[\\/]+\z", "") & "\" ; ensure single trailing backslash If Not FileExists($sPath) Then Return SetError(1, 1, "") If BitAND($iFlag, 8) Then $FPath = $sPath If StringRegExp($sFilter, "[\\/:><]|(?s)\A\s*\z") Then Return SetError(2, 2, "") If Not ($iFlags = 0 Or $iFlags = 1 Or $iFlags = 2 Or $sSDir = 4 Or $FPath <> "") Then Return SetError(3, 3, "") $hSearch = FileFindFirstFile($sPath & "*") If @error Then Return SetError(4, 4, "") Local $hWSearch = $hSearch, $hWSTMP = $hSearch, $SearchWD, $sSDirF[3] = [0, StringReplace($sSDirFTMP, "*", ""), "(?i)(" & StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace("|" & $sSDirFTMP & "|", '\|\h*\|[\|\h]*', "\|"), '[\^\$\(\)\+\[\]\{\}\,\.\=]', "\\$0"), "\|([^\*])", "\|^$1"), "([^\*])\|", "$1\$\|"), '\*', ".*"), '^\||\|$', "") & ")"] While 1 $sFile = FileFindNextFile($hWSearch) If @error Then If $hWSearch = $hSearch Then ExitLoop FileClose($hWSearch) $hWSearch -= 1 $SearchWD = StringLeft($SearchWD, StringInStr(StringTrimRight($SearchWD, 1), "\", 1, -1)) ElseIf $sSDir Then $sSDirF[0] = @extended If ($iFlags + $sSDirF[0] <> 2) Then If $sSDirF[1] Then If StringRegExp($sFile, $sSDirF[2]) Then $sFileList &= $sDelim & $FPath & $SearchWD & $sFile Else $sFileList &= $sDelim & $FPath & $SearchWD & $sFile EndIf EndIf If Not $sSDirF[0] Then ContinueLoop $hWSTMP = FileFindFirstFile($sPath & $SearchWD & $sFile & "\*") If $hWSTMP = -1 Then ContinueLoop $hWSearch = $hWSTMP $SearchWD &= $sFile & "\" Else If ($iFlags + @extended = 2) Or StringRegExp($sFile, $sSDirF[2]) = 0 Then ContinueLoop $sFileList &= $sDelim & $FPath & $sFile EndIf WEnd FileClose($hSearch) If Not $sFileList Then Return SetError(4, 4, "") Return StringSplit(StringTrimLeft($sFileList, 1), "|") EndFuncAny help is appreciated.
-
Hello How does Autoit detect when you click on a menu button? (not a sub-menu item, but the actual menu button itself) $Form = GUICreate("", 410, 270) $Menu_Help = GUICtrlCreateMenu("Help") GUISetState(@SW_SHOW) while true Switch GUIGetMsg() Case $Menu_Help msgbox(0,1,2) EndSwitch wend Thanks in advance TheAutomator [EDIT:] Should this be in the gui section?
-
This app will beep once when an email arrives in the web version outlook.com ( formerly hotmail and live.com ) It will make a noise when the email title contains the search text. Instructions : login to your outlook.com in Internet explorer (IE).& press the GO button. v2 just checks email title & moves mouse every 20 secs to stop screen saver.. - no longer available (use v7 below) v7 will can check email body, email title and email from address if required. This version requires you to turn on the outlook.com email preview pane. The programs help explains more. OutlookDotComCheckerV7.au3
-
- outlook com
- hotmail
- (and 5 more)
-
As the title how to detect 3D application? Thanks.