4 Replies Latest reply on Jul 30, 2013 8:03 AM by arcandi0

    Running Grep from ScriptUi

    arcandi0

      Wow, I've really walked into a sticky mess this time.

       

      I'm working on a reformatting tool that uses various GREPs to apply new character, paragraph, table, and cell styles to poorly styled input (Scrivener output, to be exact). My problem is that I have a working script, but when I try to call the function from Adobe ScriptUI, it just doesn't work.

       

      original script

      http://pastebin.com/AJvKuuMT

       

      UI

      http://pastebin.com/j3UXMZZz

       

      The function I want to call from the UI is "convert()" and I'm trying to trigger it from a ScriptUI Button in a Dialog. I've already tried calling convert() and closing the dialog immediately in the convert function, but none of the rest of the convert() function seemed to kick in after that.

       

      I've spent hours digging so far and I've been through a lot of Jongware and Kahrel already. Both of the scripts work, just not together.

       

      Any thoughts?