#Include js file into imacros

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

#Include js file into imacros

by penfold1992 on Wed Feb 04, 2015 9:22 am

Hello again :)

is it possible to include a javascript file within another javascript file (or imacro)

coming from C programming, I would use something like:
Code: Select all
#include <file.h>

as an example.
Is this possible to do within javascript and more importantly imacros?

(i know that you can include into a websites document header however that is not the case here)

Kind Regards,
Penfold
penfold1992
 
Posts: 12
Joined: Wed Jan 21, 2015 9:07 am

Re: #Include js file into imacros

by chivracq on Wed Feb 04, 2015 7:11 pm

penfold1992 wrote:Hello again :)

is it possible to include a javascript file within another javascript file (or imacro)

coming from C programming, I would use something like:
Code: Select all
#include <file.h>

as an example.
Is this possible to do within javascript and more importantly imacros?

(i know that you can include into a websites document header however that is not the case here)

Kind Regards,
Penfold

CIM...! :mrgreen:

(You did better in your previous Threads, don't be ashamed of your exotic Config... :shock: (But I don't answer when FCI is missing... (Even if you think it's not relevant...)))
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: #Include js file into imacros

by penfold1992 on Thu Feb 05, 2015 2:46 pm

chivracq wrote:CIM...! :mrgreen:

-sigh- yes i didnt think it was relevant but your sig tells me otherwise :)

iMacro's - 8.6.0
Browser - Firefox 17.0.8 (dont judge! I am unable to update past this version!)
OS - Windows 7 64bit

as usual :D
penfold1992
 
Posts: 12
Joined: Wed Jan 21, 2015 9:07 am

Re: #Include js file into imacros

by chivracq on Thu Feb 05, 2015 5:53 pm

penfold1992 wrote:
chivracq wrote:CIM...! :mrgreen:

-sigh- yes i didnt think it was relevant but your sig tells me otherwise :)

iMacro's - 8.6.0
Browser - Firefox 17.0.8 (dont judge! I am unable to update past this version!)
OS - Windows 7 64bit

as usual :D

OK, now we can talk...! :D

I would think your Question is a bit the same like in this Thread that I answered just 1h before you posted your last Post, if you had looked a bit around on the Forum, you could have found it by yourself...: :idea:
- Global extension object jsPrintSetup not visible
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: #Include js file into imacros

by penfold1992 on Mon Feb 09, 2015 8:58 am

hmmm, not quite what I was looking for however I dont think what I am looking for is possible...

what I want to be able to do is include a function that is within another js file that is stored on my PC.

instead of using iimPlay('jsfile'); to play a macro, I want to be able to copy the content of that js above my current code... the js file is stored in the same location as where the executed macro is running.

Code: Select all
Macros (folder)
|
|____ macro.js
|
|____ include.js


so within macro.js, can I call the functions that are defined within include.js

Thanks,
Penfold
penfold1992
 
Posts: 12
Joined: Wed Jan 21, 2015 9:07 am

Re: #Include js file into imacros

by chivracq on Mon Feb 09, 2015 6:46 pm

penfold1992 wrote:hmmm, not quite what I was looking for however I dont think what I am looking for is possible...

what I want to be able to do is include a function that is within another js file that is stored on my PC.

instead of using iimPlay('jsfile'); to play a macro, I want to be able to copy the content of that js above my current code... the js file is stored in the same location as where the executed macro is running.

Code: Select all
Macros (folder)
|
|____ macro.js
|
|____ include.js


so within macro.js, can I call the functions that are defined within include.js

Thanks,
Penfold

Sorry, I'm no JavaScript Guru, but to iMacros it doesn't make a Difference if your .js Library is in a specific Sub-Sub-Sub-Directory or somewhere on the Web..., the JavaScript Runtime Engine must just be able to find it..., either you "include" it using 'Skippy2''s Methode in one of the Threads I've referenced to (I would still like a Conf that it works...!), or you just Copy&Paste the whole part covering the Funcs Declarations that you need...

So, have you tried 'Skippy2''s Method and does it work of where do you stuck...?
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 2 guests

-->