The selection will be replaced with the filtered text (or the whole document if there is no selection).Ī text filter may be a Unix script, AppleScript file, BBEdit Text Factory, or Automator workflow. Normally I will do my editing work in Bean as this is nothing which requires more than sorting from time to time and some formatting) Unfortunately, opening a document that looks fine in DevonThink and in Bean shows all sorts of characters in TextWrangler.Text filters operate on the selected text of the frontmost document (or on the whole document if there is no selection). I just tested TextWrangler to see if I could apply your ideas for what I have ahead of me this afternoon. Spell-Check-with-TextWrangler.kmmacros (7.4 KB) You then edit the text to your satisfaction in TextWrangler. The copy macro expects you the user to select the text to be copied and then hit the hotkey. Īs far as I can see these two scripts plus the tweaks to TextWrangler's prefs take care of all of your concerns. This will quit TextWrangler without saving the 'Spell_Check' window. Tell menu item "Find All Misspelled Words" of menu 1 of menu bar item "Text" of menu bar 1 If value of attribute "AXMenuItemMarkChar" ≠ "✓" then Tell menu item "Check Spelling as You Type" of menu 1 of menu bar item "Text" of menu bar 1 Set newDoc to make new document with properties Spellcheck as you type is turned ON in case you want to manually edit something and make an error. In the following script you can adjust the size (bounds) of the window, and the width of soft wrap to suit yourself. Reopen documents that were open at last quit In the 'Application' pane of TextWrangler's Preferences uncheck these: TW should be doing this … ? Sometimes I can force this by highlighting a block of text and right clicking to trigger a replacement search. Bean will do this and other aps will do this. Yes, spell check is turned on but I see now way to have a pasted block of text recognize the misspelled words so that I can see them and correct them. Thanks for the help, this works great now.Įxcept … One small problem, TW is not showing the pasted text with misspelled words red underlined. One clarifying question if I may? In your example, are you showing that in KM I can name a variable on the fly? Is “%Application%%1%” a text variable that you essentially made up for this specific task? I have limited programming experience. Thanks very much for suggesting the ideas. I will test using your examples for a benchmark. But then It could not find the pasted doc. By switching the order of when I quit Bean or TW I was able to paste the results back successfully. In theory this could work but It leaves me in limbo at the end of It. Then I spell check and run this macro: Type the ⌘A Keystroke Type the ⌘C Keystroke Filter Clipboard with Unwrap Activate Last Application Pause for 1.5 Seconds Type the ⌘V Keystroke Activate Last Application Type the ⌘W Keystroke Pause for 1.5 Seconds Type the ⌘D Keystroke Pause for 1.5 Seconds Type the ⌘Q Keystroke Activate Last Application I start by highlighting my text to spell check and run this KM macro: Type the ⌘C Keystroke Open ‘/Applications/Bean.app’ Pause Until Conditions Met (Bean to be at Front) Pause for 1.5 Seconds Type the ⌘V Keystroke I have to hard wrap to use TW and then soft wrap the results again before I paste results. Unless I Hard wrap before pasting into TW, TW will put all paragraphs on a single line which is near unreadable. I also used KM to adjust the wrapping, soft to hard instead of the Applescript you used. If you can suggest a workaround for this I am all ears. BBEdit is the same way of course which is why I don’t use It so much anymore. It gets a little confusing to tell TW to open one and one only window as new, paste the text and when done kill that one window - and also quite TW. TW also is a bit frustrating because It opens old windows as a sidebar to the current window. When I recently started using NerdTool to show a task list I keep up with in DevonThink, the ascii wasn’t reading some characters so I zapped the gremlins in TW to fix It. I was hoping to use Text Wrangler as It is a stronger platform than Bean. Sorry I was pulled elsewhere until I could reply back.
0 Comments
Leave a Reply. |