A component named Dialog1 already exists [Resolved]

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

A component named Dialog1 already exists [Resolved]

Post by ABIVEN » Mon Dec 13, 2021 10:52 am

Hello

This is a very small but annoying problem in the long run : I use a macro with dialog box ; if I repeat this macro too fast then appears :

X A component named Dialog1 already exists

and there I am forced to stop the process msched.exe then relaunch macroscheduler

Thanks

Thanks JRL "add these 3 lines on top"
IfWindowOpen>.. ..[caption]
Exit>0
EndIf

I did it and I waited a few weeks because it was a fugitive failure
Last edited by ABIVEN on Wed Dec 29, 2021 8:13 am, edited 1 time in total.

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: A component named Dialog1 already exists

Post by JRL » Mon Dec 13, 2021 1:32 pm

Make sure your Dialog1 has a name (Caption = 'This is my Dialog')

Put these three lines at the top of your script:

Code: Select all

IfWindowOpen>This is my Dialog*
  Exit>0
EndIf

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: A component named Dialog1 already exists

Post by Grovkillen » Mon Dec 13, 2021 1:43 pm

Or add a simple close window command if you are just worried about the window already being opened. The advice above is taking care of multiple instances of the process, but the topic was on multiple dialogs being opened.
Let>ME=%Script%

Running: 15.0.24
version history

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