Can someone try this code and see if it mavs on setclipboardtext()? The problem seems randomly occuring so it may work a few times before failing(In vista it seems to crash 100%).
Weird thing is, somethings changed (windows? blitz?) as im certain this was working fine before but its been a while since i used it. :/
Needed Decls for user32.decl:
Weird thing is, somethings changed (windows? blitz?) as im certain this was working fine before but its been a while since i used it. :/
Function WriteClipboardText(txt$) Local cb_TEXT=1 If txt$="" Then Return If api_OpenClipboard(0) api_EmptyClipboard() api_SetClipboardtext%(cb_TEXT,txt$) api_CloseClipboard() EndIf End Function ;----------------------------------- Function ReadClipboardText$() Local cb_TEXT=1 Local txt$="" If api_OpenClipboard(0) If api_IsClipboardFormatAvailable(cb_TEXT) txt$=api_GetClipboardtext$ (cb_TEXT) EndIf api_CloseClipboard() EndIf Return txt$ End Function
Needed Decls for user32.decl:
extra ones: api_GetClipboardtext$ (cb_TEXT%): "GetClipboardData" api_SetClipboardtext%(cb_TEXT%,txt$): "SetClipboardData" originals: api_GetClipboardData% (wFormat%) : "GetClipboardDataA" api_SetClipboardData% (wFormat%, hMem%) : "SetClipboardDataA" api_EmptyClipboard% () : "EmptyClipboard" api_CloseClipboard% () : "CloseClipboard"