Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Clipboard Locked Blocked GetWindowThreadProcessId GetOpenClipboardWindow WinItemProcId GetClipboardOwner
Suspect Antivirus / Security Tools:
It's possible some application is locking the clipboard. The trick will be to figure out what process. Here is some code you can run on the system when you are having clipboard problems to help track down which Process ID owns the clipboard and or has the clipboard open...
DebugTrace(@ON , DirScript():'ClipTrace.txt') #DefineFunction GetProcessID(h) DebugTrace(2 , "") bb=BinaryAlloc(4) BinaryEodSet(bb,4) dllname=StrCat(DirWindows(1),"user32.dll") DllCall(dllname,long:"GetWindowThreadProcessId",long:h,lpbinary:bb) p=BinaryPeek4(bb,0) BinaryFree(bb) Return (p) #EndFunction ;GetOpenClipboardWindow the function succeeds, the return value is the handle to the window that has the clipboard open. ; If no window has the clipboard open, the return value is NULL. To get extended error information, call GetLastError. hwnd = DllCall( DirWindows(1): "user32.dll", long:"GetOpenClipboardWindow") If hwnd procid = GetProcessID(hwnd) Pause('GetOpenClipboardWindow','The following process ID has the clipboard open: ': procid ) winids = WinItemProcId(procid, 2, 2) Message("Window ID(s)", winids) Else Pause('GetOpenClipboardWindow','No window has the clipboard open') EndIf ;GetClipboardOwner - In general, the clipboard owner is the window that last placed data in clipboard. hwnd = DllCall( DirWindows(1): "user32.dll", long:"GetClipboardOwner") If hwnd procid = GetProcessID(hwnd) Pause('GetClipboardOwner','The following process ID is the clipboard owner: ': procid ) winids = WinItemProcId(procid, 2, 2) Message("Window ID(s)", winids) Else Pause('GetClipboardOwner','No clipboard owner') EndIf Exit
Article ID: W17913
Filename: Clipboard Input Blocked .txt
File Created: 2012:12:20:14:28:20
Last Updated: 2012:12:20:14:28:20