I wrote my simple fiddler script to automatically copy to clipboard but always getting error
"The current wire must be set to STA mode (Single Thread Apartment) before calling to OLE. Make sure STAThreadAttribute is selected in the Main function."
My workaround is to show dialog box and CTRL+C from there
How do i fix it?
4 Answers, 1 is accepted
Which version of Fiddler are you using? Also would it be possible to provide me with the code snippet which caused the problem?
I'm using version 5.0.20182.28034
Here is the code snippet
static function OnBeforeRequest(oSession: Session)
Thank you for reporting this issue. I have logged and it will be fixed in a future version of Fiddler.
Until then, I would like to propose you a work-around. Using the C# FiddlerScript language, which you could set from Tools\Options, Scripting tab and select the C# from the Language dropdown.
Then you could call the CopyToClipboard method in an STA thread like this:
Thanks very much
I better wait for update cause I'm more familar with JS and its regex system than C#