• 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: Can we use applescript in packagemaker as postflight script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can we use applescript in packagemaker as postflight script?


  • Subject: Re: Can we use applescript in packagemaker as postflight script?
  • From: Dennet Menezes <email@hidden>
  • Date: Thu, 15 Feb 2007 11:36:09 +0530

Title: Re: Can we use applescript in packagemaker as postflight script?
Hi Manish,

As long as you are not displaying dialogs from your apple script, you could try saving the script as a .scpt file itself into your packages resources folder and calling it from your postflight shell script using the osascript tool like this

pathtoscript=$1/Contents/Resources/MyAppleScript.scpt

`osascript "$pathtoscript"`

Thanks
Dennet.



On 2/15/07 11:16 AM, "Manish Chaturvedi" <email@hidden> wrote:

Hi List,
 
I am creating package of my application where I am using an apple script that I want to run as “postflight” script in the resource folder. Script looks some thing like this.
In this script I am setting the values corresponding keys “LastSyncSessionTime” and " LastSyncSessionTimeContact" to “none” in the plist of application.
 
.   
 set myPlist to "com.apple.myApp"
set someFile to ((path to preferences as Unicode text) & myPlist & ".plist")
try
           someFile as alias
           set mycal to do shell script "defaults read " & myPlist & " LastSyncSessionTime"
           set myaddressbook to do shell script "defaults read " & myPlist & " LastSyncSessionTimeContact"
           -- edit values to calValue & addressbookValue
           set calValue to "none"
           set addressbookValue to "none"
           do shell script "defaults write " & myPlist & " LastSyncSessionTime  " & calValue
           do shell script "defaults write " & myPlist & " LastSyncSessionTimeContact " & addressbookValue
           
on error
           --display dialog "File not exists"
end try
 
I want this script to run after performing installation of application. Unfortunately this is not working when placed in the resource folder as postflight script.
I am saving the apple script as application. My Mac version is 10.4.8 and package maker’s version is 2.2.2(123).
Is there is any way to use Apple Script in package maker?  
 
Any help is useful.
 
Thanks and Regards,
Manish
 
 


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


-----------------------------------------------
Robosoft Technologies - Come home to Technology
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can we use applescript in packagemaker as postflight script?
      • From: Scott Russell <email@hidden>
References: 
 >Can we use applescript in packagemaker as postflight script? (From: "Manish Chaturvedi" <email@hidden>)

  • Prev by Date: Can we use applescript in packagemaker as postflight script?
  • Next by Date: Re: Can we use applescript in packagemaker as postflight script?
  • Previous by thread: Can we use applescript in packagemaker as postflight script?
  • Next by thread: Re: Can we use applescript in packagemaker as postflight script?
  • Index(es):
    • Date
    • Thread