3 posts in this topic
Developers, can anyone explain this phenomenon to me?
Run this code and wait for nothing without doing a few minutes and you will start receiving randomly, either one or the second message. But none of them should never appear on the logic of the code!
As I understand sometimes the function ClipGet () returns an empty value. Why is this happening?
Dim $ClipGetText ClipPut("12345") While 1 Sleep(5) ;reduced to 5 to better see the problem if ClipGet()<>$ClipGetText And ClipGet()<>"" Then $ClipGetText=ClipGet() Beep(800,100) ConsoleWrite(ClipGet()&"|"&$ClipGetText&@CRLF) ElseIf ClipGet()="" Then Beep(800,100) ConsoleWrite("Empty"&@CRLF) EndIf WEnd
I have problem with ClipGet () function: If the clipboard contains a large amount of data the use of the function pushes the consumption of cpu resources to 100% and my script unresponds until I force it to end.
I tried to work around the problem by limiting the size of the recovered data from the clipboard
Local = $ClipBoardData = StringMid(ClipGet (), 1.1024) I also used:
DllCall ("psapi.dll", "int", "EmptyWorkingSet", "long", -1) to free the memory after each call to ClipGet ()