Quark to InDesign conversion

I’m working on converting my Quark 6.5 text formatting scripts to InDesign CS2 on OSX 10.3.9.
Here are my first two questions:

My Quark scripts operate only within text boxes that the user has clicked on:

tell application "QuarkXPress"
tell document 1 of application "QuarkXPress"
tell story 1 of current box --THIS LINE!
set first indent to "p9"--All my glorious text formatting like this would go here
end tell
end tell
end tell

:cool: Is there an equivalent of “current box” in InDesign?

In Quark, If I’d want to change formatting of words based on it’s font and whether it was bold and/or Italic. For this I’d write:

--checks that the font is "Times" and is bold and changes it to "B Times Bold" font
set (font of every text style range whose font is "Times" and style is bold) to "B Times Bold" 

InDesign doesn’t seem to handle fonts the same way Quark does. I’ve been trying something like this with a character style, but it’s not working:

tell application "Adobe InDesign CS2"
tell document 1
tell parent story of text frame 1
set (applied character style of every text style range whose applied font is "Times" and text style is "Bold") to "Company Names"
end try
end tell
end tell
end tell

The name of the font is “B Times Bold” but that doesn’t work. InDesign splits it into family:“Times” style:“Bold”

Any help would be appreciated.:smiley:

The font in InDesign is specified as the font family then a tab and then the style. I usually do this:

“Times New Roman PS” & tab & “Bold”

Model: PowerPC G5 Tower OS 10.4.8
AppleScript: XCode 2.5
Browser: Safari 419.3
Operating System: Mac OS X (10.4)