Hi! i like messing around with applescript, and ive made some applications so far (mostly with the help of this community).
My latest creation is a world of warcraft auto-login app. this is how it is so far:
-- WoWAL 2.0.applescript
-- WoWAL 2.0
-- Created by Keytachi on 11/22/07.
-- Copyright 2007 __KEMP__. All rights reserved.
property UN : missing value
if UN is missing value then
display dialog "Please enter username" default answer ""
set UN to text returned of result
end if
property PW : missing value
if PW is missing value then
display dialog "Please enter password" default answer ""
set PW to text returned of result
end if
set CR to ASCII character of 13
set TB to ASCII character of 9
tell application "System Events"
tell application "World of Warcraft" to activate
keystroke UN & TB & PW & CR
end tell
now i wanted to add multi user/password support, so that when you ran the app, you could choose a set from the list, or add a new one. thats my first item on the To Do list. the second item, is a UI, so its more user friendly.
i found this script in this site for the drop down menu:
set theReplies to {"boilerplate 1", "boilerplate 2", "boilerplate 3"}
set theChoice to (choose from list theReplies) as text
set thisReply to processChoice(theChoice)
set theMessage to "Dear " & (text returned of (display dialog "enter name" default answer "")) & ",
" & thisReply
on processChoice(thisChoice)
if thisChoice is "boilerplate 1" then
set theText to "product no longer available"
else if thisChoice is "boilerplate 2" then
set theText to "product available in June"
else if thisChoice is "boilerplate 3" then
set theText to "please refer such-and-such a page"
end if
return theText
end processChoice
but i dont really understand how this works.
can anyone explain me how this script works, and how i can do a UI (on Xcode for example)?
Thank you,
Keytachi