Help with workflows

Page 1 of 2 (22 items) 1 2 Next >
This post has 21 Replies | 3 Followers

Posts 63
Mike Hogue | Forum Activity | Posted: Mon, Dec 14 2020 9:19 AM

I'm interested in making a workflow that can open specific resources using the reference put into the input box when starting the workflow.  For example, I'd love to be able to have one of the steps be to check Carson and Beale's Commentary on the NT use of the OT.  I can put in a link to that book (by copying the location using the three-dot menu for the reference, and then using that as a link) but it will be tagged to whatever location I had in the shortcut rather than the target for the workflow.

I can also copy searches.  For example:

https://ref.ly/logos4/Search?kind=BasicSearch&q=John+3%3a16&match=nostem&in=raw%3aCollection%7cCollectionName%3dTag%253dSermons%257cTitle%253dSermons

searches references I've tagged with "Sermons" for John 3:16.  It's just always John 3:16.  If I could grab the content of the workflow input box and somehow use that in my own searches, it would be extremely helpful. It would then be easier to specifically get what I'm after.

Is there an easy way to do this?

Thanks in advance,

Mike

Posts 30882
Forum MVP
MJ. Smith | Forum Activity | Replied: Sat, Dec 19 2020 4:45 PM

bump 6

Orthodox Bishop Hilarion Alfeyev: "To be a theologian means to have experience of a personal encounter with God through prayer and worship."

Posts 63
Mike Hogue | Forum Activity | Replied: Tue, Dec 22 2020 11:48 AM

Thanks MJ - by "bump 6" are you helping the post stay current?  I guess I'm not familiar with that terminology!

Posts 30882
Forum MVP
MJ. Smith | Forum Activity | Replied: Tue, Dec 22 2020 5:27 PM

Yes, bumping keeps the post current. The 6 is simply to make it past the spam detector.

Orthodox Bishop Hilarion Alfeyev: "To be a theologian means to have experience of a personal encounter with God through prayer and worship."

Posts 30882
Forum MVP
MJ. Smith | Forum Activity | Replied: Tue, Dec 22 2020 5:30 PM

Since no one has provided an answer and I haven't tried to solve the problem, have you played with opening to an inline search or using a multiview window?

Orthodox Bishop Hilarion Alfeyev: "To be a theologian means to have experience of a personal encounter with God through prayer and worship."

Posts 346
Lonnie Spencer | Forum Activity | Replied: Tue, Dec 22 2020 9:29 PM

The only way I can think of to get the Commentary on the New Testament Use of the Old Testament into the work flow so it will move with the workflow text is to prioritize the Commentary on the New Testament use of the Old Testament  with your other prioritized commentaries in your library so it would show up in the commentary step of your workflow. I'm hoping there is a better way that someone else comes along with.

Posts 63
Mike Hogue | Forum Activity | Replied: Wed, Dec 23 2020 7:41 AM

MJ - to your questions I haven't -- although a super-quick test does seem to show multi-view may work for a versified reference. 

I have two thoughts with this approach, though:

1. I'd like it to be more generic....i.e. the NT use of the Old commentary isn't necessarily the only book I'd like to be able to do this with.  I have other non-versified references as well that I'd love to be able to open with a search for the specific verse using the workflow. As above, I can specify the verse outright (as in the search in my first post) but this is rather inflexible.

2. The multi-view approach does have some promise for versified references -- although I'd be a little more intensive if I had several books I were trying to do this with. I'd probably have to manually uncheck/recheck references to have enough screen real estate to make this useful.  If I wanted to try this approach in my normal workflow with five different references, for example, I'd have the Bible +5 or a 6-way split, unless most of these resources were somehow set up yet unchecked.  Normally I use multi-view for other languages -- e.g. BHS, NA, UBS, and the LXX.  

I appreciate the thoughts!  Keep them coming!  I'd *love* for the workflow process to be able to be a more-robust checklist for me on Bible-study or sermon prep...it just doesn't quite feel there yet.

Posts 397
PJ | Forum Activity | Replied: Wed, Dec 23 2020 9:08 AM

Mike,

I know most users fear the ComAPI. However, this is the easiest solution for a generic approach. With a little creativity, a lot can be accomplished. Here's an example of how I approached the issue in AutoHotkey. It can be easily translated into any other language.

1) Get the running Logos Instance

2) Attach EventHandling for the Application

3) Handle the Panel Opened Event

4) Loop all Open Panels and find the Workflow (only one should be open)

5) Strip the Reference

6) Create a Navigation Request

7) Parse the reference as a LogosDataTypeReference

8) Set the Navigation Request's Reference to the one you Parsed in step 7

9) Navigate the Opened Panel

10) break out of the loop to exit the EventHandler

CODE

#SingleInstance Force
#Persistent 
;Get the running Logos Instance app := ComObjActive("LogosBibleSoftware.Application")

;Attach EventHandling for the Application ComObjConnect(app,"app_") return
;Handle the Panel Opened Event app_PanelOpened(Panel){ global app for p in app.GetOpenPanels { if (p.Kind = "Workflow") { title := p.Title s := StrSplit(title,"|") ref := s[2] nr := app.CreateNavigationRequest ref := app.DataTypes.GetDataType("Bible").ParseReference(ref) nr.Reference := ref Panel.navigate(nr) break } } }

Posts 63
Mike Hogue | Forum Activity | Replied: Wed, Dec 23 2020 10:33 AM

PJ - this is helpful!  I wish the functionality were a little more straightforward, but I can work with this some.  

I was able to find the documentation for the Logos COM API (which I didn't know was available) at https://wiki.logos.com/Logos_4_COM_API.

That said (and I haven't researched this much), off the top of your head do you know how to insert a script call, such as the one you've written here, as something to be run as a step in the workflow?  Adding a step in the workflow seems to be pretty limited to text or pre-defined sections of already existing guides. Is there an easy way to link running the script to a shortcut?

Posts 397
PJ | Forum Activity | Replied: Wed, Dec 23 2020 7:48 PM

Mike Hogue:
off the top of your head do you know how to insert a script call, such as the one you've written here, as something to be run as a step in the workflow?

I think it would be somehow possible to insert a hyperlink into a Text Field to execute a script from the Workflow. I'll take a look.

Through many tests with the ComAPI I have found that a Script that monitors in the background is much better than a link from a Workflow.

I'm interested in what you're trying to do and how it fits into the workflow process. Maybe I already have a script that does exactly that. Which OS do you use Win or Mac.



Posts 397
PJ | Forum Activity | Replied: Wed, Dec 23 2020 7:57 PM

PJ:
I think it would be somehow possible to insert a hyperlink into a Text Field to execute a script from the Workflow.

Use the file protocol in your link. For a vbs script it would look like this:

file:///D:/Script.vbs

Posts 397
PJ | Forum Activity | Replied: Wed, Dec 23 2020 8:46 PM

Following is a sample on how to go about to impliment this for any Uri in Logos using the logos4 protocol. The sam elogic can be used for any kind of uri.

Hope this helps:

/*
This is to create a Search Link from a Workflow to do a specific Search with the Workflow's Reference
Just Replace the UriTemaplate's value with your logos4 uri
Then Copy the Reference part exactly to the WhatToReplaceWithTheReference variable
Add a File protocol link in your Workflow
file:///C:/ThisScriptsTitle.ahk
*/
#SingleInstance  

app := ComObjActive("LogosBibleSoftware.Application")
UriTemplate := "logos4:Search;kind=BibleSearch;q=Jesus;match=stem;exactref=true;in=raw:Single$7CResourceId$3DLLS:1.0.630;references=bible$2Bafr1983.64.3"
WhatToReplaceWithTheReference := "bible$2Bafr1983.64.3" ;The Reference part in the above uri

title := Panel.Title
s := StrSplit(title,"|")
ref := s[2]

ref := app.DataTypes.GetDataType("Bible").ParseReference(ref)
newRef := ref.Render("long")
StringReplace,newRef,newRef,title,1
newRef := SaveRefAsKey(newRef)
StringReplace, uri, UriTemplate, WhatToReplaceWithTheReference, %newRef%
StringReplace,uri, uri,%A_Space%,$2B
app.executeuri(uri)


SaveRefAsKey(ref){
	global app 
	LDTR := app.DataTypes.GetDataType("Bible").ParseReference(ref)

	rangeStart := LDTR.RangeStart.Render("long")
	rangeEnd := LDTR.RangeEnd.Render("long")
	
	StringReplace, rangeStart, rangeStart,:,.,All
	StringReplace, rangeStart, rangeStart,Genesis,bible.1,All
	StringReplace, rangeStart, rangeStart,Exodus,bible.2,All
	StringReplace, rangeStart, rangeStart,Leviticus,bible.3,All
	StringReplace, rangeStart, rangeStart,Numbers,bible.4,All
	StringReplace, rangeStart, rangeStart,Deuteronomy,bible.5,All
	StringReplace, rangeStart, rangeStart,Joshua,bible.6,All
	StringReplace, rangeStart, rangeStart,Judges,bible.7,All
	StringReplace, rangeStart, rangeStart,Ruth,bible.8,All
	StringReplace, rangeStart, rangeStart,1 Samuel,bible.9,All
	StringReplace, rangeStart, rangeStart,2 Samuel,bible.10,All
	StringReplace, rangeStart, rangeStart,1 Kings,bible.11,All
	StringReplace, rangeStart, rangeStart,2 Kings,bible.12,All
	StringReplace, rangeStart, rangeStart,1 Chronicles,bible.13,All
	StringReplace, rangeStart, rangeStart,2 Chronicles,bible.14,All
	StringReplace, rangeStart, rangeStart,Ezra,bible.15,All
	StringReplace, rangeStart, rangeStart,Nehemiah,bible.16,All
	StringReplace, rangeStart, rangeStart,Esther,bible.17,All
	StringReplace, rangeStart, rangeStart,Job,bible.18,All
	StringReplace, rangeStart, rangeStart,Psalm,bible.19,All
	StringReplace, rangeStart, rangeStart,Proverbs,bible.20,All
	StringReplace, rangeStart, rangeStart,Ecclesiastes,bible.21,All
	StringReplace, rangeStart, rangeStart,Song of Solomon,bible.22,All
	StringReplace, rangeStart, rangeStart,Isaiah,bible.23,All
	StringReplace, rangeStart, rangeStart,Jeremiah,bible.24,All
	StringReplace, rangeStart, rangeStart,Lamentations,bible.25,All
	StringReplace, rangeStart, rangeStart,Ezekiel,bible.26,All
	StringReplace, rangeStart, rangeStart,Daniel,bible.27,All
	StringReplace, rangeStart, rangeStart,Hosea,bible.28,All
	StringReplace, rangeStart, rangeStart,Joel,bible.29,All
	StringReplace, rangeStart, rangeStart,Amos,bible.30,All
	StringReplace, rangeStart, rangeStart,Obadiah,bible.31,All
	StringReplace, rangeStart, rangeStart,Jonah,bible.32,All
	StringReplace, rangeStart, rangeStart,Micah,bible.33,All
	StringReplace, rangeStart, rangeStart,Nahum,bible.34,All
	StringReplace, rangeStart, rangeStart,Habakkuk,bible.35,All
	StringReplace, rangeStart, rangeStart,Zephaniah,bible.36,All
	StringReplace, rangeStart, rangeStart,Haggai,bible.37,All
	StringReplace, rangeStart, rangeStart,Zechariah,bible.38,All
	StringReplace, rangeStart, rangeStart,Malachi,bible.39,All
	StringReplace, rangeStart, rangeStart,Tobit,bible.40,All
	StringReplace, rangeStart, rangeStart,Judith,bible.41,All
	StringReplace, rangeStart, rangeStart,Additions to Esther,bible.42,All
	StringReplace, rangeStart, rangeStart,Wisdom of Solomon,bible.43,All
	StringReplace, rangeStart, rangeStart,Sirach,bible.44,All
	StringReplace, rangeStart, rangeStart,Baruch,bible.45,All
	StringReplace, rangeStart, rangeStart,Letter of Jeremiah,bible.46,All
	StringReplace, rangeStart, rangeStart,Song of Three Youths,bible.47,All
	StringReplace, rangeStart, rangeStart,Susanna,bible.48,All
	StringReplace, rangeStart, rangeStart,Bel and the Dragon,bible.49,All
	StringReplace, rangeStart, rangeStart,1 Maccabees,bible.50,All
	StringReplace, rangeStart, rangeStart,2 Maccabees,bible.51,All
	StringReplace, rangeStart, rangeStart,1 Esdras,bible.52,All
	StringReplace, rangeStart, rangeStart,Prayer of Manasseh,bible.53,All
	StringReplace, rangeStart, rangeStart,Additional Psalm,bible.54,All
	StringReplace, rangeStart, rangeStart,3 Maccabees,bible.55,All
	StringReplace, rangeStart, rangeStart,2 Esdras,bible.56,All
	StringReplace, rangeStart, rangeStart,4 Maccabees,bible.57,All
	StringReplace, rangeStart, rangeStart,Ode,bible.58,All
	StringReplace, rangeStart, rangeStart,Psalms of Solomon,bible.59,All
	StringReplace, rangeStart, rangeStart,Epistle to the Laodiceans,bible.60,All
	StringReplace, rangeStart, rangeStart,Matthew,bible.61,All
	StringReplace, rangeStart, rangeStart,Mark,bible.62,All
	StringReplace, rangeStart, rangeStart,Luke,bible.63,All
	StringReplace, rangeStart, rangeStart,John,bible.64,All
	StringReplace, rangeStart, rangeStart,Acts,bible.65,All
	StringReplace, rangeStart, rangeStart,Romans,bible.66,All
	StringReplace, rangeStart, rangeStart,1 Corinthians,bible.67,All
	StringReplace, rangeStart, rangeStart,2 Corinthians,bible.68,All
	StringReplace, rangeStart, rangeStart,Galatians,bible.69,All
	StringReplace, rangeStart, rangeStart,Ephesians,bible.70,All
	StringReplace, rangeStart, rangeStart,Philippians,bible.71,All
	StringReplace, rangeStart, rangeStart,Colossians,bible.72,All
	StringReplace, rangeStart, rangeStart,1 Thessalonians,bible.73,All
	StringReplace, rangeStart, rangeStart,2 Thessalonians,bible.74,All
	StringReplace, rangeStart, rangeStart,1 Timothy,bible.75,All
	StringReplace, rangeStart, rangeStart,2 Timothy,bible.76,All
	StringReplace, rangeStart, rangeStart,Titus,bible.77,All
	StringReplace, rangeStart, rangeStart,Philemon,bible.78,All
	StringReplace, rangeStart, rangeStart,Hebrews,bible.79,All
	StringReplace, rangeStart, rangeStart,James,bible.80,All
	StringReplace, rangeStart, rangeStart,1 Peter,bible.81,All
	StringReplace, rangeStart, rangeStart,2 Peter,bible.82,All
	StringReplace, rangeStart, rangeStart,1 John,bible.83,All
	StringReplace, rangeStart, rangeStart,2 John,bible.84,All
	StringReplace, rangeStart, rangeStart,3 John,bible.85,All
	StringReplace, rangeStart, rangeStart,Jude,bible.86,All
	StringReplace, rangeStart, rangeStart,Revelation,bible.87,All
	StringReplace, rangeStart, rangeStart,Enoch,bible.88,All
	StringReplace, rangeStart, rangeStart,Plea for Deliverance,bible.89,All
	StringReplace, rangeStart, rangeStart,Apostrophe to Zion,bible.90,All
	StringReplace, rangeStart, rangeStart,Eschatological Hymn,bible.91,All
	StringReplace, rangeStart, rangeStart,Apostrophe to Judah,bible.92,All
	StringReplace, rangeStart, rangeStart,Hymn to the Creator,bible.93,All
	StringReplace, rangeStart, rangeStart,Davids Compositions,bible.94,All
	StringReplace, rangeStart, rangeStart,Apocryphal Psalms,bible.95,All
	StringReplace, rangeStart, rangeStart,Apocalypse of Baruch,bible.96,All
	StringReplace, rangeStart, rangeStart,Epistle of Baruch,bible.97,All
	StringReplace, rangeStart, rangeStart,Additions to Daniel,bible.98,All
	StringReplace, rangeStart, rangeStart,2 Baruch,bible.99,All
	StringReplace, rangeStart, rangeStart,4 Ezra,bible.100,All
	StringReplace, rangeStart, rangeStart,Catena,bible.101,All
	StringReplace, rangeStart, rangeStart,Psalm 151A,bible.102,All
	StringReplace, rangeStart, rangeStart,Psalm 151B,bible.103,All


	StringReplace, rangeEnd, rangeEnd,:,.,All
	StringReplace, rangeEnd, rangeEnd,Genesis,bible.1,All
	StringReplace, rangeEnd, rangeEnd,Exodus,bible.2,All
	StringReplace, rangeEnd, rangeEnd,Leviticus,bible.3,All
	StringReplace, rangeEnd, rangeEnd,Numbers,bible.4,All
	StringReplace, rangeEnd, rangeEnd,Deuteronomy,bible.5,All
	StringReplace, rangeEnd, rangeEnd,Joshua,bible.6,All
	StringReplace, rangeEnd, rangeEnd,Judges,bible.7,All
	StringReplace, rangeEnd, rangeEnd,Ruth,bible.8,All
	StringReplace, rangeEnd, rangeEnd,1 Samuel,bible.9,All
	StringReplace, rangeEnd, rangeEnd,2 Samuel,bible.10,All
	StringReplace, rangeEnd, rangeEnd,1 Kings,bible.11,All
	StringReplace, rangeEnd, rangeEnd,2 Kings,bible.12,All
	StringReplace, rangeEnd, rangeEnd,1 Chronicles,bible.13,All
	StringReplace, rangeEnd, rangeEnd,2 Chronicles,bible.14,All
	StringReplace, rangeEnd, rangeEnd,Ezra,bible.15,All
	StringReplace, rangeEnd, rangeEnd,Nehemiah,bible.16,All
	StringReplace, rangeEnd, rangeEnd,Esther,bible.17,All
	StringReplace, rangeEnd, rangeEnd,Job,bible.18,All
	StringReplace, rangeEnd, rangeEnd,Psalm,bible.19,All
	StringReplace, rangeEnd, rangeEnd,Proverbs,bible.20,All
	StringReplace, rangeEnd, rangeEnd,Ecclesiastes,bible.21,All
	StringReplace, rangeEnd, rangeEnd,Song of Solomon,bible.22,All
	StringReplace, rangeEnd, rangeEnd,Isaiah,bible.23,All
	StringReplace, rangeEnd, rangeEnd,Jeremiah,bible.24,All
	StringReplace, rangeEnd, rangeEnd,Lamentations,bible.25,All
	StringReplace, rangeEnd, rangeEnd,Ezekiel,bible.26,All
	StringReplace, rangeEnd, rangeEnd,Daniel,bible.27,All
	StringReplace, rangeEnd, rangeEnd,Hosea,bible.28,All
	StringReplace, rangeEnd, rangeEnd,Joel,bible.29,All
	StringReplace, rangeEnd, rangeEnd,Amos,bible.30,All
	StringReplace, rangeEnd, rangeEnd,Obadiah,bible.31,All
	StringReplace, rangeEnd, rangeEnd,Jonah,bible.32,All
	StringReplace, rangeEnd, rangeEnd,Micah,bible.33,All
	StringReplace, rangeEnd, rangeEnd,Nahum,bible.34,All
	StringReplace, rangeEnd, rangeEnd,Habakkuk,bible.35,All
	StringReplace, rangeEnd, rangeEnd,Zephaniah,bible.36,All
	StringReplace, rangeEnd, rangeEnd,Haggai,bible.37,All
	StringReplace, rangeEnd, rangeEnd,Zechariah,bible.38,All
	StringReplace, rangeEnd, rangeEnd,Malachi,bible.39,All
	StringReplace, rangeEnd, rangeEnd,Tobit,bible.40,All
	StringReplace, rangeEnd, rangeEnd,Judith,bible.41,All
	StringReplace, rangeEnd, rangeEnd,Additions to Esther,bible.42,All
	StringReplace, rangeEnd, rangeEnd,Wisdom of Solomon,bible.43,All
	StringReplace, rangeEnd, rangeEnd,Sirach,bible.44,All
	StringReplace, rangeEnd, rangeEnd,Baruch,bible.45,All
	StringReplace, rangeEnd, rangeEnd,Letter of Jeremiah,bible.46,All
	StringReplace, rangeEnd, rangeEnd,Song of Three Youths,bible.47,All
	StringReplace, rangeEnd, rangeEnd,Susanna,bible.48,All
	StringReplace, rangeEnd, rangeEnd,Bel and the Dragon,bible.49,All
	StringReplace, rangeEnd, rangeEnd,1 Maccabees,bible.50,All
	StringReplace, rangeEnd, rangeEnd,2 Maccabees,bible.51,All
	StringReplace, rangeEnd, rangeEnd,1 Esdras,bible.52,All
	StringReplace, rangeEnd, rangeEnd,Prayer of Manasseh,bible.53,All
	StringReplace, rangeEnd, rangeEnd,Additional Psalm,bible.54,All
	StringReplace, rangeEnd, rangeEnd,3 Maccabees,bible.55,All
	StringReplace, rangeEnd, rangeEnd,2 Esdras,bible.56,All
	StringReplace, rangeEnd, rangeEnd,4 Maccabees,bible.57,All
	StringReplace, rangeEnd, rangeEnd,Ode,bible.58,All
	StringReplace, rangeEnd, rangeEnd,Psalms of Solomon,bible.59,All
	StringReplace, rangeEnd, rangeEnd,Epistle to the Laodiceans,bible.60,All
	StringReplace, rangeEnd, rangeEnd,Matthew,bible.61,All
	StringReplace, rangeEnd, rangeEnd,Mark,bible.62,All
	StringReplace, rangeEnd, rangeEnd,Luke,bible.63,All
	StringReplace, rangeEnd, rangeEnd,John,bible.64,All
	StringReplace, rangeEnd, rangeEnd,Acts,bible.65,All
	StringReplace, rangeEnd, rangeEnd,Romans,bible.66,All
	StringReplace, rangeEnd, rangeEnd,1 Corinthians,bible.67,All
	StringReplace, rangeEnd, rangeEnd,2 Corinthians,bible.68,All
	StringReplace, rangeEnd, rangeEnd,Galatians,bible.69,All
	StringReplace, rangeEnd, rangeEnd,Ephesians,bible.70,All
	StringReplace, rangeEnd, rangeEnd,Philippians,bible.71,All
	StringReplace, rangeEnd, rangeEnd,Colossians,bible.72,All
	StringReplace, rangeEnd, rangeEnd,1 Thessalonians,bible.73,All
	StringReplace, rangeEnd, rangeEnd,2 Thessalonians,bible.74,All
	StringReplace, rangeEnd, rangeEnd,1 Timothy,bible.75,All
	StringReplace, rangeEnd, rangeEnd,2 Timothy,bible.76,All
	StringReplace, rangeEnd, rangeEnd,Titus,bible.77,All
	StringReplace, rangeEnd, rangeEnd,Philemon,bible.78,All
	StringReplace, rangeEnd, rangeEnd,Hebrews,bible.79,All
	StringReplace, rangeEnd, rangeEnd,James,bible.80,All
	StringReplace, rangeEnd, rangeEnd,1 Peter,bible.81,All
	StringReplace, rangeEnd, rangeEnd,2 Peter,bible.82,All
	StringReplace, rangeEnd, rangeEnd,1 John,bible.83,All
	StringReplace, rangeEnd, rangeEnd,2 John,bible.84,All
	StringReplace, rangeEnd, rangeEnd,3 John,bible.85,All
	StringReplace, rangeEnd, rangeEnd,Jude,bible.86,All
	StringReplace, rangeEnd, rangeEnd,Revelation,bible.87,All
	StringReplace, rangeEnd, rangeEnd,Enoch,bible.88,All
	StringReplace, rangeEnd, rangeEnd,Plea for Deliverance,bible.89,All
	StringReplace, rangeEnd, rangeEnd,Apostrophe to Zion,bible.90,All
	StringReplace, rangeEnd, rangeEnd,Eschatological Hymn,bible.91,All
	StringReplace, rangeEnd, rangeEnd,Apostrophe to Judah,bible.92,All
	StringReplace, rangeEnd, rangeEnd,Hymn to the Creator,bible.93,All
	StringReplace, rangeEnd, rangeEnd,Davids Compositions,bible.94,All
	StringReplace, rangeEnd, rangeEnd,Apocryphal Psalms,bible.95,All
	StringReplace, rangeEnd, rangeEnd,Apocalypse of Baruch,bible.96,All
	StringReplace, rangeEnd, rangeEnd,Epistle of Baruch,bible.97,All
	StringReplace, rangeEnd, rangeEnd,Additions to Daniel,bible.98,All
	StringReplace, rangeEnd, rangeEnd,2 Baruch,bible.99,All
	StringReplace, rangeEnd, rangeEnd,4 Ezra,bible.100,All
	StringReplace, rangeEnd, rangeEnd,Catena,bible.101,All
	StringReplace, rangeEnd, rangeEnd,Psalm 151A,bible.102,All
	StringReplace, rangeEnd, rangeEnd,Psalm 151B,bible.103,All
	
	StringReplace,rangeStart,rangeStart,%A_Space%,.,All
	StringReplace,rangeEnd,rangeEnd,%A_Space%,.,All
	
	if(rangeStart != rangeEnd)
	{
		StringReplace, rangeEnd,rangeEnd,bible.,,All
		value := rangeStart . "-" . rangeEnd
		return value		
	} else {
		return rangeStart
	}
}
Posts 63
Mike Hogue | Forum Activity | Replied: Wed, Dec 23 2020 9:45 PM

I'm on a Surface Book 2 running Windows 10.

I'd like steps in my workflow to search for the specified Scripture in specified references...especially when the reference isn't versified.

I'd ideally like to be able to add references.  For example, I'd like to add a workflow step to search a sermon archive (Keller? Piper?) for references to the passage listed when I start the workflow.  In another step, I'd like to search an illustration encyclopedia.  In another, perhaps a Bible dictionary...or BDAG.  The point is that if there are specific references that I'd like to regularly check, I'd like to be able to specify them as specific steps in a workflow and then be able to pinpoint the place(s) in that reference without taking extra steps.

Thanks for engaging on this!

Posts 397
PJ | Forum Activity | Replied: Thu, Dec 24 2020 5:40 AM

4846.URITool.zipHere is a Working Prototype

Search the internet and download AutoHotkey Engine and install it.

Download the attachment below.

Extract it

There are 2 files

  • Go.ahk
  • HyperLink.ahk

Go.ahk is used inside Hyperlink.ahk files to run the link you specify

The Following steps need to be followed for each Resource or Search link you use inside Workflows.

I included both the logos4 and logosres Protocols.

Make a Copy of the Hyperlink.ahk File and Rename it with a relevant name without spaces

Sample: Search.ahk

Open the File (Search.ahk)

It contains two lines of code

  1. uri := ""
  2. #Include D:\URITool\Go.ahk

Change #Include D:\URITool\Go.ahk to point to the location of the Go.ahk file on your disk.

Inside Logos, do your search and set the Search Panels "Copy Location As setting" to L4

Press Ctrl+Alt+C to copy the location of the Search Panel to the Clipboard

In Line 1 on the Search.ahk, paste the location

Example

uri := "logos4:Search;kind=BasicSearch;q=$3CGen_1:1$3E;match=stem;exactref=true;in=raw:LibraryCatalog$7CQuery$3DAuthor:Carson$7CResourceKind$3DNone$7CSupportedResourceIds$3D$7CSupportedTypes$3D$7CTitle$3D19$2520resources$2520with$2520Author:Carson"

Save the File and close it.

Create a Link inside your Workflow that points to this script you created.

You need a script with two lines of code for each generic Search you want to use as link.

When the link is clicked from the Workflow, the Include line imports the code to handle the supplied url from Search.ahk.

It finds a small piece inside the uri. In the Example it is: q=$3CGen_1:1$3E

Then the script gets the Workflows Reference and Parses it to either a Reference to use in a Search or a Resource and replaces the above piece with the new Reference.

When done it executes the uri in Logos.

I'll try to improve on this idea and make it a lot easier and faster to accomplish. This is just a starting point.

I hope this helps.

Posts 63
Mike Hogue | Forum Activity | Replied: Thu, Dec 24 2020 7:50 AM

PJ - thank you!!!

I'll work to get it installed and working, but I appreciate you putting your programming/COM API skills to work to provide functionality in places it was missing!

I'll be standing by for whatever improvements you make! Will you be posting them here on this thread?

...makes me wonder what other functionality you've added via programming.

Thanks again!

Mike

Posts 397
PJ | Forum Activity | Replied: Fri, Dec 25 2020 7:29 AM

Mike Hogue:
...makes me wonder what other functionality you've added via programming.

I did play a lot with the ComAPI and some other API's. Automated Mindmapping, Word reacting as if it were a Resource. Personal Book Builder Automation. All this was preparing me for the following script that is supposed to collect all the above and other ideas into one single system.

The script I'm currently working on has the same functionality as you described but on a completely different level.

The script handles Workflows, Layouts and Resources at this stage.

I create a Workflow for each Step that needs to create a document. I want all my documents to be automatically named by Logos. The reason for this is to enable a Workflow to know exactly what documents belong to a certain project I'm working on. I think of Workflows in a Parent-Child relationship. When exporting a Workflow it can then suggest other documents I may want to import into Word. This will become clear as you read further.

When I export a Workflow (Parent) it's supposed to be able to generate the structure of a complete book inside Word. I then just import other Workflow data (children) at specific locations in Word.

A Workflow in my mind is nothing more than a single task with a specific structure relating to a final draft for a book. Each Workflow is just a small part of a bigger picture.

Each workflow gets its own corresponding Layout with the same name. One Workflow, One Layout. This way Workflow and Layout know about each other and I can focus on just one task at a time. When a Workflow has a DataType filled in as Reference it creates a new layout for that specific started workflow.

The power of this start to get visible when I link Workflows to other Workflows containing a single step. Workflows become a huge network. My Documents become an integrated system enabling me to create almost any kind of resource from small pieces of data collected over time. I never do anything twice in two different Workflows. In my mind, if you do something once in a single-minded workflow, it's done.

When I click on a link inside a workflow (Parent) to open another workflow (child step) the corresponding Workflow's Layout opens. The Reference of the Parent is passed to the new Layouts Workflow (child).

I use LinkSet F to link resources between Layouts. This way Layouts are intelligently communicating with each other.

My system tracks the history of Workflows to enable me to go forward or backward in my process.

The code is a bit complicated as I wrote a procedure to edit the script automatically. The script is actually recognizing different combinations of Layouts and Workflows and Resources. Some Procedures, therefore, have a Binary name consisting of 0's and 1's. This is kind of a very fast Binary Decision tree triggered by whatever is happening on my screen. Each 0 and 1 has a specific meaning relating to information I obtain from Logos in a specific order. I'm working towards a neural network that can suggest how to use Logos or that can learn how I use Logos and then start to do it automatically. This dream is rather far away because I'm the only one working on this and I'm learning on the go.

The fun starts when I open something that the code doesn't recognize. It wil popup a window with already existing functions from the code. I select whatever I want it to do and the code is added automatically to the script. The script then restarts itself and then know how to handle that specific situation.

I did not provide you with this version because even I'm not always understanding what It's doing.

I love to think hard and solve problems. I scan the forum from time to time to see if there is some idea or problem I can try to solve to increase my knowledge about Logos. Your problem triggered some new ideas to speed up my Workflow.

I appreciate you sharing what you dream Logos should look like.

Posts 63
Mike Hogue | Forum Activity | Replied: Sat, Dec 26 2020 7:28 PM

Wow PJ - I'd love to see a video demonstration of what you're doing as it sounds like you're taking some functionality to a new level.

I'm about to go on a vacation, but when I return perhaps I'll post two other projects that I suspect can only be solved programmatically at this point...one involving opening a non-dated resource (like Boa's Handbook to Prayer) to a date-specific location each day, and the other involving parsing the apparatus of the NA28 for a verse and dividing the witnesses by family and sorting by date. I'd love to know your thoughts on the possibilities of these based on COM-API, but as I mentioned they probably go in a different location.

If you ever do a screencast demonstrating what you've done with your script, please post a link.  Thanks!

Posts 397
PJ | Forum Activity | Replied: Sat, Jan 2 2021 4:08 AM

Mike Hogue:
taking some functionality to a new level

view?usp=sharing

Posts 397
PJ | Forum Activity | Replied: Sat, Jan 2 2021 4:25 AM

Mike Hogue:
parsing the apparatus of the NA28 for a verse and dividing the witnesses by family and sorting by date

I do not have this resource, but it sounds like a job for python and maybe the comapi. Python is extremely good at parsing text. I once build a summarizer that highlighted paragraphs. It almost did it exactly as I would have done it. The code must be somewhere in my archives.

Mike Hogue:
opening a non-dated resource (like Boa's Handbook to Prayer) to a date-specific location each day

This sounds interesting ... maybe a Reading Plan can solve this? Did you try any solutions?

Posts 63
Mike Hogue | Forum Activity | Replied: Tue, Jan 5 2021 11:32 AM

PJ,

Python is good at parsing text - for a while I was in a program to learn Kyrgyz and wrote a script that would parse a news article and build a histogram of important words.  Was about 5 lines of code.

I noticed you had a thread on teaching people to connect to the API using VB - would love to see one on Python as well, as I'm much more familiar with it and its capabilities than VBA.

Thank you for the video! I didn't hear any sound but what I saw looked great.

I'll start another thread for the Boa Handbook -- so we can interact there.  A Reading Plan probably won't work the way I'd like, though, as the resource has some "extra" entries (divided into 12 "sections" of 31 divisions each.  Close to 12 months, but no real starting point. I'd probably just end up ignoring the extra entries for sections with fewer than 31 days.)

Page 1 of 2 (22 items) 1 2 Next > | RSS