# How to handle the Cancel action of OpenFile dialog with scripting

**URL:** <https://forum.inductiveautomation.com/t/how-to-handle-the-cancel-action-of-openfile-dialog-with-scripting/24467>\
**Category:** Ignition\
**Created:** [April 29, 2019, 3:56pm UTC](https://forum.inductiveautomation.com/t/how-to-handle-the-cancel-action-of-openfile-dialog-with-scripting/24467 "2019-04-29T15:56:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [April 29, 2019, 3:56pm UTC](https://forum.inductiveautomation.com/t/how-to-handle-the-cancel-action-of-openfile-dialog-with-scripting/24467/1 "2019-04-29T15:56:11Z")

</div>

So if I have an “OpenFile” dialog and the user clicks “Cancel” all I want to do is just close the openfile dialog - with scripting?

I can do what needs to be done if client follows thru the procedure but if they cancel I can’t figure out how to just close the openfile dialog and put them back to where they was.  
I can’t figure this out .

Thanks

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [April 29, 2019, 4:40pm UTC](https://forum.inductiveautomation.com/t/how-to-handle-the-cancel-action-of-openfile-dialog-with-scripting/24467/2 "2019-04-29T16:40:20Z")

</div>

Thanks, I finally figured it out.
