RE: Scripting XML import in InDesign 2 on X
RE: Scripting XML import in InDesign 2 on X
- Subject: RE: Scripting XML import in InDesign 2 on X
- From: "Søren Rehné" <email@hidden>
- Date: Fri, 1 Nov 2002 11:46:31 +0100
Look at this script:
I'm using RealBasic to call this script.
Parameter is the xml file to import into current opened document.
on testit(infile)
copy "" to myres
try
copy (infile as string) to myfile
copy "OK" to myres
if (myfile as string) is not "" then
tell application "InDesign 2.0.1"
copy user interaction level of it to mylevel
set user interaction level to never interact
tell document 1
try
import XML from myfile
copy "OK" to myres
save
on error sre
copy "ERROR: During import: " & sre to myres
end try
end tell
set user interaction level of it to mylevel
end tell
else
copy "ERROR: Called Import of XML with an empty fil call!"
to myres
end if
on error sre
copy "ERROR: " & sre to myres
display dialog myres
end try
return myres
end testit
on run (afile)
return testit(afile)
end run
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden] On Behalf Of
>
Mattias Jonsson
>
Sent: 1. november 2002 11:24
>
To: email@hidden
>
Subject: Scripting XML import in InDesign 2 on X
>
>
>
Hello
>
Can anyone point me to the right direction on how to script
>
the import
>
of an XML file into an InDesign file.
>
The import works great manually in InDesign, but I just can't
>
understand how it's done with applescript.
>
Anyone?
>
>
best regards
>
/Mattias Jonsson _______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/ap> plescript-users
>
>
Do not post admin requests to the list. They
>
will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.