🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20283

How do I best repeat this script? (AS)

#20283
From: Richard Ronnback
Date: Sat, 03 Aug 2002 07:38
48 lines
2707 bytes
I'm am trying to modify a script included in OS X  which calls an XML-RPC server and gets a delayed stock quote so that it will generate an InDesign page filled with different stock quotes. 

I have got the basic script working but I would really need some help on to repeat it in an effcient way so that the script doesn't become ridiculously verbose 

Here's the script 

 
�(* 
WSDL URL:	http://services.xmethods.net/soap/urn <http://services.xmethods.net/soap/urn>:xmethods-delayed-quotes.wsdl � 
(IBM WSDL Toolkit 1.1 - compatible version)  
* )

-- SET THE DEFAULT VALUES 
property SOAP_Endpoint_URL : "http://services.xmethods.net:80/soap" 
property SOAP_app : "soap" 
property method_name : "getQuote" 
property method_namespace_URI : "urn:xmethods-delayed-quotes" 
property SOAP_action : "" 

-- SET WHICH STOCK TO LOOK  UP USING NASDAQ SYMBOLS, Other symbols to use for testing purpose could be APPL, MACR, MSFT etc. 
set this_text to "ADBE" 

-- CREATE THE PARAMETER RECORD 
set the method_parameters to {Symbol:this_text} 

-- CALL THE SOAP SUB-ROUTINE 
on SOAP_call(SOAP_Endpoint_URL, method_name, method_namespace_URI, method_parameters, SOAP_action) 
	using terms from application "http://www.apple.com/placebo" 
		tell application SOAP_Endpoint_URL 
			set this_result to call soap � 
				{method name:method_name � 
					, method namespace uri:method_namespace_URI � 
					, parameters:method_parameters � 
					, SOAPAction:SOAP_action} 
		end tell 
	end using terms from 
	return {this_result} 
end SOAP_call 

copy my SOAP_call(SOAP_Endpoint_URL, method_name, method_namespace_URI, method_parameters, SOAP_action) to {call_result} 

-- MOVE RESULTS TO INDESIGN 
tell application "InDesign 2.0.1" 
	set myDocument to active document 
	tell spread 1 of myDocument 
		set contents of text frame 1 to (this_text & tab & call_result) 
	end tell 
end tell 
Technical Details
Message-ID: <efa015e.-1@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!64.152.100.70.MISMATCH!ps01-sjc1!newsfeeds-atl2!news.webusenet.com!news-hub.siol.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,16dcc64bf297b7d,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-08-03 01:11:16 PST
From: "Richard Ronnback" <richard.ronnback@telia.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!64.152.100.70.MISMATCH!ps01-sjc1!newsfeeds-atl2!news.webusenet.com!news-hub.siol.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: How do I best repeat this script? (AS)
Message-ID: <efa015e.-1@WebX.aaQKaf7vad4>
Date: Sat, 3 Aug 2002 00:38:29 -0700
Lines: 58
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit