• 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: Weird behavior - Script saved as application...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird behavior - Script saved as application...


  • Subject: Re: Weird behavior - Script saved as application...
  • From: dev_sleidy <email@hidden>
  • Date: Fri, 7 Apr 2006 23:35:37 -0400

Code that works in 'Script Editor' and when an applet is created ...

set currentDate to (current date)
set dataDeHoje to formatDate(currentDate)

on formatDate(_date)
 set _day to day of _date as string
 if ((count _day) < 2) then set _day to "0" & _day

 set _month to month of _date as number as string
 if ((count _month) < 2) then set _month to "0" & _month

 set _year to year of _date
 display dialog _day & "." & _month & "." & _year
end formatDate

... or you could just use ...

set tDate to do shell script "date +%d.%m.%Y"
display dialog tDate

_______________________________________________
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


References: 
 >Weird behavior - Script saved as application... (From: Bernardo Höhl <email@hidden>)

  • Prev by Date: Re: Weird behavior - Script saved as application...
  • Next by Date: Re: Opening contact in Address Book to edit
  • Previous by thread: Re: Weird behavior - Script saved as application...
  • Next by thread: Setting print parameters
  • Index(es):
    • Date
    • Thread