• 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: Asking User Input on First Run only
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asking User Input on First Run only


  • Subject: Re: Asking User Input on First Run only
  • From: David Hood <email@hidden>
  • Date: Tue, 31 Dec 2002 09:51:49 +1300

On Monday, December 30, 2002, at 06:19 PM, Joseph Weaks wrote:

What is a good method for asking for user input only the first time a script is run, after which the info (file locations) is saved in the script? Can I do this with properties?

It doesn't save the information in the script, but this might help:
I've got a script for choosing folders of files for loading onto machines for teaching, I want to to get the list of available folders from the server, but I don't want it to do so each time as it's waste of effort.

When the script starts it checks in the preferences folder of the machine it's on to see if it can find the text file with the information I wanted preserved. If it can't, it goes to the server notes the directory structure and records that in a text file in preferences, the script then gets the directory structure from the text file, proffers a list of choices of folders which can be downloaded onto the machine, if it encounters problems it rebuilds the preferences file.

In a similar fashion you could have the script start by checking for a preferences file, and if it can't find it, get the information from the user to write it.

Regards,
David Hood
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Asking User Input on First Run only (From: Joseph Weaks <email@hidden>)

  • Prev by Date: Question regarding errors
  • Next by Date: GUI Scripting: Change Monitor Colors
  • Previous by thread: Asking User Input on First Run only
  • Next by thread: Re: Asking User Input on First Run only
  • Index(es):
    • Date
    • Thread