#include <WinAPI.au3>

Func _WindowIsPasteable($handle) ;accepts window handle; returns true or false whether a window will accept Ctl-C, Ctl-V
    Local $bCanPaste = True
    Local $hTestWindowPID = 0
    Local $hTestWindowTID = _WinAPI_GetWindowThreadProcessId($handle, $hTestWindowPID)
    _WinAPI_AttachThreadInput(_WinAPI_GetCurrentThreadId(), $hTestWindowTID, True);attach to window we want to paste into
    $bCanPaste = _WinAPI_GetFocus() ;Test whether window is paste-able--returns False if it is not
    _WinAPI_AttachThreadInput(_WinAPI_GetCurrentThreadId, $hTestWindowTID, False);detach from window thread
    Return $bCanPaste
EndFunc