# Shortcut to manually exit running snippets and/or loops early

**URL:** <https://community.blaze.today/t/shortcut-to-manually-exit-running-snippets-and-or-loops-early/33790>\
**Category:** Feature Ideas\
**Created:** [November 22, 2023, 5:19pm UTC](https://community.blaze.today/t/shortcut-to-manually-exit-running-snippets-and-or-loops-early/33790 "2023-11-22T17:19:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phillip\_Danner](https://community.blaze.today/user_avatar/community.blaze.today/phillip_danner/32/7985_2.png) [@Phillip\_Danner](https://community.blaze.today/u/Phillip_Danner)\
**Post date:** [November 22, 2023, 5:19pm UTC](https://community.blaze.today/t/shortcut-to-manually-exit-running-snippets-and-or-loops-early/33790/1 "2023-11-22T17:19:06Z")

</div>

Having the ability to manually break out of loops would be awesome. To exit a snippet flow mid-way if needed. Like some keyboard shortcut that will break the command loop.

I use the following snippet to run commands on a list of IDs, and I just loop through the list and run the command for each user\_id. However, if there is any issue during the loop, there is no easy way to stop it currently. Would be a lovely feature. 🙂

{users=split(trim({clipboard}), "\n"); trim=yes}  
﻿﻿{message="Command message here."; trim=yes}  
﻿﻿{repeat: for user in users; trim=yes}  
/command\_name id:﻿﻿{=user} message:﻿﻿{=message; trim=yes}  
﻿﻿{wait: delay=+1s; trim=yes}﻿﻿{key: enter; trim=yes}{wait: delay=+2s; trim=yes}  
﻿﻿{endrepeat: trim=yes}

---

<div class="post-metadata">

**Author:** ![PQN](https://community.blaze.today/user_avatar/community.blaze.today/pqn/32/8316_2.png) [@PQN](https://community.blaze.today/u/PQN)\
**Post date:** [February 24, 2024, 4:31pm UTC](https://community.blaze.today/t/shortcut-to-manually-exit-running-snippets-and-or-loops-early/33790/2 "2024-02-24T16:31:48Z")

</div>

I second this!
