Jump to content

Search the Community

Showing results for tags 'winkill'.

  • 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

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. OK, after days looking at my code, the help file and forums I come (again) for help on message windows. I'm having trouble trying to close window messages that appear. This is the code I'm using #include <MsgBoxConstants.au3> Local $obs_handler = 0 Opt("WinTitleMatchMode",2) While 1 $obs_handler = WinWait("C:\Users\", "", 1) If IsHWnd($obs_handler) then MsgBox($MB_OK, "Message", "handler: "&$obs_handler, 1) ;Sleep(100) $obs_handler = HWND($obs_handler) WinKill($obs_handler, "") ;<<<<< PROBLEM!!!!! Else MsgBox($MB_OK, "Message", "No handler", 1) EndIf Send("{ESC}") Sleep(2000) $obs_handler = 0 WEnd The problem is on the Winkill command, it won't just close the window! Winwait is capturing the handler, it checks as handler. Ii'm using the HWND() command just to be sure it is the correct variable type. I've also checked the message box info with the autoit window info tool and the handle value matches the one captured by the code. I've tried winkill, winclose, using wingethandle, moving the winkill command to Before the message box so it is not converted to a string, and now using the hwnd function to force the variable type of the handler. The use of the sleep command does not make any diference. As a side quest, I'd like to use classes to capture the windows instead of titles, just to keep things cleaner, but using the [CLASS:...] value for winwait is not working. I have the class name and number, am I missing something? Thanks!
×
×
  • Create New...