« first day (4243 days earlier)      last day (691 days later) » 

12:05 PM
Hi all,
any one have tried converting a JSON configuration (like appsettings) to cmd args?
 
 
6 hours later…
6:10 PM
[Hector] back on track with the OCR shit
[Hector] now it seems like I somehow lost my mainwindow XAML
 
6:42 PM
[Hector] IDK what is going on lol
[Hector] apparently VS has forgotten that mainwindow exists
[Hector] so I removed it from the project and made a new window, transferred everything, and now that works
[Hector] but now it says I have multiple mainwindows
[Hector] and something else has broken as well lol
[Hector] Guess it's time to start a new project and move everything over
[Hector] I'd love to know hwoever what the hell just happened lol
 
 
1 hour later…
7:51 PM
[Hector] If someone could lend me a hand here, I'm trying to set my bot to run in the background. If I build a normal sync toggle, it will lock up the UI thread. If I run it in the background, I would like to be able to stop it when I press the stop button.
[Hector] is it possible to manually stop a thread?
[Hector] but make it clean, i.e. it runs until the stop button is pressed, but it shouldn't quit out of the loop, just finish that
[Hector] e.g.
\[**[Hector](https://discord.gg/PNMq3pBSUe)**] `actionRunOcr = new Action(() =>
{
while (true)
{
GrabScreenshot(process);
RunOcr();
}
});`
\[**[Hector](https://discord.gg/PNMq3pBSUe)**] `private async void btnRunTest_Click(object sender, RoutedEventArgs e)
{
await Task.Run(actionRunOcr);
}`
[Hector] What I did now is:
\[**[Hector](https://discord.gg/PNMq3pBSUe)**] `private async void btnStart_Click(object sender, RoutedEventArgs e)
{
await Task.Run(actionRunOcr, cancellationToken);
}

private void btnStop_Click(object sender, RoutedEventArgs e)
{
cancellationTokenSource.Cancel();
}`
[Hector] I was hoping the bottom function would stop the executioin
 

« first day (4243 days earlier)      last day (691 days later) »