InDesign CS4 - Change Font that "is not" selected

Does anybody know of a way to change a font in InDesgin CS4 without having a font selected? In other words, a way to simply change the font in the control bar?

Thanks,
-Jeff

Hi. I think this is what you want.

tell application "Adobe InDesign CS3"'s document 1 to set text defaults's applied font to font "Myriad Pro	Regular" --or some active font name

Hi Marc,
Thank you, I am guessing this must be close to it. However, I am receiving the following:

Adobe InDesign CS4 got an error: Invalid value for set property ‘applied font’. Expected font or string, but received nothing.

error “Adobe InDesign CS4 got an error: Invalid value for set property ‘applied font’. Expected font or string, but received nothing.” number 30477

Hi. You must’ve cut and paste directly from the forum. Click on “Open this Scriptlet in your Editor,” instead, and the tab remains a tab instead of being converted to spaces.

Yes, that was my mistake and it does work. But I realized something that I should have specified earlier. I do not necessarily want to affect the document’s default font for all subsequent text frames, etc. I am specifically looking for a way to target the font and it’s font style within the control panel so the change takes place immediately even if an insertion point is active within a text frame. I prefer not to change the document’s default font.

Presently I use variations of this script to change a font:

tell application "Adobe InDesign CS4"
	activate
	try
		set myFont to {applied font:"Helvetica (T1)", font style:"Medium"}
		set theClass to class of selection
		if theClass is in {text, insertion point, character, word, line, paragraph, text style range, text column} then
			tell active document
				set theSelection to selection
				set properties of every item of selection to myFont
			end tell
		end if
	end try
end tell

But let’s assume the operator did not have an active insertion point or some selected text. It would be nice if the script first attempted to get the font ready so-to-speak by changing the font within the control panel.

But I assure you, this is not a show-stopper and I can easily get by with what I have.

Thanks again,
-Jeff