Feeds:
Posts
Comments

Posts Tagged ‘macs’

I code sometimes. I also write. Occasionally the two come together.

As I’ve mentioned, coding helps me find new ways to think about my work. Here’s a new Applescript I whipped up to highlight instances of “to be” in my drafts, as well as certain filler words that don’t add much to the text. Open your document in MS Word, then run the following code. The selected words will be replaced with bold versions of themselves.

Alter the list as necessary, or use this as an example of how to do a list-based loop in Applescript (hint: the “repeat” line is key;). Enjoy!

set my_word_list to {"am", "are", "be", "been", "being", "felt", "had", "has", "have", "heard", "is", "looked", "was", "wasn't", "were", "weren't"}
repeat with each_word in my_word_list
	set FindWordsToReplace to each_word as text
	tell application "Microsoft Word"
		set GetTxt to find object of selection
		tell GetTxt
			clear formatting
			set its content to FindWordsToReplace
			tell its replacement
				clear formatting
				set its content to FindWordsToReplace
				tell its font object
					set bold to true
				end tell
			end tell
			execute find wrap find find continue replace replace all with match forward and match whole word without match case
		end tell
	end tell
end repeat

Read Full Post »

Some days I stand here at my desk trying to generate a creative thought (or even two!) and it doesn’t happen. If I can’t do the thing I set out to do I still try to do something, so on those days I look for alternatives to get my mind working. My latest filler project is a little Applescript (sorry Windows, I just don’t swing that way) that pops up a window with practice ideas for writing projects. Not what to write, but what to practice while writing.

Here’s the code with a sampling of my current list of practice topics. If this is your sort of thing, substitute your own practice topics as necessary:

set x to some item of {"*action*", "*all five senses*", "*catchy beginnings with a hint of the speculative*", "*characterization*", "*cliffhangers*", "*conflict*", "*distinctive dialog*", "*emotion*", "*grounding*", "*imagery*", "*immediacy*", "*openers*", "*scenes*", "*settings*", "*showing instead of telling*", "*smart science*", "*visual detail*", "*writing without 'was'*"}
set textToType to "Practice " & x & " in your story today."
set answer to the button returned of (display dialog textToType as string buttons {"Excellent idea, thanks!"} default button 1 with icon note)

So it’s code today, perhaps cake tomorrow. Chocolate. Triple tier. With Bailey’s icing:)

/unless that’s a lie

Read Full Post »