Tedskayteur
Member
When I have two triggers for the same macro creates bugs that's why I want to put a delay between the use of my Macro
Thanks but if the same Macro is triggered at the same time it will have the same delay and causedUse a wait action at the start, it should be enough
What trigger are you using ? I think if the trigger is the same for the 2 macros, you could use a macro run action.Thanks but if the same Macro is triggered at the same time it will have the same delay and caused
You can use 2 different waits based on the trigger, e.g.Thanks but if the same Macro is triggered at the same time it will have the same delay and caused
I think it depends on what you want to happen.When I have two triggers for the same macro creates bugs that's why I want to put a delay between the use of my Macro
Je pense que cela dépend de ce que vous voulez qu'il se passe.
Voulez-vous que la macro s'exécute complètement sur le premier déclencheur et ignore le deuxième déclencheur s'il se produit pendant l'exécution de la macro ?
Ou attendez que la macro se termine avant de l'exécuter à nouveau si le 2e déclencheur s'est déclenché ? Dans quel cas
J'utiliserais une variable booléenne comme indicateur pour montrer que la macro est en cours d'exécution. Quelque chose comme ce qui suit. La variable booléenne est MacroCompleted, définie sur false pendant que la macro est ruinée et définie sur true à la fin de la macro.
T Déclencheur 1
T Déclencheur 2
A Si déclencheur 1
Attendez que MacroCompleted est vrai - La contrainte MacroCompleted est fausse
A Sinon si déclencheur 2
Attendez que MacroCompleted est vrai - La contrainte MacroCompleted est fausse
A Fin si
A Set variable MacroCompleted False
(D'autres actions)
A Définir la variable MacroCompleted True
Pour le premier cas d'utilisation ci-dessus, la macro ressemblerait à quelque chose comme
T Déclencheur 1 - Contrainte MacroTerminé Vrai
T Déclencheur 2 - Contrainte MacroTerminé Vrai
A Set MacroCompleted False
(D'autres actions)
A Set MacroCompleted True
I think it depends on what you want to happen.
Do you want the macro to run completely on the first trigger and ignore the second trigger if it occurs whilst the macro is running?
Or wait for the macro to complete before running it again if the 2nd trigger has fired? In which case
I would use a boolean variable as a flag to show the macro is running. Something like the following. The boolean variable is MacroCompleted, set to false whilst the macro is ruining and set to true at the end of the macro.
T Trigger 1
T Trigger 2
A If Trigger 1
Wait MacroCompleted is True - Constraint MacroCompleted is False
A Else If Trigger 2
Wait MacroCompleted is True - Constraint MacroCompleted is False
A End if
A Set variable MacroCompleted False
(Other actions)
A Set variable MacroCompleted True
For the first use case above, the macro would look something like
T Trigger 1 - Constraint MacroCompleted True
T Trigger 2 - Constraint MacroCompleted True
A Set MacroCompleted False
(Other actions)
A Set MacroCompleted True
I think removing the constraint on the set variable duré(e) will work.Hello I try several times but the macro runs