🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9351

Re: AS - Need to make dialog boxes and then do calulations

#9351
From: Kelly_Vaughn
Date: Tue, 05 Sep 2006 15:41
25 lines
1927 bytes
I have finished my script and am just working out the final details. I am puzzled as to why my dialog box assumes that my units are in pts. I have scripted it to work in inches, but for some reason, the dialog boxes inserts "pts" after the edit values of 8.5 x 11. Any ideas as to why?

--Set application defaults,then create a new document.
tell application "Adobe InDesign CS2"
	set myViewPreferences to view preferences
	tell myViewPreferences
		set horizontal measurement units to inches
		set vertical measurement units to inches
	end tell

	--Dialog box to enter page size
	tell application "Adobe InDesign CS2"
		set myDialog to make dialog with properties {name:"Enter Your Document Size"}
		tell myDialog
			tell (make dialog column)
				make static text
				make static text with properties {static label:"Page Width:"}
				make static text with properties {static label:"Page Height:"}
			end tell
			tell (make dialog column)
				make static text
				set myWidthField to make measurement editbox with properties {edit value:11}
				set myHeightField to make measurement editbox with properties {edit value:8.5}
			end tell
		end tell
Technical Details
Message-ID: <3bc1455a.5@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed0.kamp.net!newsfeed.kamp.net!news.buerger.net!news.isoc.lu!webcrossing
References: <3bc1455a.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,93e9c2f7bc40a331
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Kelly_Vaughn@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed0.kamp.net!newsfeed.kamp.net!news.buerger.net!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: AS - Need to make dialog boxes and then do calulations
Message-ID: <3bc1455a.5@webcrossing.la2eafNXanI>
Date: Tue, 5 Sep 2006 08:41:55 -0700
References: <3bc1455a.-1@webcrossing.la2eafNXanI>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit