• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using a prompt value from another handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using a prompt value from another handler


  • Subject: Re: Using a prompt value from another handler
  • From: Brett Conlon <email@hidden>
  • Date: Thu, 17 Nov 2005 12:00:17 +1000


Hi kai,

You understood what I needed to accomplish quite clearly and your suggestions have now given me a working solution, THANKS!

I'm still not sure, though, how you can use a value from a prompt from one handler in another handler, as the examples you offered brought the handler calls to within the same handler as the prompt (therefore the values needed were present in the one handler) - heh, does that make sense??? ;-}

But is it possible to use the value of a prompt result from one handler (A) in another (B), without having to invoke the prompt again? Or would you need to move the prompt out into the main on run, etc. or into its own handler (C) and call it from the other handler locations where needed.... oh, I'm so confused!!!  <8-/

Thanks again!

Coj



kai <email@hidden>

<snipped>

Here's another (which also eliminates some of the repetition in the  
run and open handlers):

-----------------------

on run
                DoAllThis(choose file with prompt "Please choose a file to process")
end run

on open filelist
                repeat with aFile in filelist
                                 DoAllThis(aFile)
                end repeat
end open

--DO PHOTOSHOP STUFF
on DoAllThis(aFile)
                set replacement_title to AskTitle(aFile)
                --Prompt for Client name and Packshot type
                set clientName to item 1 of (choose from list clientNames with  
prompt "Choose the Client:")
                set clientFHE to clientName is "FHE"
                if clientFHE then set replacement_catNo to AskCatNo(replacement_title)
                set packshotMethod to item 1 of (choose from list PackshotMethods  
with prompt "Choose Packshot type:")
                --Then do this
                if clientFHE and packshotMethod is "DVD Slick" then
                                 display dialog "FHE DVD Slick Packshots"
                                 --Many other "else" statements in here
                end if
                ReplaceTitle(replacement_title)
                if clientFHE then ReplaceCatNo(replacement_catNo)
end DoAllThis

-----------------------

---
kai
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Using a prompt value from another handler
      • From: kai <email@hidden>
References: 
 >Re: Using a prompt value from another handler (From: kai <email@hidden>)

  • Prev by Date: Re: The script running finding a path to itself
  • Next by Date: Re: The script running finding a path to itself
  • Previous by thread: Re: Using a prompt value from another handler
  • Next by thread: Re: Using a prompt value from another handler
  • Index(es):
    • Date
    • Thread