Joe Weaks Posted November 7, 2013 Share Posted November 7, 2013 I noticed that, too, Rick. Was less than happy. The AS dictionary is non-existent now in Pages. You can't do something as simple as get or put text in a document. The list would not, however, list something as trivial as incompatibility with certain types of Services. Hopeful that will make it in. Link to comment Share on other sites More sharing options...
Λύχνις Δαν Posted November 7, 2013 Share Posted November 7, 2013 (edited) Wouldn't a mod like : tell application "/Applications/iWork '09/Pages.app" enable you to continue using the scripts against the older version ? I can't seem to get the old sdef so I don't know if that would be an issue. Doesn't seem to be an issue. This script works on 09 but not on 5 : tell application "/Applications/iWork '09/Pages.app" activate get properties tell document 1 set docText to body text log docText end tellend tell Or just restoring the old apps .... the new ones don't appear to offer a compelling reason to upgrade. Thx D Edited November 7, 2013 by Daniel Semler Link to comment Share on other sites More sharing options...
Joe Weaks Posted November 7, 2013 Share Posted November 7, 2013 Daniel, You can provide full paths to apps in a tell block, using posix or mac paths. However, it's unnecessary. Your scripts will simply call whatever Pages app you have running. So, you just need to ensure you have the older, scriptable version of Pages running at the time. Link to comment Share on other sites More sharing options...
Λύχνις Δαν Posted November 7, 2013 Share Posted November 7, 2013 OK makes sense. Thx D. Link to comment Share on other sites More sharing options...
Ed Cross Posted November 7, 2013 Share Posted November 7, 2013 (edited) Joe, I can't get the quicksilver actions to "useCitation" format into even the old pages. Everything pastes in as plain text. If I manually copy as Citation and paste into Pages the size, color and superscript is intact. Is there something that I am missing to get the script to paste in the Citation format? In the "Insert Verses KJVS.scpt" I have the following lines: property outputTo : "pasteResult" -- Options: {"accordanceWindow", "returnResult", "pasteResult", "copyResult", "speakResult", "displayResult"} property useCitationFormat : true -- Options: {true, false} -- ignored if outputTo is "accordanceWindow" I have also modified the "Accordance Script Library.scpt" the same way. The Accordance Script Library is Version 1.10.1b1 Also, I am considering moving to MS Word 2011 because Apple just can't seem to get their act together regarding stability in it's iWorks functions from one version to the next. Can't afford to have workflow breaking every time they make an update. Having a problem with Quicksilver action in MS Word though, it doesn't always paste the verse, but will past whatever was last used in copy paste? Does Word access the clipboard differently? Edited November 7, 2013 by Ed Cross Link to comment Share on other sites More sharing options...
Joe Weaks Posted November 7, 2013 Share Posted November 7, 2013 Ed, You have a good awareness of how it works... you change the usCitationFormat property to true in the script or Action that you're calling and it will do that. Are you sure you're changing it in the correct script? (Changing it in the Accordance Script Library won't do anything, those are just placeholders). Microsoft Word does have its own pasteboard capability, and there can be issues, but I don't think this is one of them. If you are mainly using Word, I also published a Word Add-in Module that is written in Microsoft's native VBA language, as a proof of concept for interacting with the Accordance Script Library. It's included in the package. I'd have to test to see why your QS action is not correctly using citation format. You can feel free to email it to me to check out. Link to comment Share on other sites More sharing options...
Ed Cross Posted November 8, 2013 Share Posted November 8, 2013 Joe, what is you email address to send the QS action to? Also, tried to set up the Word Add-in Module and it errors out. Run-time error '5': Invalid procedure call or argument I used VBA to change the "whichModule" setting to "KJVS" in the Accordance Script Word Add-in.dotm. Set to the default of "1" it kept reporting that the book didn't exist and then returned the run-time error. Here is the macro as I have it now. Sub InsertVerses() ' ' InsertVerses Macro ' Queries a verse reference and then inserts that text using the Accordance Script Library —by Dr. Joe Weaks ' ' To work, Accordance Script Library must be installed at ~/Library/Scripts/ ' Go to macbiblioblog.blogspot.com for more info ' Dim searchString As String Dim scriptString As String Dim whichModule As String Dim useCitationFormat As String whichModule = "KJVS" ' setting to "1" will use the first text in you custom list ' Options: {"1", "2", "3", "4", "5", "6", "NRSVS", "NIV11", etc.} useCitationFormat = "true" ' set to true to use Accordance Citation format searchString = Selection.Text searchString = InputBox("Enter a verse reference to insert", "Accordance Script Library", searchString) scriptString = "set accScript to load script alias ((path to scripts folder from user domain as string) & ""Accordance Script Library.scpt"")" & Chr(13) & "tell accScript to lookupAccordance(""" & searchString & """, ""English Texts"", " & whichModule & ", ""Verses"", ""vba"", ""returnResult"", " & useCitationFormat & ", """")" searchString = MacScript(scriptString) Selection.TypeText searchString End Sub Link to comment Share on other sites More sharing options...
Joe Weaks Posted November 8, 2013 Share Posted November 8, 2013 Ed, Good for you for giving it a go. My instruction is incorrect on how to put a module name into the VBA macro. The line should be: whichModule = """KJVS""" Note, that is three quotation marks each time. (I can explain why if you REALLY wanna know. I do NOT understand why this isn't working for you: whichModule = "1" It works for me. Try the name with 3 " marks on each end. Link to comment Share on other sites More sharing options...
Ed Cross Posted November 8, 2013 Share Posted November 8, 2013 Joe, The triple quotation marks got it to work. I think that I may be misunderstanding the function of useCitationFormat. I was thinking that it would pull in the verses with all the coloring, superscripting and sizing based upon the settings in Citations in Accordance, but it appears to only control the layout of verses. If I set the useCitationFormat : true, I get the following results: (Mark 1:1–3 KJV) “1 The beginning of the gospel of Jesus Christ, the Son of God; 2 As it is written in the prophets, Behold, I send my messenger before thy face, which shall prepare thy way before thee. 3 The voice of one crying in the wilderness, Prepare ye the way of the Lord, make his paths straight.” If I set the useCitationFormat : false, I get the following results: Mark 1:1 ¶ The beginning of the gospel of Jesus Christ, the Son of God; Mark 1:2 As it is written in the prophets, Behold, I send my messenger before thy face, which shall prepare thy way before thee. Mark 1:3 The voice of one crying in the wilderness, Prepare ye the way of the Lord, make his paths straight. So, I just want to confirm if I am correct in thinking that the colors, sizes and superscripting of verse references actually aren't supposed to be part of the formatting when setting useCitationFormat to true? Link to comment Share on other sites More sharing options...
Joe Weaks Posted November 9, 2013 Share Posted November 9, 2013 Coloring, sizes, superscripting are not related to the Citation format. That's simply informing to use the custom Citation format in Accordance. The only way to keep the formatting is to copy the text from an Accordance window, instead of using the invisible API protocols that pull the text out. The script library with some work can quickly bring Accordance forward, open a window, do the search, copy the results with all formatting, close window and paste it back into your app, all in a few seconds. If that is an important option for you, I can point the way. Link to comment Share on other sites More sharing options...
Ed Cross Posted November 9, 2013 Share Posted November 9, 2013 Joe, If you can point the way please do. When you say "copy the results with all formatting" are you referring to getting the results that choosing Edit>Copy as Citation would give like? (Mark 1:1–3 KJV) “1 The beginning of the gospel of Jesus Christ, the Son of God; 2 As it is written in the prophets, Behold, I send my messenger before thy face, which shall prepare thy way before thee. 3 The voice of one crying in the wilderness, Prepare ye the way of the Lord, make his paths straight.” Link to comment Share on other sites More sharing options...
Ed Cross Posted November 13, 2013 Share Posted November 13, 2013 Joe, I would like to be able to do this from within MS Word 2011 as I have given up on Pages. Link to comment Share on other sites More sharing options...
Ed Cross Posted November 19, 2013 Share Posted November 19, 2013 Joe, Never mind about this. I played with bringing Accordance to the front by using the "accordanceWindow" setting and got it to work sort of. Ran into a problem if I only wanted a single verse as Accordance then gives you that single verse in it's context rather than the verse by itself. So, that made it a new go. I have modified your Accordance Word template macro, so that it superscripts the verse reference numbers in the verse paragraph, colors them and adds a style to the paragraph. Had to set Accordance preferences to have the passages reference on its own line to avoid superscripting it as well. My sermon prep workflow is back in business using MS Word instead of Pages now. Link to comment Share on other sites More sharing options...
Joe Weaks Posted November 19, 2013 Share Posted November 19, 2013 Joe, Never mind about this. I played with bringing Accordance to the front by using the "accordanceWindow" setting and got it to work sort of. Ran into a problem if I only wanted a single verse as Accordance then gives you that single verse in it's context rather than the verse by itself. So, that made it a new go. I have modified your Accordance Word template macro, so that it superscripts the verse reference numbers in the verse paragraph, colors them and adds a style to the paragraph. Had to set Accordance preferences to have the passages reference on its own line to avoid superscripting it as well. My sermon prep workflow is back in business using MS Word instead of Pages now. Ed, Glad my documentation was non-cryptic enough to get it working. Sorry I couldn't give more time, but days have been busy at church, and evening free time preparing for SBL and other projects. Joe Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now