🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #10219

Re: Display Dialog question

#10219
From: Kari Puikkonen
Date: Wed, 28 Jun 2006 11:11
55 lines
2596 bytes
Actually, I was wrong; the script does not work.

Here it is so far:
tell application "Adobe InDesign CS2"
	set myDoc to active document

	set myParaList to name of every paragraph style of myDoc
	set myCaseVals to {lowercase, sentencecase, titlecase, uppercase}

	set AppleScript's text item delimiters to "+"
	set myCaseList to text items of (myCaseVals as string)
	set AppleScript's text item delimiters to ""

	set myDialog to make dialog with properties {name:"Choose paragraph style and change case"}
	tell myDialog
		tell (make dialog column)
			tell (make border panel)
				tell (make dialog column)
					make static text with properties {static label:"Choose a paragraph style to affect", min width:150}
				end tell
				tell (make dialog column)
					set myPresetsDropdown to make dropdown with properties �
						{string list:myParaList, selected index:0, min width:150}
				end tell
				tell (make dialog column)
					make static text with properties {static label:"Choose a case", min width:150}
				end tell
				tell (make dialog column)
				set myCaseDropdown to make dropdown with properties �
				{string list:myCaseList, selected index:0}
				end tell
			end tell
		end tell
	end tell
	set myResult to show myDialog
	if myResult = true then
		+1 gets the correct name because list starts at 0
		set myPara to item ((selected index of myPresetsDropdown) + 1) of myParaList
		set myCase to item ((selected index of myCaseDropdown) + 1) of myCaseVals
	end if
	destroy myDialog

	tell myDoc
		set myChange to object reference of every text style range of every story whose name of applied paragraph style is myPara
		changecase myChange using myCase
	end tell
end tell

It is this line that doesn't work:
		set myChange to object reference of every text style range of every story whose name of applied paragraph style is myPara
Does anyone know how to fix it?

TIA

Kari
Technical Details
Message-ID: <3bc0ad4b.2@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing
References: <3bc0ad4b.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ea7bd79cbe57db77,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII
From: "Kari Puikkonen" <kari.puikkonen@welho.com>
Newsgroups: adobe.scripting.indesign
Subject: Re: Display Dialog question
Message-ID: <3bc0ad4b.2@webcrossing.la2eafNXanI>
Date: Wed, 28 Jun 2006 04:11:05 -0700
References: <3bc0ad4b.-1@webcrossing.la2eafNXanI>
Lines: 62
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing