Jump to content

Search the Community

Showing results for tags 'go to func'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. 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
×
×
  • Create New...