• 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: Multiple variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple variables


  • Subject: Re: Multiple variables
  • From: KOENIG Yvan <email@hidden>
  • Date: Tue, 22 Jun 2010 21:44:24 +0200


Le 22 juin 2010 à 20:38, Joy a écrit :


delay 5
tell me to activate
property loginname : ""
display dialog "Enter your loginname without the container:" default answer loginname
set the loginname to text returned of the result
property department : ""
display dialog "Enter your Department:" default answer department
set the department to text returned of the result
do shell script ("echo " & loginname & " " & department & " | / Library/Scripts/Custom/adbind.sh")

You just failed to apply the basic requirements:

Properties must be defined before the run, implicit or explicit

In your code there is an implicit run just before the delay instruction.

You must edit this way :


property loginname : ""
property department : ""

delay 5
tell me to activate
display dialog "Enter your loginname without the container:" default answer loginname
set the loginname to text returned of the result
display dialog "Enter your Department:" default answer department
set the department to text returned of the result
do shell script ("echo " & loginname & " " & department & " | / Library/Scripts/Custom/adbind.sh")

For my own use I will use :

property loginname : ""
property department : ""
on run
delay 5
tell me to activate
display dialog "Enter your loginname without the container:" default answer loginname
set the loginname to text returned of the result
display dialog "Enter your Department:" default answer department
set the department to text returned of the result
do shell script ("echo " & loginname & " " & department & " | / Library/Scripts/Custom/adbind.sh")
end run

Yvan KOENIG (VALLAURIS, France) mardi 22 juin 2010 21:44:18



_______________________________________________
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
References: 
 >Multiple variables (From: Joy <email@hidden>)

  • Prev by Date: Re: Multiple variables
  • Next by Date: Fwd: System Events: window id's instead of window names?
  • Previous by thread: Re: Multiple variables
  • Next by thread: Re: Multiple variables
  • Index(es):
    • Date
    • Thread