CPU Usage With Dialogs

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
jspence
Newbie
Posts: 3
Joined: Tue Feb 09, 2021 12:29 pm

CPU Usage With Dialogs

Post by jspence » Thu Feb 11, 2021 2:06 pm

Hello All,

I am new to the forum and program but I am learning and truly enjoying Macro Scheduler 15.

I was using autohotkey for a couple of years and am working on transferring over my scripts to Macro Scheduler.
I have observed something strange, to me anyway, that when running my script with two dialogs, containing list boxes, that CPU usage goes up to 10% and stays there. My code is a mess but I have no loops. I am using the standard AddDialogHandler to process mouse clicks in the list boxes.

I then did a test with a script having only one dialog and one button. Without any dialog handler specified the CPU was at 10% again.

Running the example calculator dialog script resulted in the same high CPU usage.

My system is running AMD RYZEN 5 3600 6-Core 3.6 GHz with 64 GB memory, Windows 10 Pro.

Is this considered normal? My previous dialogs from other languages shows usually a very close to 0 CPU usage.
Maybe I should use event handlers?

Thank you for any help you can provide,

Jim S.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1347
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: CPU Usage With Dialogs

Post by Dorian (MJT support) » Thu Feb 11, 2021 2:56 pm

That's certainly not something I remember seeing reported before. Running a dialog has virtually no impact on CPU usage for me. That said, I also started the Calculator one and it shot up momentarily the first time I ran it. It came straight back down again and didn't increase on subsequent runs.

I'll mention this to dev and we'll see if they have any ideas.
Yes, we have a Custom Scripting Service. Message me or go here

jspence
Newbie
Posts: 3
Joined: Tue Feb 09, 2021 12:29 pm

Re: CPU Usage With Dialogs

Post by jspence » Thu Feb 11, 2021 9:53 pm

Hello,

Thank you for responding. I found out that running it outside of the editor does not cause this issue. I am only seeing this problem when running inside the editor. After doing some reading it seems this is because the debugger is running also.

Sorry for the confusion.

Jim S.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1347
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: CPU Usage With Dialogs

Post by Dorian (MJT support) » Fri Feb 12, 2021 10:57 am

Ah, good to hear. Thank you for the update.
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts