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

Weird behavior - Script saved as application...


  • Subject: Weird behavior - Script saved as application...
  • From: Bernardo Höhl <email@hidden>
  • Date: Fri, 7 Apr 2006 17:01:15 -0300

Hi List,

Why does this script work when I run it from script editor, and when I save it as an application doesn't?

I get:

"Every character of 7 doesn't understand the count message."

Thanks!

Bernardo Höhl
Rio de Janeiro - Brazil


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

on formatDate(_date)
    set _day to day of _date

    

    if (count of characters of _day) as text < 2 then
        set _day to "0" & _day
    end if

    

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

    

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

    

end formatDate
 _______________________________________________
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: Weird behavior - Script saved as application...
      • From: dev_sleidy <email@hidden>
    • Re: Weird behavior - Script saved as application...
      • From: Paul Berkowitz <email@hidden>
    • Re: Weird behavior - Script saved as application...
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Store script as run only
  • Next by Date: Re: Store script as run only
  • Previous by thread: Re: Dynamic Handler Call
  • Next by thread: Re: Weird behavior - Script saved as application...
  • Index(es):
    • Date
    • Thread