Re: Need your thoughts
Re: Need your thoughts
- Subject: Re: Need your thoughts
- From: Michelle Steiner <email@hidden>
- Date: Tue, 22 Feb 2011 23:04:08 -0700
On Feb 22, 2011, at 9:28 PM, louie wrote: I have written a small apple script to make a voip computer call. I save the script as a application. The name of the resultant application is the name of the person I want to call. I have to open the apple script ever time I want to add a new person to the list of applications. This entails typing the phone number and the name then saving the script as a application. Can I write a script that will have a dialog where I can type in the name and the phone number then press the ok button. After pressing the OK button I want the script to produce a application that is the name of the person. What I want to is automate the manual way I handle the script now. As always thank you for your time and info.
The following script almost does what you want; however, it saves the script application as a classic app, which won't run in Snow Leopard.
set theName to the text returned of (display dialog "enter the name" default answer "") set theNUmber to the text returned of (display dialog "enter the phone number" default answer "") -- you might want to perform error checking for the phone number to make sure it's numeric and has the right number of digits
tell application "AppleScript Editor" set theDoc to make new document with properties {contents:"the script goes here"} save theDoc as "application bundle" in file ((path to desktop as text) & theName) end tell
-- Michelle -- it would be blasphemous to make jokes about atheism. -- blake murphy
|
_______________________________________________
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