Issues clearing the _Clipboard - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: Issues clearing the _Clipboard (/showthread.php?tid=3062) |
Issues clearing the _Clipboard - dano - 09-21-2024 I cannot clear the clipboard. I have tried: _Clipboard$ = "" The clipboard stays the same. Thinking that the code behind this command might be a tad picky I tried: a$ = "" _Clipboard$ = a$ Nope again...clipboard is still the same. Is this a bug? I am using version 3.14.0, but I did not see this in the change log for 3.14.1 so I did not try it there. The following prints "ON THE CLIPBOARD" both times: Code: (Select All)
The out put is: ON THE CLIPBOARD ON THE CLIPBOARD hmmm... RE: Issues clearing the _Clipboard - SMcNeill - 09-21-2024 Code: (Select All)
I think the best you can probably do is to set it to a single space. Trying to pass a null string "" doesn't work to clear the clipboard for us. If at all possible, just pass a blank space and then trim it out of any response you recieve, like with the above. RE: Issues clearing the _Clipboard - dano - 09-21-2024 (09-21-2024, 09:37 PM)SMcNeill Wrote: I think the best you can probably do is to set it to a single space. Trying to pass a null string "" doesn't work to clear the clipboard for us. If at all possible, just pass a blank space and then trim it out of any response you recieve, like with the above. Thank you Steve... RE: Issues clearing the _Clipboard - mpgcan - 09-22-2024 The empty quotes look as if they are not recognised as a string! Replace these with the null character Chr$(0) Alternatively, append the null terminator to the quotes, e.g., _Clipboard$ = "" + Chr$(0) RE: Issues clearing the _Clipboard - dano - 09-22-2024 Thank you mpgcan, that worked! I swear that I used to assign the clipboard to a null string in the past and it worked. I was ALMOST sure of it...but that was not good enough for me. Being a person that cannot leave my memory to 'well I thought, but I guess not' I set out on a journey and I had to get my answer. Soooo I dug up old versions of the compiler that I have and tried it. I used the following program: Code: (Select All)
qb64.exe v1.5 worked qb64pe.exe v3.0.0 worked qb64pe.exe v3.4.0 worked qb64pe.exe v3.11.0 worked qb64pe.exe v3.13.1 Did not work HA! So my memory is correct and I'm not second guessing myself (or am I...?). Somewhere between v3.11.0 and v3.13.1 this bug was introduced...err...feature was added. RE: Issues clearing the _Clipboard - a740g - 09-22-2024 (09-22-2024, 11:29 AM)dano Wrote: qb64.exe v1.5 workedThank you for checking and reporting. We did update the clipboard code to get _CLIPBOARDIMAGE working on all platforms. So, this changed then. I've opened a GitHub issue. This will be fixed in the next version. RE: Issues clearing the _Clipboard - doppler - 09-22-2024 Glad I read errata bugs. Bitten by the same _clipboard bug. If it was not for the fact I re-compile everything on the next qb64pe. I would have never known until I wrote a new program using _Clipboard="". Old compiled EXE would not contain the problem code. Hence never see it. Thanks for the temporary solution until next release. |