Re: saving AW file as PDF
Re: saving AW file as PDF
- Subject: Re: saving AW file as PDF
- From: Kok Ooi Kong <email@hidden>
- Date: Tue, 22 Jul 2003 15:40:58 +0800
Hi,
Sorry, tested the scripts and found it doesn't work anymore.Found a
work around for the AppleWork part. Maybe there is some changes after
upgrading throught os x, the original script is not working any more.
Below is the script:
Also, You need to enable access to assistive devices first. Go to
System Preferences -> Universal Access and tick the Enable access to
assistive devices, in order to use GUI scripting. Make sure that System
Event is in Login Items. Then log out and log in again - to make sure
it is activated.
Purchase Prefab UI browser helps.
on open
tell application "Finder"
activate
display dialog "Selected folder must contain only Appleworks
Documents!"
set foldar to selection as text
set foldr to (characters 1 thru -2 of foldar) as text
open folder foldr
set wndw to front window
set filez to count every file of wndw
end tell
set counter to 0
repeat while counter is less than filez
set counter to counter + 1
tell application "AppleWorks 6"
activate
open file counter of wndw
end tell
tell application "System Events"
tell process "AppleWorks 6"
set frontmost to true
keystroke "p" with command down
delay 1
tell application "System Events"
if title of window 1 of process "appleworks 6" is not "Print" then
set frontmost of process "appleworks 6" to true
keystroke return
end if
end tell
tell window "Print"
tell pop up button 1
click
tell menu 1
click menu item "Output Options"
delay 1
end tell
end tell
click check box "Save as File" of UI element 1 of UI element 5
delay 1
click button "Save..." of UI element 6
delay 1
end tell
tell window "Save to File"
tell pop up button 1
click
tell menu 1
click menu item "Desktop"
delay 1
end tell
end tell
click button "Save"
delay 1
end tell
end tell
end tell
tell application "AppleWorks 6" to close front document
end repeat
tell application "Finder"
activate
close wndw
display dialog "Conversion complete!"
end tell
end open
mOn Tuesday, Jul 22, 2003, at 14:43 Asia/Kuala_Lumpur, Gerd Wilmer
wrote:
>
You mean in OS X?
>
>
>
On Tuesday, Jul 22, 2003, at 16:40 Australia/Sydney, Kok Ooi Kong
>
wrote:
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
>
> Hash: SHA1
>
>
>
> I have been using both scripts without problem. Files are saved in
>
> pdf format. Sorry, can't help you then.
>
>
>
> On Tuesday, Jul 22, 2003, at 08:33 Asia/Kuala_Lumpur, Gerd Wilmer
>
> wrote:
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
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.