I need to use rb-appscript to create a new Pages document that contains bulleted and numbered lists. Looking in to this, I see that paragraphs have a property called list_style, but I'm not familiar enough with rb-appscript or applescript to figure out how to set that property. I have read the documentation generated by the ASDictionary, but my knowledge of AppleScript is apparently too little to understand it.
Any help with either understanding how to use the information presented in the documentation, or writing a list using rb-appscript in pages would be much appreciated.
Edit: I'm not stuck on pages, textedit is also a viable option.
rb-appscript:
require 'rubygems'
require 'appscript'; include Appscript
lst=["a", "b"]
doc = app('Pages').documents[0]
doc.selection.get.paragraph_style.set("Body Bullet")
doc.selection.set(lst.join("\n"))
AppleScript:
set lst to {"a", "b"}
set text item delimiters to linefeed
tell application "Pages" to tell document 1
set paragraph style of (get selection) to "Body Bullet"
set selection to (lst as text)
end tell