• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Applescript, VectorScript & VectorWorks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Applescript, VectorScript & VectorWorks


  • Subject: Applescript, VectorScript & VectorWorks
  • From: Dan Belfiori <email@hidden>
  • Date: Thu, 21 Oct 2004 02:24:22 -0700

I've been struggling for quite a while with the following text problem.
Am I missing something obvious?
I'm using applescript to assemble and run VectorScripts (Scripting language for VectorWorks)
The following script demonstrates the problem I can't solve.


--Begin applescript--------------------------
set TestList to {"Printer1", "Printer2"}
tell application "Printer Setup Utility" to set PrinterList to the name of every printer
tell application "Finder" to set AppNames to the name of every application process


AssembleScript(TestList) --this works
AssembleScript(AppNames) --this fails "VectorWorks got an error: Some data was the wrong type."
AssembleScript(PrinterList) --this fails "VectorWorks got an error: Some data was the wrong type."


on AssembleScript(SomeList)
	set VWtext to "Procedure Test;" & return & "BEGIN" & return
	repeat with anitem in SomeList
		set VWtext to VWtext & "AlrtDialog('" & anitem & "');" & return
	end repeat
	set VWtext to VWtext & "END;" & return & "Run(Test);"
	tell application "VectorWorks"
		activate
		DoScript VWtext
	end tell
end AssembleScript

--end applescript-----------------------

When I paste the text of the failed script (captured from the clipboard in handler AssembleScript above) in an applescript:

tell application "VectorWorks"
activate
doscript "<<pasted text>>"
end tell

the script succeeds!? something in the way the text is formatted in variables and clipboard is fooling VW
db


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Applescript, VectorScript & VectorWorks
      • From: Doug McNutt <email@hidden>
    • Re: Applescript, VectorScript & VectorWorks--a solution
      • From: Dan Belfiori <email@hidden>
  • Prev by Date: Re: Set Volume / Get Volume ?
  • Next by Date: Adobe Photoshop CS - vulnerability or feature?
  • Previous by thread: Re: writing and reading list vars to text file
  • Next by thread: Re: Applescript, VectorScript & VectorWorks--a solution
  • Index(es):
    • Date
    • Thread