OK, I had never used the open handler so I needed to play a bit. It looks like it returns a list of files. I am not quite sure if the file items are themselves lists, but am working that out, it did appear that your repeat was not properly enclosing the logic.
I am going to break it down to a couple more handlers and then give it a try So, I will have a SetPagesExtension handler that will take arguments and return a POSIX file object with proper name for the save. I will also create a handler that will just open the given file and save it. again. For testing purposes, I created a run handler on run set aList to the files of Window 1 of Application Finder whose name contains ".docx" repeat with anItem in aList set NewName to SetPagesType(anItem ) try OpenAndClose(anItem, NewName) on error say "something went wrong" end try end repeat end run Best wishes, Jonathan > On Sep 26, 2016, at 4:21 PM, Tim Kilburn <kilbu...@me.com> wrote: > > Hi Jonathan, > > Using the below Apple Script compiled as an application: > > on open filist > repeat with lvar in filist > tell application "Finder" > set thename to name of lvar > end tell > set x to the offset of "." in thename set nuname to > text 1 thru text item x of thename > set nuname to text 1 thru text item x of thename > tell application "Pages" > activate > set filname to (path to desktop folder as text) & > nuname & "pages" > open lvar > save document 1 in filname > close every window saving no > end tell > end repeat > end open > > I'm having frustrations. How this normally should work, is that you would > drag and drop a Word file, or folder full of Word files on to my W2P app > icon. The app would then open the Word file, get rid of the .docx extension, > change it to a .pages extension then save the file on the Desktop. Doing > this manually, everything works as it should. Using the app, though, Pages > spins its wheels for a bit then returns an error. If I do the same action > with a Pages document instead, then it works properly. I have played with a > number of variations of this with no real good results as of yet. > > You, or anyone else is welcome to mess with it an d see if you can determine > how to make it work properly. > > Later... > > Tim Kilburn > Fort McMurray, AB Canada > > On Sep 25, 2016, at 10:09, Jonathan Cohn <jon.c.c...@gmail.com > <mailto:jon.c.c...@gmail.com>> wrote: > > I don't see a automator library for Pages, but certainly I would expect that > the standard save action in AppleScript should work. The question is how > would you want your batch processor to work probably the easiest would be to > create a folder and then create a folder action AppleScript for that folder. > > A lot of us use the folder action script that announces when a new file is > placed in the downloads folder, so I could see modifying this. > > How much interest is there in this? > > . > > > Best wishes, > > Jonathan > > > >> On Sep 25, 2016, at 6:41 AM, Anne Robertson <a...@anarchie.org.uk >> <mailto:a...@anarchie.org.uk>> wrote: >> >> Pages does not handle RTF, but opening a Word document in Pages and then >> saving it will convert the document to Pages format. >> >> Maybe Automator could be used for batch conversion. >> >> Cheers, >> >> Anne >> >> . >> >>> On 25 Sep 2016, at 03:51, Simon Fogarty <si...@blinky-net.com >>> <mailto:si...@blinky-net.com>> wrote: >>> >>> What about using an RTF format document? >>> >>> Surely RTF would be picked up by Pages >>> >>> -----Original Message----- >>> From: macvisionaries@googlegroups.com >>> <mailto:macvisionaries@googlegroups.com> >>> [mailto:macvisionaries@googlegroups.com >>> <mailto:macvisionaries@googlegroups.com>] On Behalf Of Kliphton Miller >>> Sent: Sunday, 25 September 2016 12:28 AM >>> To: macvisionaries@googlegroups.com <mailto:macvisionaries@googlegroups.com> >>> Subject: Word to pages batch converter? >>> >>> So, I have searched the App Store, googled, and came up with nothing. All >>> the apps that come up want to do pages to word, and pdf to word. So is >>> there an app that does word to pages, or am I reaching here? Thanks. >>> >>> -- >>> The following information is important for all members of the Mac >>> Visionaries list. >>> >>> If you have any questions or concerns about the running of this list, or if >>> you feel that a member's post is inappropriate, please contact the owners >>> or moderators directly rather than posting on the list itself. >>> >>> Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: >>> macvisionaries+modera...@googlegroups.com >>> <mailto:macvisionaries+modera...@googlegroups.com> and your owner is Cara >>> Quinn - you can reach Cara at caraqu...@caraquinn.com >>> <mailto:caraqu...@caraquinn.com> >>> >>> The archives for this list can be searched at: >>> http://www.mail-archive.com/macvisionaries@googlegroups.com/ >>> <http://www.mail-archive.com/macvisionaries@googlegroups.com/> >>> --- >>> You received this message because you are subscribed to the Google Groups >>> "MacVisionaries" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to macvisionaries+unsubscr...@googlegroups.com. >>> To post to this group, send email to macvisionaries@googlegroups.com. >>> Visit this group at https://groups.google.com/group/macvisionaries. >>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >>> The following information is important for all members of the Mac >>> Visionaries list. >>> >>> If you have any questions or concerns about the running of this list, or if >>> you feel that a member's post is inappropriate, please contact the owners >>> or moderators directly rather than posting on the list itself. >>> >>> Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: >>> macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - >>> you can reach Cara at caraqu...@caraquinn.com >>> >>> The archives for this list can be searched at: >>> http://www.mail-archive.com/macvisionaries@googlegroups.com/ >>> --- >>> You received this message because you are subscribed to the Google Groups >>> "MacVisionaries" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to macvisionaries+unsubscr...@googlegroups.com. >>> To post to this group, send email to macvisionaries@googlegroups.com. >>> Visit this group at https://groups.google.com/group/macvisionaries. >>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> The following information is important for all members of the Mac >> Visionaries list. >> >> If you have any questions or concerns about the running of this list, or if >> you feel that a member's post is inappropriate, please contact the owners or >> moderators directly rather than posting on the list itself. >> >> Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: >> macvisionaries+modera...@googlegroups.com >> <mailto:macvisionaries+modera...@googlegroups.com> and your owner is Cara >> Quinn - you can reach Cara at caraqu...@caraquinn.com >> <mailto:caraqu...@caraquinn.com> >> >> The archives for this list can be searched at: >> http://www.mail-archive.com/macvisionaries@googlegroups.com/ >> <http://www.mail-archive.com/macvisionaries@googlegroups.com/> >> --- >> You received this message because you are subscribed to the Google Groups >> "MacVisionaries" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to macvisionaries+unsubscr...@googlegroups.com. >> To post to this group, send email to macvisionaries@googlegroups.com. >> Visit this group at https://groups.google.com/group/macvisionaries. >> For more options, visit https://groups.google.com/d/optout. > > -- > The following information is important for all members of the Mac Visionaries > list. > > If you have any questions or concerns about the running of this list, or if > you feel that a member's post is inappropriate, please contact the owners or > moderators directly rather than posting on the list itself. > > Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: > macvisionaries+modera...@googlegroups.com > <mailto:macvisionaries+modera...@googlegroups.com> and your owner is Cara > Quinn - you can reach Cara at caraqu...@caraquinn.com > <mailto:caraqu...@caraquinn.com> > > The archives for this list can be searched at: > http://www.mail-archive.com/macvisionaries@googlegroups.com/ > <http://www.mail-archive.com/macvisionaries@googlegroups.com/> > --- > You received this message because you are subscribed to the Google Groups > "MacVisionaries" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to macvisionaries+unsubscr...@googlegroups.com. > To post to this group, send email to macvisionaries@googlegroups.com. > Visit this group at https://groups.google.com/group/macvisionaries. > For more options, visit https://groups.google.com/d/optout. > > > -- > The following information is important for all members of the Mac Visionaries > list. > > If you have any questions or concerns about the running of this list, or if > you feel that a member's post is inappropriate, please contact the owners or > moderators directly rather than posting on the list itself. > > Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: > macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you > can reach Cara at caraqu...@caraquinn.com > > The archives for this list can be searched at: > http://www.mail-archive.com/macvisionaries@googlegroups.com/ > <http://www.mail-archive.com/macvisionaries@googlegroups.com/> > --- > You received this message because you are subscribed to the Google Groups > "MacVisionaries" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to macvisionaries+unsubscr...@googlegroups.com > <mailto:macvisionaries+unsubscr...@googlegroups.com>. > To post to this group, send email to macvisionaries@googlegroups.com > <mailto:macvisionaries@googlegroups.com>. > Visit this group at https://groups.google.com/group/macvisionaries > <https://groups.google.com/group/macvisionaries>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- The following information is important for all members of the Mac Visionaries list. If you have any questions or concerns about the running of this list, or if you feel that a member's post is inappropriate, please contact the owners or moderators directly rather than posting on the list itself. Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you can reach Cara at caraqu...@caraquinn.com The archives for this list can be searched at: http://www.mail-archive.com/macvisionaries@googlegroups.com/ --- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at https://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.