Welcome to Dream.In.Code
Become an Expert!

Join 149,506 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,330 people online right now. Registration is fast and FREE... Join Now!




Applescript Buttons

 
Reply to this topicStart new topic

Applescript Buttons

87ASC
3 Aug, 2007 - 05:00 PM
Post #1

New D.I.C Head
*

Joined: 23 Mar, 2007
Posts: 44


My Contributions
I can not get the buttons to do what is after then. I don't know if I have to declare a variable, I think I do but I don't know how. I have the code here, it's all in Applescript.
Thanks.
CODE

display dialog "My Applicaton" & return & return & ¬
    "Welcome to My Application" buttons {"Talk Text", "Cancel", "Continue"} default button 3
if ("Talk Text") then
    say "Welcome to My Application."
end if
if ("Cancel") then
    close
end if
if ("Continue") then
    display dialog "Continue" & ¬
        "You pressed continue."
end if

User is offlineProfile CardPM
+Quote Post

girasquid
RE: Applescript Buttons
6 Aug, 2007 - 07:26 PM
Post #2

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,294



Thanked: 18 times
Dream Kudos: 725
My Contributions
I found some sample code at this site:
CODE

display dialog: allows you to put up a dialog box easily

Example:

set response_action to display dialog ¬
"How would you like to respond?" buttons {"No Reply", "Default", "Custom"} default button "Default"
if response_action is "Custom" then
try
do script "Edit Custom Reply"
on error
end try
else if response_action is "Default" then
try
do script "Send Standard Reply"
on error
end try
end if

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 07:00PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month