Reputation: 499
I would like to use 2 textboxes in one AppleScript dialog box. I have seen multiple posts about how to use delimiters to seperate one boxes into two inputs with commas - that is NOT what I want to do. I would like it to be like my attached screenshot.
Upvotes: 0
Views: 3467
Reputation: 1083
AppleScript Alone can't have 2 text inputs UNLESS you use this command:
do shell script "" with administrator privileges
This will ask you for the system username and password BUT with no output, otherwise you have to use Cocoa AppleScript/AppleScriptObjC which you can connect the windows text fields to the AppleScript.
Here is how to do it with 1 text input:
display dialog "Window Text" default answer ""
(the "default answer" key gives the dialog box a text input and returns it)
Hope this helped!
Upvotes: 1
Reputation: 285150
Pure AppleScript can't create a dialog box with two text fields.
Your screenshot shows a Cocoa dialog box.
However you can do it using AppleScriptObjC code
Upvotes: 1