Classic App Scripting
Classic App Scripting
- Subject: Classic App Scripting
- From: Steven Valenti <email@hidden>
- Date: Tue, 24 Feb 2004 13:53:21 -0500
For the iLife of me I can not see why I can't export a file out of
CorelDRAW 8. Yeah, an old classic app.(If anyone knows an osx program
that can import a cgm, apply a .0004 line stroke to the artwork, and
export as a plt file, please let me know.) My problem is I can't get
NewFile.plt to be the name of the exported file in Example A and the
save dialog box always comes up. In Example B I have become desperate
and was able to name the file but the save dialog comes up and you have
to manually click save in the correct folder. Maybe this old
application never could do everything? This is only part of a large
file conversion that is in two other apps. Can anyone see why this
isn't working? Any ideas given I will try since this isn't an app that
will most likely be on a lot of CPUs.
Thanks
-->Example A
set PathToFolder to ((path to desktop) as string) & "FolderWithCgm:" as
string
set DesktopCgm to PathToFolder & "Test.cgm" as alias
set NewFilePlt to PathToFolder & "NewFile.plt" as file specification
tell application "CorelDRAW 8"
activate
FileOpen FileName DesktopCgm
--do stuff
FileExport FileName NewFilePlt FilterId 1281 Width 300 Height 300
XResolution 150 YResolution 150 ImageType 3 Antialiasing 0 with
Overwrite
end tell
-->Example B
set PathToFolder to ((path to desktop) as string) & "FolderWithCgm:" as
string
set DesktopCgm to PathToFolder & "Test.cgm" as alias
set NewFilePlt to PathToFolder & "NewFile.plt" as file specification
tell application "CorelDRAW 8"
activate
FileNew
FileSave FileName NewFilePlt
FileOpen FileName DesktopCgm
SelectAllObjects
CopyToClipboard
FileClose without PromptUser
PasteFromClipboard
--do stuff
FileExport FileName NewFilePlt FilterId 1281 Width 300 Height 300
XResolution 150 YResolution 150 ImageType 3 Antialiasing 0 with
Overwrite
end tell
-->Dictionary
FileExport: Saves the active document in another format
FileExport
FileName file specification -- Name and path of file to be exported
FilterId integer -- Code of format to export to
Width integer -- Image width in pixels
Height integer -- Image height in pixels
XResolution integer -- Horizontal resolution in dots per inch
YResolution integer -- Vertical resolution in dots per inch
ImageType integer -- Code of Image Type
[Antialiasing integer] -- 0:None 1:Normal 2:Super-Sampling
[Overwrite boolean] -- with:Overwrites if file exists
FileNew: Creates a new CorelDRAW document
FileNew
FileOpen: Opens a saved CorelDRAW document
FileOpen
FileName file specification -- Name and path of the document
Result: boolean
FileSave: Saves the active document
FileSave
FileName file specification -- Name and path of the file to be saved
ThumbNailSize integer -- Thumbnail size number
SaveSelectedOnly boolean -- with:Saves only selected objects
without:Saves the entire document
FileVersion integer -- Version of document to be saved 0=v8.0
1=v5.0 2=v6.0 3=v7.0
IncludeCMXData boolean -- with:Includes CMX data in the saved file
_______________________________________________
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.