CS3 [JS] Placing Library Items
myDoc = app.activeDocument
myRule = app.libraries[0].assets[0].placeAsset(myDoc);
myRule.move(myDoc.pages[0]);
I get an error myRule.move() is not a function. What am I doing wrong?
myRule is definitely getting a reference to the placed item (a text
frame), so it says in the Data Browser.
Hmm... I tried myRule.remove() and it gives me a similar error.
Apparently, despite the fact the data browser is showing I have a
reference to the item, I don't. Why would that be?
Similar Messages
-
Placing library item into page
This script for placing library item into page and applying object style to the item. In line 16, script shows that "assets" property does not support. Please resolve this.
if (app.documents.length==0){
alert("Please open the Document");
exit();
if (app.libraries.length==0){
alert("Please open the Library");
exit();
app.findTextPreferences=app.changeTextPreferences=null;
app.findTextPreferences.appliedParagraphStyle="MN";
var myfound=app.activeDocument.findText();
alert(myfound.length);
for(i=0; i<myfound.length; i++){
var mylib=app.libraries.assets.itemByName("Box").placeAsset(myfound[i].insertionPoints[0]);
var mymove=myfound[i].move(LocationOptions.atBeginning, mylib.insertionPoints[0])
mylib.appliedObjectStyle="MN_Obj";To make that work, you have to address an open library (line 16).
app.libraries describes the collection of all open libraries, not a distinct one.
If only one library is open you could address the one with its index:
app.libraries[0]
If you already know the name of the library or better, the exact path of the library, you can:
1. Make sure to open it
2. Call it by its name
Let's assume you know the name and you know that the asset you want to place is stored inside, you could do it this way:
app.libraries.itemByName("TheNameOfTheLibrary").assets.itemByName("Box").placeAsset(
/*Wherever you want*/
Now, what will this line return?
A library object? Hardly. So be cautious with using a variable name like "mylib".
According to documentation it is returning an Array, and we can assume, that in this array is the object that is placed out of the library. Your asset stored in the library which goes by the name of "Box". Whatever that is.
If you want to find out, you can use the following, more descriptive variable: "myPlacedAsset". That sounds more neutral.
var myPlacedAsset = app.libraries.itemByName("TheNameOfTheLibrary").assets.itemByName("Box").placeAsset(
/*Wherever you want*/
Using the ESTK (ExtendScript Toolkit) together with $.writeln() can write the true nature of the placed asset to your JavaScript Console:
$.writeln(myPlacedAsset.constructor.name);
is informing you what kind of object "myPlacedAsset" really is. If indeed it is an Array, you could look for its length. If its length is "1", you get to the "heart" of your placed object by:
$.writeln(myPlacedAsset[0].constructor.name);
Or by that more inquisitory question:
$.writeln(myPlacedAsset[0].getElements()[0].constructor.name);
If your array is of a greater length, you have to loop through this array and question every single object!
Before testing, exchange my comment "/*Wherever you want*/" with the code you like to use: Obviously the first insertion point of your found text. Hold on! This will backfire to you, because every time you place one instance of the asset you will add a character to your found text and shift the original insertionPoint. Better loop from back to forth or do the search from back to forth.
Adobe InDesign CS6 (8.0) Object Model JS: Text
Please, try that and report back…
(Isn't noone reading the documentation these days?)
Indesign JavaScript Help
Adobe InDesign CS6 (8.0) Object Model JS: Table of Contents, Libraries Suite
Adobe InDesign CS6 (8.0) Object Model JS: Library
Adobe InDesign CS6 (8.0) Object Model JS: Asset
Adobe InDesign CS6 (8.0) Object Model JS: Asset
Uwe -
How to use a Spry Menu as a Library item?
Okay, this is my second post; but, with a different title.
I made a Spry menu for my Home Page. I saved it and a logo
together as a library item and placed the library item on a second
page. The links in the menu work when there is no style sheet
attached for the Spry meny and the menu appears just as text; but,
as soon as the .css style sheet for the menu is attached to the
second page, the menu appears correct except the drop down menus do
not work. I tried adding a link to the Spry Java Script file as it
is on the home page; still no luck.
I tried the same with a test file, which I have since
removed, stored at the same folder as the home page; same problem.
How are we suposed to make a workable library item with a
Spry Menu? Surely this is possible, no?
Here are the two pages I am referring to:
Good Page:
http://iculver.com/
Bad Page:
http://iculver.com/pages/AboutUs/Personal_info.htmlApologies - my mistake. You are correct, and my instructions
were
incomplete. That other bit is required too.
> Now, I thought (probably in error) that items after !--
were comments, but
> it
> seems to be required, too. I tried eliminating taht part
and the menus did
> not
> work. I need all of this last part.
The comments 'hide' the scripting from validators and older
browsers, but
it's still recognized as javascript, since the comments occur
INSIDE a
<script> tag.
> these Spry Menus in Libraries easier to use...)
It's not so hard once you get all the pieces together.
1. Create the library item as described.
2. Make sure that each page that is to carry this library
item has the
required links in the head (to the CSS and the js files), AND
in the body.
Why not use a template instead? That way, all of these links
are managed
for you.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"JustBob" <[email protected]> wrote in
message
news:[email protected]...
> Hummm...
>
> Now, don't yell at me, okay? I'm a goLive switcher and
really a graphic
> designer, not a coder...
>
> So, It seems from the above message that I am to
establish the links to
> the
> script and the css file before inserting the library
item. But, either
> way,
> that didn;t do the trick for me. I did find a bit of
code in one of the
> pages
> that seems to be required.
>
> It seems I also need to insert this just before the
close of the body tag:
>
> <script type="text/javascript">
> <!--
> var MenuBar1 = new Spry.Widget.MenuBar("MenuBar",
> {imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
> imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
> //-->
> </script>
>
> Now, I thought (probably in error) that items after !--
were comments, but
> it
> seems to be required, too. I tried eliminating taht part
and the menus did
> not
> work. I need all of this last part.
>
> I'm sorry I'm such a dope. I probably did something
funny when I was
> styling
> the menu. (I do hope Adobe can accommodate dopes lime
me, though, and make
> these Spry Menus in Libraries easier to use...)
>
> Thanks for all of your help! Really!
> -
DW won't let me change a library item "change will be discarded"
I built a site and I have library items for my logo and
navigation and some thumbnails. I want to use a different file/lbi
file for my header. When I delete the current library item and try
to put a new one in, I get this message: "making this change would
require changing code that is locked by a template or translator.
The change will be discarded." I honestly don't know what to do; I
really need to specify a different file for my header but it won't
let me, and I have over 100 pages and I made all thumbnails,
rollovers, and all links manually and the file that it's using
isn't working right. I just want to put the correct one in there; I
don't know how I can possibly build my site completely from scratch
- what can I do?
This is a related issue, but I'm not sure how: I have two
library items named the same thing in two different folders; some
files refer to one, some to the other, but I want them all to refer
to the correct one; I can't make change since I get that error
message. I'm confused about which file is which, I'd deleted one
before, then restored it...thank you so much for any help. I'm
trying to build my portfolio site for an art exhibition...Happily. One of the pages of the site I'm having problems
with is
http://www.hopeedwards.com/TEST_new_website/Hope_website/assorted_art.htm
I also attached code for it. [note: the home/index page only
works in Firefox but the other tabs work in IE and Safari. Also,
everything is shoved down wrong in IE and it only looks right in
Firefox] I am running Adobe CS3 on an Intel based Mac Pro with
Tiger OSX 10.4. I'm having trouble with a couple library items. The
very top library item is logo_and_navigation.lbi - all was okay
with it except I somehow had a couple different copies of it in my
Library folder, so I moved one of them to a folder within the site
called "Trashes". Then I deleted that one because I didn't want two
copies and the logo and nav disappeared on some pages that used
that one. I reinstated it in the trashes folder. The pages that use
that located in the Trashes folder are the index, Assorted Art, and
Commercial Work. The ones that use the one in the Library folder
are Clue Series and About & Contact.
I would like them all to use just one file so I only have to
edit one file if I make changes. I've tried several things: I've
tried selecting and deleting the item in the documents and
inserting the proper copy. It won't let me. I get the message
"making this change would require changing code that is locked by a
template or translator. The change will be discarded." I've tried
doing a Find and Replace and replacing the word Trashes with
Library to specify the correct folder info but that doesn't work,
probably because it can't change code in the library item.
I had a similar problem with the thumbnails library items
when I tried to build my other pages doing a File Save As from the
first one I built in Assorted Art. When I tried to create a
Commercial Work page from it, I deleted the thumbnails library item
because it was the Assorted Art thumbnails. When I tried to insert
the Commercial Work thumbnails library item I got that error
message. It was so frustrating; I had to go in and build the
Commercial Work page from scratch. I had to do that with each
different tab. It just doesn't seem right that you can't swap out
library items.
Anyway, I'd completely appreciate any help or feedback! I
really would!
Hope -
Library items in DWT templates
I have setup a dynamic menu and created a library item from
it. When I insert it into a new document (or update the library
item) the urls within it keep getting the prefix /library/ added
and so don't work:
original menu
===========
<div id="lhsidemenu">
<ul>
<?php
require_once('Connections/ecommercetemplate_523.php'); ?>
<?php
mysql_select_db($database_ecommercetemplate_523,
$ecommercetemplate_523);
$query_categorymenu = "SELECT sectionID, sectionName FROM
sections ORDER BY sectionName ASC";
$categorymenu = mysql_query($query_categorymenu,
$ecommercetemplate_523) or die(mysql_error());
$row_categorymenu = mysql_fetch_assoc($categorymenu);
$totalRows_categorymenu = mysql_num_rows($categorymenu);
?>
<?php do { ?>
<li><a href="products.php?cat=<?php echo
$row_categorymenu['sectionID']; ?>" ><?php echo
ucwords($row_categorymenu['sectionName']);
?></a></li>
<?php } while ($row_categorymenu =
mysql_fetch_assoc($categorymenu)); ?>
<?php
mysql_free_result($categorymenu);
?>
</ul></div>
Menu after becomin a library item
==========================
<!-- #BeginLibraryItem "/library/categorymenu.lbi" -->
<div id="lhsidemenu">
<ul>
<?php require_once('
library/Connections/ecommercetemplate_523.php'); ?>
<?php
mysql_select_db($database_ecommercetemplate_523,
$ecommercetemplate_523);
$query_categorymenu = "SELECT sectionID, sectionName FROM
sections ORDER BY sectionName ASC";
$categorymenu = mysql_query($query_categorymenu,
$ecommercetemplate_523) or die(mysql_error());
$row_categorymenu = mysql_fetch_assoc($categorymenu);
$totalRows_categorymenu = mysql_num_rows($categorymenu);
?>
<?php do { ?>
<li><a href="
library/products.php?cat=<?php echo
$row_categorymenu['sectionID']; ?>" ><?php echo
ucwords($row_categorymenu['sectionName']);
?></a></li>
<?php } while ($row_categorymenu =
mysql_fetch_assoc($categorymenu)); ?>
<?php
mysql_free_result($categorymenu);
?>
</ul></div><!-- #EndLibraryItem -->
doe anyone know how to resolve this? thanksYou are placing this library item into an editable region of
the child page?
Why do this instead of just using an include?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"bikeman01" <[email protected]> wrote in
message
news:[email protected]...
>I have setup a dynamic menu and created a library item
from it. When I
>insert
> it into a new document (or update the library item) the
urls within it
> keep
> getting the prefix /library/ added and so don't work:
>
> original menu
> ===========
>
> <div id="lhsidemenu">
>
> <?php
require_once('Connections/ecommercetemplate_523.php'); ?>
> <?php
> mysql_select_db($database_ecommercetemplate_523,
$ecommercetemplate_523);
> $query_categorymenu = "SELECT sectionID, sectionName
FROM sections ORDER
> BY
> sectionName ASC";
> $categorymenu = mysql_query($query_categorymenu,
$ecommercetemplate_523)
> or
> die(mysql_error());
> $row_categorymenu = mysql_fetch_assoc($categorymenu);
> $totalRows_categorymenu = mysql_num_rows($categorymenu);
> ?>
> <?php do { ?>
>
<a href="products.php?cat=<?php echo
> $row_categorymenu['sectionID']; ?>" ><?php echo
> ucwords($row_categorymenu['sectionName']);
?></a></li>
> <?php } while ($row_categorymenu =
> mysql_fetch_assoc($categorymenu)); ?>
> <?php
> mysql_free_result($categorymenu);
> ?>
>
</div>
>
> Menu after becomin a library item
> ==========================
> <!-- #BeginLibraryItem "/library/categorymenu.lbi"
-->
> <div id="lhsidemenu">
>
> <?php
> require_once('
library/Connections/ecommercetemplate_523.php'); ?>
> <?php
> mysql_select_db($database_ecommercetemplate_523,
$ecommercetemplate_523);
> $query_categorymenu = "SELECT sectionID, sectionName
FROM sections ORDER
> BY
> sectionName ASC";
> $categorymenu = mysql_query($query_categorymenu,
$ecommercetemplate_523)
> or
> die(mysql_error());
> $row_categorymenu = mysql_fetch_assoc($categorymenu);
> $totalRows_categorymenu = mysql_num_rows($categorymenu);
> ?>
> <?php do { ?>
>
<a href="
library/products.php?cat=<?php echo
> $row_categorymenu['sectionID']; ?>" ><?php echo
> ucwords($row_categorymenu['sectionName']);
?></a></li>
> <?php } while ($row_categorymenu =
> mysql_fetch_assoc($categorymenu)); ?>
> <?php
> mysql_free_result($categorymenu);
> ?>
>
</div><!-- #EndLibraryItem -->
>
>
> doe anyone know how to resolve this? thanks
> -
Template Expressions in Library Items?
Hi All,
The quick question is this: can template expressions be made
to work inside library items?
Here’s the situation…
The page:
http://www.fretbank.com/basics/intervals/index.html
I have a 3-tier template structure in place – 1-Root,
2-General Page Structure, 3-Topic Categories.
If you look at the page, I have buttons below the header that
point to different topics. Each topic has several pages. All of the
pages from each topic are child-pages from a specific Tier-3
template.
The buttons use template parameters/expressions on the Tier 3
temp. to determine the state of the button.
I currently have to copy the code for the button nav into
each topics template and any changes have to be made in each
template. I am going to be adding many more topics and want to find
a shortcut. I guess I could make a 4th template tier and have each
of the category templates be children of that, but I’m hoping
to avoid this. It would be easiest to be able to make a library
item and paste it where I need.
I thought about using SSI’s but that wouldn’t
work with the expressions. Any other suggestions?
Thanks,
Troy
here's the code if it helps:> Is having the link outside the div a problem in older
browsers?
It's invalid HTML. That's enough for me. And I suspect it
would be a
problem somewhere, as you are trying to make the entire
<div> tag a link.
> This allows me to only have to change each of these nav.
elements on one
> page.
I would opt for a single template structured so that changes
to CSS could
'specify' the particular section layout. Then I would choose
server-side
includes for the navigation elements, and place them into
strategically
placed editable regions of the single template, depending on
which section
you are needing to navigate.
Having only a single template is not only possible, it's MUCH
simpler than
nesting them.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Fret Man" <[email protected]> wrote in
message
news:[email protected]...
> Thanks for the reply Murray.
>
> A couple clarifications and questions. Sorry for the
length, but I felt it
> was
> better to be clear than concise.
>
> I am using nested templates.
>
> Since I posted the topic, I have changed my structure a
bit, trying to
> find a
> balance between flexibility and work load.
>
> I have a root template with has headers and common
includes.
>
> From the root template I nest multiple MAIN CATEGORY
templates for primary
> areas of the site. These templates contain the nav
buttons just below the
> header.
>
> From the MAIN CATEGORY temps I nest several SUB CATEGORY
templates for
> each
> topic in the category, which contain the code for the
"Quick Nav" box at
> the
> bottom of the page.
>
> The individual pages of the site are then built from the
sub category
> pages.
> The reason for all of the nesting is this: The MAIN
CATEGORY temps contain
> the
> code for the nav buttons and are built using temp.
expressions that look
> to a
> main category param on each of the sub category pages.
Depending on the
> param., the button that corresonds to which Main
Category you are in will
> be
> black (via CSS class)
>
> One the sub cat. temps the Quick nav link relative to
which page you are
> on
> will be black (also via CSS class)
>
> This allows me to only have to change each of these nav.
elements on one
> page.
> All of the different MAIN CAT. temps allow me to focus
advertising based
> on
> the subject. Maybe there is a better way to populate the
ads to different
> categories that I am not aware of? Is there a way to
have the button/links
> reflect the category/page you are on using only CSS? I
don't want to have
> to
> copy and paste changes to multiple pages when the
nav/topics change.
>
> ****
> I put the <a> tags inside the <div> tags,
based on multiple people telling
> me
> that I shouldn't do it the other way around. I hadn't
encountered any
> problems
> and liked that the whole button became a link. Is having
the link outside
> the
> div a problem in older browsers? I tested it this way in
IE7, Firefox2.0,
> Safari, and Opera, and it worked.
>
> -
Is there a way of individualy deleting default Library items in Encore CS3? (those installed as additional content)
Answered here:
jbowden, "Delete Library Items" #1, 22 Feb 2008 1:24 pm
Please try not to double-post. :) -
Is there a way of deleting individual default library items in Encore Cs3 (additional content)
Yes, select the item in the list, and then click the trash can button at the bottom of the Library panel.
-
This is a multi-part message in MIME format.
------=_NextPart_000_006D_01C6ACBA.1BE3DB50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I need to build a CSS enabled navigation bar and make it a
library item =
in dreamweaver.
My question is I want to put the CSS code right above the
menu bar in a =
block of code that will all be included in the library code.
Can I do =
this with CSS without the <style> tags being placed in
the head of the =
page?
Thanks
Scott Powell
------=_NextPart_000_006D_01C6ACBA.1BE3DB50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2912"
name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I need to build
a CSS enabled =
navigation bar and=20
make it a library item in
dreamweaver.</FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My question is I
want to put the CSS =
code right=20
above the menu bar in a block of code that will all be
included in the =
library=20
code. Can I do this with CSS without the
<style> tags being placed =
in the=20
head of the page?</FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial
size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Scott
Powell</FONT></DIV></BODY></HTML>
------=_NextPart_000_006D_01C6ACBA.1BE3DB50--This is a multi-part message in MIME format.
------=_NextPart_000_0387_01C6AD63.F7A6A920
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
>>>I need to build a CSS enabled navigation bar and
make it a library =
item in dreamweaver.
Why not make it a Server Side Include instead and avoid all
the =
maintenance hassles of Library items?
>>>My question is I want to put the CSS code right
above the menu bar in =
a block of code that will all be included in the library
code. Can I do =
this with CSS without the <style> tags being placed in
the head of the =
page?
Yes, by defining the styles inline but you're better off
setting up your =
CSS as a separate file then linking to it from the head of
the page.
--=20
Regards
John Waller
------=_NextPart_000_0387_01C6AD63.F7A6A920
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2912"
name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial
size=3D2>>>>I need to build a CSS =
enabled=20
navigation bar and make it a library item in
dreamweaver.</FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV>Why not make it a Server Side Include instead and
avoid all the =
maintenance=20
hassles of Library items?</DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial
size=3D2>>>>My question is I want to =
put the CSS=20
code right above the menu bar in a block of code that will
all be =
included in=20
the library code. Can I do this with CSS without the
<style> tags =
being=20
placed in the head of the
page?</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT><FONT=20
face=3DArial size=3D2></FONT><FONT face=3DArial
size=3D2></FONT><FONT =
face=3DArial=20
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Yes,
by defining the styles =
inline but=20
you're better off setting up your CSS as a separate
file then =
linking=20
to it from the head of the page.</FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial
size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT><FONT=20
face=3DArial size=3D2></FONT><FONT face=3DArial
size=3D2></FONT><FONT =
face=3DArial=20
size=3D2></FONT><BR>--
<BR>Regards</DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV>John Waller</DIV></BODY></HTML>
------=_NextPart_000_0387_01C6AD63.F7A6A920-- -
Is it possible to update all instances of a library item used in a document?
I've been using a library item in my doc, but now I'd like to change how it looks every that it is found in my doc. In Fireworks, one could update a symbol & apply the updates to every instance in a doc. Is there anyway to do that with InDesign CS 5.5?
What kind of library item? An image or graphic? Something you've drawn in InDesign? A block of text?
In the case of external graphics (linked to a graphic outside of InDesign), it's easy. Edit the graphic (TIFF, AI file, etc) in the original application, and it will update in InDesign.
I think ID 5.5 has an Edit > Place and Link option which can create a link between the original (parent) object and a placed example.
However, InDesign cannot create such a link using a library. -
Problem opening correct Fireworks program to edit Library item
I am working on a PC with the CS3 Suite -- Dreamweaver,
Fireworks, Photoshop, Flash, Illustrator, and Bridge. I used MX2004
before upgrading.
I have a Library Item I want to edit that was created in
Fireworks CS3. It is a "Fireworks HTML" rollover menu.
I open the Library item in DW CS3 and then go to the
"Properties" window and push the "Edit" button, which should open
the Library file in Fireworks CS3.
Instead, I get a message that DW CS3 is unable to launch
"Macromedia\Fireworks MX 2004\Fireworks.exe"
I have gone to "Edit" and then "Preferences" and ensured that
the File Types/ Editors for .png, .gif, and .jpg. jpe. jpeg is set
to "Adobe Fireworks CS3\Fireworks.exe"
Does anyone out there know what else I can do to correct this
problem?Do you still have Fireworks MX2004 on your system? If so, I
would remove it. If you are using Windows, you may need to edit the
Registry to remove entries for Fireworks MX2004. Also make certain
that all references to FW MX2004 are removed from Dreamweaver CS3's
preference window in the File Types/Editors tab.
Cheers,
Skip Keats -
Dreamweaver quits when updating library item
Sometimes it works fine for a week or so but suddenly it
starts crashing Dreamweaver (CS3) every time I'm updating a library
item throughout a local site. Any ideas why and how to avoid this?
Thanks,
Hanna> I really need to understand why library items crash my
Dreamweaver...
This may not be possible for you right now. At least SSI
would get you
going. But so be it.
Library item updates do not crash my DW. Sorry.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"HannaB" <[email protected]> wrote in
message
news:g4tkc4$nc1$[email protected]..
> Because I'm a slow learner and Library items work well
for what I do.
> Besides,
> server-side includes are confusing as I can't see them
on the local site,
> only
> when uploaded to the remote server (but please, don't
get into that at
> this
> point. I really need to understand why library items
crash my
> Dreamweaver...)
> -
Inserting a library item on a page using Javascript
Hello,
I have a library with 6 different layouts in it. I need to be able to place these on the page from an external program. I have all my code in place to send commands to Indesign, but I'm not sure how to reference the Library items. Can I reference them by name? As well, I would like my external custom app to be able to list all the library items so that the user can select which one to insert. I'm at a total loss as to how to do this.
I need help with these two things:
1) obtain an array or list of all the items in a particular Library, which is already open.
2) Once I have the list of library items I need to be able to place one or multiple on the page keeping track them so I can place images and text in the appropriate boxes.
Any help with this would be greatly appreciated. I'm using Indesign CS3 and my external app is coded in Objective-C on a Mac. I prefer Javascript as I'm very familiar with it as opposed to Applescript.
Thanks for any help provided.
Dave WilliamsAssuming you have access to the equivalent of doScript, when that is used to run a JavaScript, the final value of the script is returned (coerced to a string? I'm not sure).
Of course, you can always pass information from one place to another by using keyed labels. In my work (I spend most of my time writing scripts for Typefi Publish wherein the same script might get executed at the end of every page as the Typefi Engine composes the document), I often will add a keyed label to the document that passes information from one run of the script to the next. Here's an example (that includes reading the script itself to extract version information from the second line) -- while slightly inefficient, it has the benefit of putting the version info in a defined, easy to find place:
function registerFirstCall(aDoc, interactive) {
var scriptFile = getScriptPath();
var scriptName = scriptFile.name;
if (aDoc.extractLabel(scriptName) == "" || interactive) {
scriptFile.open("r");
var firstLine = scriptFile.readln();
var secondLine = scriptFile.readln();
scriptFile.close();
if (secondLine.indexOf("//VERSION: ") == 0) {
var msg = secondLine.split("//VERSION: ")[1].split("\n")[0];
} else {
var msg = "unknown";
aDoc.insertLabel(scriptName, "Registered");
TPSlog(scriptName + " version: " + msg, interactive);
}// end registerFirstCall
Ah, I see it uses the getScriptPath function, so for completeness, here it is:
function getScriptPath() {
// This function returns the path to the active script, even when running ESTK
try {
return app.activeScript;
} catch(e) {
return File(e.fileName);
} // end try
} // end getScriptPath
The TPSlog function either pops up an alert (when working interactively -- usually means during debugging) or adds a log message for the session (that also is managed with a document keyed label). The keyed label in this case is performing the trivial task of recording that the script has previously been run against this document, in which case, it doesn't need to log a message identifying its version info.
Hope this helps.
Dave -
Hi all,
Is it possible to place XML Element in Library Item in anchored mode like Placing XML Element in inline frame.
If so, how it can be done?
Regards,
JacinthaThanks Harbs, this has made things simpler.
I have heard your name mentioned several times today in the InDesign Secrets podcast (and Dave's too).
I am almost there with the script (my scripting is clumsy but I can usually get things to work mainly with help from this forum.
My last problem is that I am re-applying geometric bounds to the released anchored object as it is still being referenced as myAnchoredFrame.
Is it possible to release ALL the anchored objects in one go? Or how do I dump the reference to myAnchoredFrame once it has been released?
var myTextFrame = app.documents[0].textFrames.item("myTarget");
var myParagraphs = myTextFrame.paragraphs
for (var i = 0; i <= myParagraphs.length-1; i++) {
var nLines = myParagraphs.item(i).lines.length;
var myAnchoredFrame = myTextFrame.paragraphs.item(i).insertionPoints.item(0).textFrames.add();
var myHeight = nLines*myParagraphs[i].leading*.353
myAnchoredFrame.geometricBounds = [0, 0, myHeight, (myTextFrame.geometricBounds[3]-myTextFrame.geometricBounds[1])];
myAnchoredFrame.fillColor = "Gradient";
myAnchoredFrame.gradientFillAngle = 90;
myTextFrame.texts.item(0).recompose;
with(myAnchoredFrame.anchoredObjectSettings){
anchoredPosition = AnchorPosition.anchored;
anchorPoint = AnchorPoint.topLeftAnchor;
horizontalReferencePoint = AnchoredRelativeTo.anchorLocation;
horizontalAlignment = HorizontalAlignment.leftAlign;
verticalReferencePoint = VerticallyRelativeTo.capheight;
verticalAlignment = VerticalAlignment.topAlign;
anchorXoffset = 0;
anchorYoffset = -1;
pinPosition = false
myAnchoredFrame.anchoredObjectSettings.releaseAnchoredObject ()
myAnchoredFrame.sendToBack();
Thanks again
Simon Kemp -
Hi All,
I have coding to place Library Item into the Page Layout, my Script placing the library Item into that parent Page,
But my Problem is I can not place XMLElement Into that Library Element Box.
Here is my Script:
myDoc.select(myElement);
var mySideBarXML = app.selection[0];
try {
myAsset = myCurrentLib.assets.item("Box"); // Name of the library item is "bx1"
myLibraryItem = myAsset.placeAsset(myElement.insertionPoints[-1]);
catch (err) {
alert ("There is no library element with the name Box");
exit();
// TO PLACE TEXT IN LIBRARY ITEM
try {
myLibraryItem[0].textFrames[0].placeXML(mySideBarXML); // if the library element is group of frames.
catch (ee) {
try {
myLibraryItem[0].placeXML(mySideBarXML); // if the library element is a single frame.
catch (ee) { }
can any one help on this.
Regards
HurixHi hurix,
Are you try the above requirement in manually, You can't do even manually, because you already placed the library item into the XML text in between, again you drag the you respective box element xml text into the box, definitely its shown the error in InDesign like this...("Elements cannot be placed into an inline").
Now, what you have to do it for your requirement to meet. First you placed the library item into the respective page, then placed the box xml element content into the library item text frame.
try{
var mySideBarXML = myElement;
var myLibraryItem = app.libraries[0].assets.item("Box").placeAsset(myDoc)[0];// here you give the page, i.e., you selection element text parent page;
myLibraryItem.move(mySideBarXML.xmlContent.parentTextFrames[0].parentPage);
try {
myLibraryItem.textFrames[0].placeXML(myElement); // if the library element is group of text frame.
catch (ee) {
myLibraryItem.placeXML(myElement);// single text frame no group.
thx,
csm_phil,
Maybe you are looking for
-
Receiver determination step in the BPM and multiline container
i have made a file2file scenario where: there is a BPM, the BPM has a send step which contains a receive step, a transformation that mapps the incomin message to two messages(Split-messgae case), and then a FORK step which sends the two messges to th
-
Help!!! My ipod nano (3rd gen) won't sync!!
I am very confused and need someone's expert help with my Nano. I began downloading music like crazy. All was working well, suddenly one day, my ipod will no longer work on my computer; not recognized. I try everything I can think of, finally reso
-
Hi all, I'm trying to figure out why my macbook keeps freezing when I try to drag my data across to it (even small files from a USB). I've had to force restart over a dozen times today :/ I ran EtreCheck and there are a couple of issues (I've no idea
-
Implementing Auto Contract Generation/Negotiation and Execution
Would love to hear from anyone that has implemented auto contract generation/negotiation and execution. Were there any lessons learned you could share during implementation? Were there things you found out - too late? Are you seeing adoption? How
-
How to restore the volume control while playing music in iTunes
How do I recover the volume control (slider at the bottom of the screen) in iTunes when playing music? After I plugged the device into an iHome speaker, the volume control dissappeared.