Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Illustrator objects into ToolBook

3 views
Skip to first unread message

Morten Brydensholt

unread,
Nov 9, 2009, 3:40:02 PM11/9/09
to
I have an Illustrator file with around a hundred objects in different layers.

I want to put some action into the pictures and export for dhtml.

Is it possible to have these objects copied into ToolBooks as separate pictures without picking the objects one by one?

Best regards
Morten

Darrel

unread,
Nov 9, 2009, 9:17:51 PM11/9/09
to
Yes, I did the following and it worked perfectly.
The most important part of this (OpenScript code) was from a post I found on
the list from a reply to a post by Daniel Kirsch.

First you will have to save your Illustrator layers to individual files
(jpgs, gif or png). If you have CS4 you can do this by choosing save for web
& devices. In the dialog box that opens, click the layers tab and select
export as CSS layers. Then choose the file type in the preset dropdown. I
used jpg - medium quality. You will then be prompted to provide a location
for the files. Save.

Now, in Toolbook, even though you are exporting to DHTML, change the book
deployment for the time being to Native (again, the experts here may have a
better way but this worked for me.) so you can create and use a viewer
(explained next).

Add a page at the end of your book and then select insert - new viewer -
custom viewer.
Behind the viewer that pops up will be the properties for the viewer. In the
properties make the following selections:

- Give it a name
- in behavior tab, select always at reader level
- in style - border style choose dialog frame (not sure why but..)

Next you will place a button in the viewer and add the following OpenScript
code to it (cut and paste it):


to handle buttonClick

filterList = "Pictures (*.bmp;*.jpg;*.gif),*.bmp;*.jpg;*.gif"
fileList = getFileListDlg("Import pictures...",null,null,filterList,1)
if fileList <> null
in mainWindow
sysLockScreen = true
if itemCount(fileList) = 1
importGraphic (item 1 of fileList)
-- you need the following line only if you don't
want a border around your picture
if selection <> null and itemCount(selection) = 1
linestyle of selection = none
end if
else
pictureDirectory = item 1 of fileList
step i from 2 to itemCount(fileList)
importGraphic pictureDirectory & "\" & item
i of fileList
if selection <> null and
itemCount(selection) = 1
linestyle of selection = none
end if
end step
end if
sysLockScreen = false
end in
end if
end buttonClick


Okay, you're there now.

Go to the page in your book where you want to import the multiple pictures
and click the button in the viewer. If everything is correct, you will get a
dialog box asking for the file list. However many pictures you select will
be placed on the page you are currently on. This will work on as many pages
as you want, just keep bringing up the viewer. When you are finished, delete
the viewer and change the book back to DHTML.

The script that Daniel posted included a DLL link, I deleted this from the
above script because I am using 9.5 and it didn't need the link (threw an
error with it in). I am not sure about prior versions so here is a link to
the original post in case you need it.

http://listserv.nethelps.com/main/wa.exe?A2=ind0202C&L=toolbook&P=R6003&I=-3

I hope this helps.

- Darrel


-----Original Message-----
From: ToolBook Discussion List [mailto:tool...@LISTSERV.PLATTECANYON.COM]
On Behalf Of Morten Brydensholt
Sent: Monday, November 09, 2009 3:39 PM
To: tool...@LISTSERV.PLATTECANYON.COM
Subject: Illustrator objects into ToolBook

I have an Illustrator file with around a hundred objects in different =
layers.

I want to put some action into the pictures and export for dhtml.

Is it possible to have these objects copied into ToolBooks as separate =
pictures without picking the objects one by one?=20

Best regards
Morten

m...@jitt.dk

unread,
Nov 11, 2009, 9:42:55 AM11/11/09
to

Thanks Darrel,

I look forward to try it and save a lot of time :-)

Best Regards
Morten

On Tue 10/11/09 03:17 , Darrel met...@METABOL-VIDEO.COM sent:


Yes, I did the following and it worked perfectly.
The most important part of this (OpenScript code) was from a post I found
on
the list from a reply to a post by Daniel Kirsch.

First you will have to save your Illustrator layers to individual files
(jpgs, gif or png). If you have CS4 you can do this by choosing save for
web

end buttDEFANGED_OnClick

Okay, you're there now.

Go to the page in your book where you want to import the multiple
pictures
and click the button in the viewer. If everything is correct, you will
get a
dialog box asking for the file list. However many pictures you select
will
be placed on the page you are currently on. This will work on as many
pages
as you want, just keep bringing up the viewer. When you are finished,
delete
the viewer and change the book back to DHTML.

The script that Daniel posted included a DLL link, I deleted this from
the
above script because I am using 9.5 and it didn't need the link (threw an
error with it in). I am not sure about prior versions so here is a link
to
the original post in case you need it.

I hope this helps.

0 new messages