- Регистрация
- 08.10.2023
- Сообщения
- 134
- Благодарностей
- 35
- Баллы
- 28
Hello everyone,
How to Isolating Clipboard Across Multiple Threads to Avoid Data Mixing?
In my template, I often preferring the clipboard for certain actions to save time, such as copying and pasting text directly, rather than emulating keyboard inputs or using project variables.
However, I've encountered a challenge when running multiple threads simultaneously.
Since Windows operates with a single clipboard, this results in an overlap where threads can inadvertently access or overwrite each other's clipboard content, leading to errors and inconsistencies in my automation processes.
Given the nature of my work, switching entirely from clipboard usage to variables isn't always the most efficient solution for me. I'm reaching out to see if anyone has found a way to effectively isolate the clipboard for each thread within ZennoPoster, or if there are any alternative methods to prevent the intermingling of clipboard contents across threads?
Thank you in advance for your help and suggestions!
Exemple of simple code :
How to Isolating Clipboard Across Multiple Threads to Avoid Data Mixing?
In my template, I often preferring the clipboard for certain actions to save time, such as copying and pasting text directly, rather than emulating keyboard inputs or using project variables.
However, I've encountered a challenge when running multiple threads simultaneously.
Since Windows operates with a single clipboard, this results in an overlap where threads can inadvertently access or overwrite each other's clipboard content, leading to errors and inconsistencies in my automation processes.
Given the nature of my work, switching entirely from clipboard usage to variables isn't always the most efficient solution for me. I'm reaching out to see if anyone has found a way to effectively isolate the clipboard for each thread within ZennoPoster, or if there are any alternative methods to prevent the intermingling of clipboard contents across threads?
Thank you in advance for your help and suggestions!
Exemple of simple code :
C#:
System.Windows.Forms.Clipboard.SetText(project.Variables["C_KeyWord"].Value);
instance.WaitFieldEmulationDelay();
// Emulate text entering
instance.SendText("{CTRLDOWN}v{CTRLUP}", 15);