Formatting question
Formatting question
- Subject: Formatting question
- From: Chris Waldrip <email@hidden>
- Date: Fri, 20 Apr 2007 09:49:32 -0400
Two questions:
- I'm trying to take a number entered by the user, and prefix it with
specific text depending on the size of that number.
- Eventually, I haven't gotten this far yet, I'd like to take that
prefix and number and use that for the machine's sharing name.
Here's the part of the script I've written for obtaining the number
and checking which prefix to use. At this point I just wanted to see
the results so they're not being applied to a new variable yet. The
first problem is that, as run from Script Editor, it doesn't display
the actual value entered by the user (for me it's returning the
number 3 for some reason, ymmv).
-Chris
display dialog "Enter your DNG Kit number" & return default answer ""
buttons {"Next", "Cancel"} default button 1 giving up after 30
set DNGnumber to number of result
if DNGnumber is false then end
display dialog "DNGnumber is " & DNGnumber
if DNGnumber is less than 10 then
display dialog "DNG00" & DNGnumber
else if DNGnumber is less than 100 then
display dialog "DNG0" & DNGnumber
else
display dialog "DNG" & DNGnumber
end if
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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