Search code examples
scriptingautoitadobe-illustrator

Automate Illustrator "Text Output Options" dialogue for batch exporting


I am trying to batch export 100s of Adobe Illustrator files but after each file a "Text Export Options" dialogue box comes up and I have to hit enter to continue. I would like to write a script to hit enter for me. I found an AutoIt script that seems to work once but I don't know how to loop it. I tried:

$i = 0
While $i <= WinActivate
    WinActive("Text Export Options") 
    Send("{ENTER}") 
    $i += 1
WEnd

But it crashed my computer. This is what works once:

WinWaitActive("Text Export Options")
Send("{ENTER}")

Solution

  • While True
        If WinActive("Text Export Options") then Send("{ENTER}")
    Wend
    

    Then just right-click the autoit tray icon and click exit once it is done.