Hello this is the code maybe you can figure it out I placed some comments to try and explain what I want
#include <Array.au3> AnyDeskOpen() Func AnyDeskOpen() Global $aWinList = WinList("[REGEXPTITLE:(?i)(.*Anydesks*)]") ;get window name and handle from windows and store into an array $asd = $aWinList $aExtract = _ArrayExtract($asd) ; beginner babble clean this Sh** up Global $default = _ArrayToString($aExtract, "", 0, 0) EndFunc StartWait() ; check in the array to see how many windows are opened Func StartWait() While 1 AnyDeskOpen() If $Default = 1 Then Sleep (3500) Else Exitloop EndIf WEnd EndFunc If $default = "2" Then ; If two windows are opened than someone is trying to connect to that computer and needs a click to accept connection try and click accept Button in the first window and the second one by activating diffrent window handle $extra = _ArrayToString($aWinList, "", 1, 1) $sString = StringReplace($extra, "AnyDesk", "") $hGUI = $sString WinActivate(HWnd($hGUI)) winmove (HWnd($hGUI), "", 50, 50) Mouseclick ("left", 100, 500) Sleep (1500) $extra = _ArrayToString($aWinList, "", 2, 2) $sString = StringReplace($extra, "AnyDesk", "") $hGUI = $sString WinActivate(HWnd($hGUI)) winmove (HWnd($hGUI), "", 50, 50) Mouseclick ("left", 100, 500) EndIf While 1 ;up to here everything seems to work AnyDeskOpen() ; while there is a connection there are two AnyDesk windows, if we close the connection than only one window remains opened and we check the array to see how many values it has If $Default = 2 Then Sleep (3500) Else ; At this point the program exits code 0 instead of resseting to function above StartWait() Exitloop EndIf WEnd ; thank you the intent is to keep the program going so it clicks accept again when reconnecting
This topic give you access to an AutoIt functions library I maintain which is called PAL, Peter's AutoIt Library. The latest version 1.20 contains 197 functions divided into these topics:
window, desktop and monitor mouse and GUI GUI controls including graphical buttons (jpg, png) logics and mathematics include constants string, xml string and file string dialogues and progress bars data lists: lists, stacks, shift registers and key maps (a.ka. dictionaries) miscellaneous: logging/debugging, process and system info Change log and files section on the PAL website (SourceForge).
A lot of these functions were created in the development of Peace, Peter's Equalizer APO Configuration Extension, which is a user interface for the system-wide audio driver called Equalizer APO.
I've recently been annoyed by how google images works. You can't click an image and see the full res image. You have to go to the website and find the image on the page and occasionally, it won't allow you to view the image easily. This script makes it easy to view any image in google images in full resolution immediately. You just press Ctrl + Q while hovering over the image you want and it'll open full res in a new tab. This is only tested in firefox, but it shouldn't be hard to modify for another browser.
Here it is:
#include <Misc.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> #include <Clipboard.au3> #include <Array.au3> #include <String.au3> Local $clipB Local $urlArray Local $theLink HotKeySet("^q", "OpenImage") Func DecodeUrl($src) Local $i Local $ch Local $buff ;Init Counter $i = 1 While ($i <= StringLen($src)) $ch = StringMid($src, $i, 1) ;Correct spaces If ($ch = "+") Then $ch = " " EndIf ;Decode any hex values If ($ch = "%") Then $ch = Chr(Dec(StringMid($src, $i + 1, 2))) $i += 2 EndIf ;Build buffer $buff &= $ch ;Inc Counter $i += 1 WEnd Return $buff EndFunc ;==>DecodeUrl Func OpenImage() MouseClick($MOUSE_CLICK_RIGHT) Send("A") Sleep(100) $clipB = _ClipBoard_GetData($CF_TEXT) $theLink = DecodeUrl($clipB) $urlArray = _StringBetween($theLink, "=", "&") If StringInStr($urlArray, "?") <> 0 Then $urlArray = _StringBetween($theLink, "=", "?") EndIf ShellExecute($urlArray) EndFunc While 1 Wend
i need your help guys. I am working in the QA department of my company. A little part of or software produces hints (like little popups) which needs to be tested every release. I wrote scripts to trigger those hints and i also implemented the imagesearch.dll to find those hints on the screen. My goal now is it to let the machine work over night, so when i come back to work i only get a report which says 130/140 hints were found successfully. This already works, aslong as my pc is not locked, but i want/need to lock my pc because of security concerns.
My general question. Is it possible to run my scripts on my locked PC and still find an image that i provide which will open sooner or later in the background?
Thanks in advance