Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 150094

What does #include do?

$
0
0

Hi everyone,

 

This is a general questions about #include.

 

I wrote a very long script (around 2000 lines) that imports idml files that have been translated, creates new paragraph styles based on the language, searches the text for keywords and adds hyperlinks to them. Although it worked, it was temperamental. Sometimes it would error, sometimes it just wouldn't create the hyperlinks, and other times it just told me that objects were invalid.

 

So, since the script was made up of individual functions that each had a small task, I separated them into their own .jsx file and included them in one main file using #include. Then, I just called them one by one.

Now, it works every time, no errors.

 

I'm wondering, is there something about what's happening 'under the hood' that I should know about #include?

 

If anyone can shed some light on this, I'd appreciate it

 

Jake


Viewing all articles
Browse latest Browse all 150094

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>