Jump to content


Photo

Services problems in new Pages in Mavericks


  • Please log in to reply
38 replies to this topic

#21 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 06 November 2013 - 11:26 AM

FWIW, I would recommend Quicksilver. It is an open source launcher, been developed a very long time. There is a pack of Quicksilver Actions ready to download to work with the Accordance Script Library. They are actually more robust than using Services to interface with the Accordance Script Library.

 

I can not recommend Alfred.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#22 Ed Cross

Ed Cross

    Bronze

  • Active Members
  • PipPip
  • 90 posts
  • Gender:Male
  • Location:Attleboro, MA
  • Interests:King James Bible

Posted 06 November 2013 - 12:12 PM

Joe,

 

When I manually copy citation from Accordance and then paste into 4.3 the formatting is intact with superscripts and colors. With 5.0 the colors and superscript are gone. But if I copy what I manually pasted into 4.3 and then paste it into 5.0 the colors and superscripts stay. 



#23 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 06 November 2013 - 02:31 PM

Yeah, I thought as much. Pages 5 is limited and quirky in so many ways we can't keep track.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#24 Tony Lawrence

Tony Lawrence

    Gold

  • Active Members
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:McMinnville, TN
  • Interests:Hosting Bible Land Tours, Expository Preaching, My granddaughter
  • Accordance Version:10.x

Posted 06 November 2013 - 05:03 PM

Some very good news!

 

http://support.apple...US&locale=en_US


Tony Lawrence
biblelandphotos.org

#25 R. Mansfield

R. Mansfield

    Platinum

  • Accordance
  • 1,065 posts
  • Gender:Male
  • Location:Kentucky
  • Accordance Version:10.x

Posted 06 November 2013 - 05:08 PM

Some very good news!

 

http://support.apple...US&locale=en_US

 

I saw that earlier today, but I noticed it mentioned improvements for AppleScript in Numbers and Keynote, but not in Pages. I hope that was just an oversight. Why would they improve two components of iWork and not the third?



#26 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 06 November 2013 - 09:08 PM

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.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#27 Daniel Semler

Daniel Semler

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,248 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 06 November 2013 - 11:31 PM

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 tell
    
    
end tell
 

Or just restoring the old apps .... the new ones don't appear to offer a compelling reason to upgrade.

 

Thx

D


Edited by Daniel Semler, 06 November 2013 - 11:40 PM.

Accordance Configurations :

 

Mac : 2009 27" iMac                 Windows : HP 4540s laptop

      Intel Core Duo                          Intel i5 Ivy Bridge

      12GB RAM                                8GB RAM

      Accordance 10.4.3.2                     Accordance 10.4.3.2 and Aleph 10.4.3.2

      OSX 10.9 (Mavericks)                    Win 7 Professional x64 SP1


#28 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 07 November 2013 - 12:25 AM

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.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#29 Daniel Semler

Daniel Semler

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,248 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 07 November 2013 - 01:03 AM

OK makes sense. Thx D.


Accordance Configurations :

 

Mac : 2009 27" iMac                 Windows : HP 4540s laptop

      Intel Core Duo                          Intel i5 Ivy Bridge

      12GB RAM                                8GB RAM

      Accordance 10.4.3.2                     Accordance 10.4.3.2 and Aleph 10.4.3.2

      OSX 10.9 (Mavericks)                    Win 7 Professional x64 SP1


#30 Ed Cross

Ed Cross

    Bronze

  • Active Members
  • PipPip
  • 90 posts
  • Gender:Male
  • Location:Attleboro, MA
  • Interests:King James Bible

Posted 07 November 2013 - 07:20 AM

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 by Ed Cross, 07 November 2013 - 01:44 PM.


#31 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 07 November 2013 - 03:27 PM

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.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#32 Ed Cross

Ed Cross

    Bronze

  • Active Members
  • PipPip
  • 90 posts
  • Gender:Male
  • Location:Attleboro, MA
  • Interests:King James Bible

Posted 08 November 2013 - 09:00 AM

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


#33 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 08 November 2013 - 02:36 PM

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.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#34 Ed Cross

Ed Cross

    Bronze

  • Active Members
  • PipPip
  • 90 posts
  • Gender:Male
  • Location:Attleboro, MA
  • Interests:King James Bible

Posted 08 November 2013 - 02:58 PM

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?



#35 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 09 November 2013 - 01:30 AM

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.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#36 Ed Cross

Ed Cross

    Bronze

  • Active Members
  • PipPip
  • 90 posts
  • Gender:Male
  • Location:Attleboro, MA
  • Interests:King James Bible

Posted 09 November 2013 - 05:35 AM

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.”



#37 Ed Cross

Ed Cross

    Bronze

  • Active Members
  • PipPip
  • 90 posts
  • Gender:Male
  • Location:Attleboro, MA
  • Interests:King James Bible

Posted 13 November 2013 - 04:24 PM

Joe, 

 

I would like to be able to do this from within MS Word 2011 as I have given up on Pages. 



#38 Ed Cross

Ed Cross

    Bronze

  • Active Members
  • PipPip
  • 90 posts
  • Gender:Male
  • Location:Attleboro, MA
  • Interests:King James Bible

Posted 19 November 2013 - 11:27 AM

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. 



#39 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 19 November 2013 - 12:15 PM

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


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users