I am very new to AppleScript. I am writing a bash script and I need the user type a CAPTCHA. I am trying to use AppleScript to show a dialog with the CAPTCHA image (a simple .png image) and a text input box to the user and then get the result.
I am very new to AppleScript. I am writing a bash script and I
Share
AppleScript’s native dialog display facilities (aka display dialog and display alert) are rather limited and won’t allow you to display an image, unless you define it as an OS X icon file (
.icns) of the right size, which might not be very practical for a captcha.However, there is at least one alternative I am aware of: Carsten Blüm’s Pashua will allow you to create native Cocoa dialogs containing both
textfieldandimageelements. As these are defined in a DSL and created by Pashua, they can be used straight from a shell script (no need to interpose AppleScript – check out the documentation and example shell script distributed with Pashua).