• 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
'vCard' exporting with 'Palm Desktop' Version 4.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'vCard' exporting with 'Palm Desktop' Version 4.1


  • Subject: 'vCard' exporting with 'Palm Desktop' Version 4.1
  • From: email@hidden
  • Date: Sun, 08 Jun 2003 11:43:28 -0400

When I, not via AppleScript, launch 'Palm Desktop' v. 4.1 and select the 'File, Export...' Menu.

With the following 'Export: Palm Desktop' Window's PopUp Menu selections:
Module: 'Addresses'
Item: ... and selection is fine here ...
Format: 'vCard'
and Name: set as 'PalmDemo.vcf' [yes, the '.vcf' is needed by Apple's 'Address Book']

... and then pressing the 'Export' Button results with a File of type 'vCard' is created and can be properly imported by Apple's 'Address Book'.

If i run the AppleScript Code below:

----- Script starts here -----

-- launch 'Palm Desktop' and activate it
set theFile to "Palm-vCard.vcf" -- name the Variable 'theFile' to 'Exported_vCard.vcf'
tell application "Palm Desktop" -- launch 'Palm Desktop'
activate -- needed to bring forward if already running, but in the background

tell application "System Events" -- launch 'System Events' to capture Menu Items and Controls

tell process "Palm Desktop" -- select 'Palm Desktop' Process
click menu item "Address List" of menu "View" of menu bar 1 -- select 'Address List' Window
tell window 1
keystroke theFile -- simulate entering Text into Text Box
click pop up button 1
click ((menu item "vCard" of menu) of pop up button 1) -- choose 'vCard' Format
click button "Export"
end tell
end tell
end tell
quit -- quit 'Palm Desktop'Application
end tell

-- the resultant File is not of type 'vCrd' and 'POrg' so I use 'Finder' to change that.
tell application "Finder"
set (file type of file theFile) to "vCrd"
set (creator type of file theFile) to "POrg"
end tell

----- Script ends here ----

First - without the 'tell application 'Finder" ...' end tell' a File of type 'VCard' is created [not 'vCard'].
Either way - the resultant File is not of the 'vCard' Format. It is as if the 'vCard' PopUp Menu Item selection is not being accepted by 'Palm Desktop'.

If one were, in Person, to select either the 'Tab & Return' or 'Palm Desktop' Menu Item from the 'Module:' PopUp Menu, and press the 'Export' Button, then the same File Format would be produced as per my Script.

Questions: Did I miss or enter some Code incorrectly? Or, is the Code correct and 'Palm Desktop' is just not creating the '.vcf' File in the Format I selected from the 'Module:' PopUp Menu?


Anyway, once I have an actual 'vCard' formatted '.vcf' File, the following Code does import it correctly into Apple's Address Book

-- run "Address Book" to import the Data from "Palm-vCard.vcf" File.
tell application "Address Book" to activate

-- use 'System Events" to access 'Address Book"s Menu "File" Item.
tell application "System Events"
tell process "Address Book"
keystroke "d" with command down
keystroke "Palm-vCard.vcf"
click button "Open" of window "Select vCards to import"
end tell
end tell

-- Quit "Address Book"
ignoring application responses
tell application "Address Book" to quit
end ignoring

-----

Using dual 500 MHz G4 PowerPC PowerMac, 1 GB RAM, 280+ GB HDD; MacOS X 10.2.6, Script Editor 1.9, etc.

-----

Any Input is appreciated. Thank you.


Sincerely,

--

Samuel
_______________________________________________
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.

  • Prev by Date: QuickTime Player records this but won't play it
  • Next by Date: Re: Delete me...
  • Previous by thread: QuickTime Player records this but won't play it
  • Next by thread: AS1.8.3 / OS 9.1.2 / Smile 1.8.8
  • Index(es):
    • Date
    • Thread