JavaScript for automations: bug or correct behavior
JavaScript for automations: bug or correct behavior
- Subject: JavaScript for automations: bug or correct behavior
- From: Deivy Petrescu <email@hidden>
- Date: Mon, 19 Jan 2015 14:21:41 -0500
This JSA script
<script>
app=Application.currentApplication()
app.includeStandardAdditions=true
dd=app.displayDialog('Please enter your name: ', {buttons:["Cancel", "OK"], defaultButton: 1, defaultAnswer:''}).textReturned
dd
</script>
poses a dialog where “Cancel” is the default button.
Correct behavior in AS, but JS starts its counting from 0, thus button 1 should be “OK”.
For other arrays, JSA behaves as expected.
May be my question is if you are using JSA would that be the preferred behavior?
Thanks
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden