Hi,
Is there a way to use the Share sheet extension with TBX?
Similar to share to Apple Notes or share to Evernote, but then share to TBX?
Or are there any plans to implement this?
Thanks a lot for helping out!
Hi,
Is there a way to use the Share sheet extension with TBX?
Similar to share to Apple Notes or share to Evernote, but then share to TBX?
Or are there any plans to implement this?
Thanks a lot for helping out!
Well this was exactly my line of thinking.
I use e.g. Evernote and Devonthink (v2), and both have their own âwebclipperâ.
I realize that TBX has watched folders in the forms of Evernote- , Finder- and Notes âwatched foldersâ
I havenât successfully set up a system yet, but what I do like or search is e.g. the possibility to select some txt in any browser and then right-click and send selected txt to EN or DTPO. I think it would be a good way to also clip it to TBX directly instead of via EN or Apple Notes.
I agree that some choice would need to be made as to to which TBX DB it should be sentâŚ
Maybe the idea of a kind of âmainâ always open general DB? Or the capability to set a specific DB as the âreceptorâ?
I believe Dominique Renauld devised an Alfred workflow that would put a note in Tinderbox, but I donât know how it functioned.
Thanks for the tip Martin, I was not aware of that.
Probably this: http://dominiquerenauld.net/journal2015-2018/22/8/2016/taking-notes-with-alfred-and-tinderbox
iThoughts had a function that would insert something into an existing mind map (which you had to define in advance). I had one which I simply called Inbox.itx which collected new material that could then be copied elsewhere. You could no doubt set up something similar, perhaps with Keyboard Maestro (if you use it) or perhaps even Automator. Or one of the AppleScript whizzes might come up with a script for it.
True, I almost forgot about iThoughts. I have been looking into it lately.
Moreover since it has an excellent iPhone / iPad version and also a windos versionâŚ
What do you use then? OPML import / export?
Yes, I recognise that pattern too;
I do that with Zengobiâs Curio, and it indeed adds a source url, very nice.
@mwra once posted a service to clip to Tinderbox, but it doesnât work for me anymore. Probably ran into a macOS privacy issue.
My thought exactly. I just updated on of the scripts, as the AppleScript references the app by name. So the v7 version needs editing. Here is the code within service âClip Selection to Tinderbox v7.workflowâ with app references updated for Tinderbox v8:
on run {input}
try
tell application "System Events" to set activeApplication to bundle identifier of 1st process whose frontmost is true
set the clipboard to input as Unicode text
activate application "Tinderbox 8"
tell application "System Events"
tell process "Tinderbox 8"
tell window 1
tell splitter group 1
tell scroll area 1
-- paste clipboard contents
keystroke "v" using command down
-- close the new note from title edit mode
delay 0.1
keystroke return
end tell
end tell
end tell
end tell
end tell
activate application id activeApplication
on error errmsg
--display dialog "Error while executing service:" & errmsg buttons {"Close"}
end try
end run
I did the update in Automator as it was the app used to make the service in the first case. I saved it as âClip Selection to Tinderbox v7.workflowâ back into ~/Library/Services/
I switched back to Safari and the service failed saying Safari needed added permission. Agreeing to that I got shown the System Prefs/Privacy tab, Accessibility option. I unlocked the UI using my OS admin password. Safari was listed but not ticked. I ticked it, re-tested and the service worked. Note, depending on your system you might need to add Safari to this list once youâve given your admin password. Iâm on 10.14.6 so Iâm not sure if Catalina changes things.
I also have a âClip Safari Selection-URL to Tinderbox v8.workflowâ service which I fixed/enabled in the similar manner to aboveâthe Safari permissoin step isnât needed as already done. Hereâs the AppleScript bit:
on run {input}
try
tell application "System Events" to set activeApplication to bundle identifier of 1st process whose frontmost is true
set dataString to input as Unicode text
tell application "Safari"
set theURL to URL of current tab of front window
end tell
if theURL is not equal to "" then
set dataString to dataString & return & return & theURL & return
end if
set the clipboard to dataString as Unicode text
activate application "Tinderbox 8"
tell application "System Events"
tell process "Tinderbox 8"
tell window 1
tell splitter group 1
tell scroll area 1
-- paste clipboard contents
keystroke "v" using command down
-- close the new note from title edit mode
delay 0.1
keystroke return
end tell
end tell
end tell
end tell
end tell
activate application id activeApplication
on error errmsg
--display dialog "Error while executing service:" & errmsg buttons {"Close"}
end try
end run
Before sharing these, perhaps @ComplexPoint or someone with better AppleScript smarts might want to improve the code above. Both were originally written for Tinderbox v6, before Tinderbox added AppleScript support. So, perhaps there is better more efficient code we can then use and share as a service.
HTH.
Thanks! Iâd like to test these. Conservative as I am, Iâm still on 10.13.6
( Iâll take a look and experiment a little over the weekend - not before Sat evening now though )
Digging further with AppleScript Debugger (Though Iâm not an expert at this) it seems the v8 Tinderbox dictionary has no method to interact with the UI - i.e. I canât find tabs, view/text panes. So perhaps the above methods are still the way to go. Still, Iâd yield to somewhat with better AppleScript skills here.
Yay! Didnât know such old things were still there. For those wondering, as stated the IDs are 4-character , and âCereâ is short for âCeresâ which was the internal (and original?) name for Tinderbox.
Briefly before supper:
That part of your script could be replaced, for TBX8+ users, with something analogous to:
tell application "Tinderbox 8"
tell front document
make new note with properties {name:" (something from elsewhere) "}
end tell
end tell
Great. Far less script-cruft. The galley beckons here too but looks like a much simpler script is possible.
I failed, I canât make a new note and assign more that one property. In the case on the selection & URL script I need to make and note and assign âNameâ and âTextâ properties, but computer says ânoâ.
For anything beyond the name of a note, you can set the value of a specific attribute:
tell application "Tinderbox 8"
tell front document
tell (make new note with properties {name:" Some name from elsewhere "})
set value of its attribute "Text" to " Some text from elsewhere "
end tell
end tell
end tell
Great, thatâs working. I notice that if I activate Tinderbox in the UI and here is no open document Tinderbox makes a new one. This doesnât happen via the AppleScript in my service (workflow). So it looks like it would be sensible to first check there is a front document and if none to make a new document. What would you suggest, based on your greater AppleScript expertise?
first check there is a front document
So perhaps a pattern along these lines ?
tell application "Tinderbox 8"
set docs to documents
if 0 < length of docs then
set doc to item 1 of docs
else
set doc to make new document
end if
tell doc
tell (make new note with properties {name:" Some name from elsewhere "})
set value of its attribute "Text" to " Some text from elsewhere "
end tell
end tell
end tell
Tada! Works a treat. Iâll update my two services and post shortly, probably in a (linked) new thread with instructions for those not used to adding services.
FWIW, if you wanted to add Google Chrome, the corresponding incantation would be very similar:
tell application "Google Chrome"
set theURL to URL of active tab of front window
end tell