Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Clip to Tinderbox v6 service (Read 3265 times)
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Clip to Tinderbox v6 service
Jun 9th, 2014, 3:11pm
 
I've updated my clip-to-Tinderbox service for v6: Clip_Selection_to_Tinderbox_v6.zip. Please read the README before use: this service is not supported software. I have tested it in the v6.0.0 on OS 10.8.5 and 10.9.3.

Changes to the app/OS/AppleScript relationship means that:
  • I can't (yet!) easily test is TB has a document open.  If there isn't a TBX open or TB is closed the service fails silently.
  • The contents of the current text selection is pasted into the main view of the TBX main pane. If more than one window and/or TBX is open, the paste is into the current front TBX window.
  • The note created uses the first sentence (only if more than one) of the selection for the note's $Name.
  • The full selection forms the $Text of the note.
  • The note's $Text is added in default TB style - i.e. it is not styled test that is added.
Tip o' the hat to Paul Walters for figuring out an AppleScript problem I was having during the re-write.
Back to top
 
« Last Edit: Jun 09th, 2014, 3:15pm by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Dr Mark
Full Member
*
Offline



Posts: 26

Re: Clip to Tinderbox v6 service
Reply #1 - Jun 11th, 2014, 3:17am
 
Very useful for my workflow - thank you (10.9.3)

How do I get rid of the previous version in services?
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Clip to Tinderbox v6 service
Reply #2 - Jun 11th, 2014, 3:50am
 
Go to the services folder, where you added the new one, and find the old one - should be self evident by its name - and move the old one to the trash.

Your system should auto-detect the change. Worst case you might have to re-start a running app so it refreshes its service list.

Glad the new file was of use - always good to hear if people use these things as it took some figuring out to make it work.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Paul Atlan
Full Member
*
Offline



Posts: 45
Abu Dhabi
Re: Clip to Tinderbox v6 service
Reply #3 - Jun 12th, 2014, 10:16am
 
Works pretty well.
FYI, it seems that if the TB document is empty (i.e. I see the "This is a tinderbox map" scribble), the service will fail as well.
Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Clip to Tinderbox v6 service
Reply #4 - Jun 13th, 2014, 11:08am
 
Paul - that's odd as that still works fine for me just as it did at time of posting the service. A TBX doc does have to be open but the service will happily add the first note into a newly opened 'empty' doc.
Back to top
 
« Last Edit: Jun 13th, 2014, 11:08am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Sumner Gerard
Full Member
*
Offline



Posts: 359

Re: Clip to Tinderbox v6 service
Reply #5 - Jun 13th, 2014, 11:06pm
 
Quote:
I can't (yet!) easily test is TB has a document open.  If there isn't a TBX open or TB is closed the service fails silently.


This may help:

To test whether Tinderbox is running:


Code:
tell application "TinderboxSix"
	if it is running then
		-- do stuff
	else
		-- do other stuff
	end if
end tell 



To test whether document is open (within the tell process "TinderboxSix" block):

Code:
if window 1 exists then
             --do stuff
         else
             --do other stuff
end if
 



TinderboxSix opens a new window automatically when AppleScript tells it to activate when it is not already running. However, the paste seems to fail in that situation. Probably a simple addition to the script to bring the focus back to the Tinderbox window but I can't spot where that needs to be done.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Clip to Tinderbox v6 service
Reply #6 - Jun 14th, 2014, 11:21am
 
Thanks. When I've some spare time to tinker, I'll see if I can't work that in.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print