Avoiding repetition
Avoiding repetition
- Subject: Avoiding repetition
- From: Bernard Azancot <email@hidden>
- Date: Thu, 15 Jul 2004 21:14:43 +0200
Still another basic newbie question:
The following script has no problem. I just would like to know if it is
possible to improve its "coding style" .
(* Pseudo Script Start *)
-- Note that "action" is the action performed, always the same
(delete/copy), but in a different folder each different day of the week
(backup purpose)
If myday = Monday then
action to folder A
else If myday = Tuesday then
action to folder B
...
...
else if myday = Sunday then
action to folder G
(* Pseudo Script End *)
Is there a way to avoid repeating 7 times the same boring code lines
with 2 bound variables (day and folder) ?
Thanks in advance.
BA
_______________________________________________
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.