Rank: Member
Groups: Approved
Joined: 6/20/2019(UTC) Posts: 10
|
Hi,All. How to make the following code work properly? Code:sp.CreateTimer("test", 1000, -1, String.raw`clip.Clear();sp.DeleteTimer("test");`);
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Timers don't run on the main UI thread, so they cannot interact with COM, which is how the clipboard is accessed.
I'll look into this and see if there's something I can do to better support COM interaction within a timer script.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
I've changed timers to invoke their scripts on the main thread. It was pretty easy since I added the WM_COPYDATA functionality in 0.3.1.3; I just post the script to the main thread and let it execute there.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close