Forums > Javascript

Can JavaScript and Max work together in a JavaScript script?

February 9, 2007 | 3:33 am

Hi, I new to both JavaScript as well as Max. I am currently working on a project and i was wondering if i can write an Extension for Firefox web browser using JavaScript. In this script, it actually make use of Maxobj to perform some task.
My idea goes like this:
1)Having this script saved in Maxfolder which its path is saved in firefox extension folder so that firefox web browser will know look into the script.
2)This script will make use of Maxobj to carry out specific tasks.

Some problems that i might face:
–>Firefox might not be able to understand Maxobj.
Really need any guidance now. Is there a way to allow Max to be used to carry out certain tasks and use the results to trigger the web browser?
Hope that anyone who’s experience enough could tell me if i idea is possible or not. I wouldn’t want to waste my time in carrying out something that is impossible since i’m having a deadline for this project. =)
Thanks for all the help.


February 9, 2007 | 5:22 pm

i’m gonna guess that you can’t get firefox’s and maxmsp’s javascripts
to talk to each other.
they are using separate engines and running in difference processes.
something i think you could probably do instead is call the firefox
executable using the "shell" external. but of course you’ll be
limited to what can be done with firefox on the command line…
basically, specifying a URL.

If you wanted to spend some time you could probably write a firefox
extension that can talk to maxmsp over a socket connection — i’m
actually currently looking into how to get the mozilla framework to
send and receive OSC/UDP messages. (so far, no progress. it’s
possible it can only be done by implementing it in C through XPCOM.)

steve

On 2/8/07, liwah wrote:
>
> Hi, I new to both JavaScript as well as Max. I am currently working on a project and i was wondering if i can write an Extension for Firefox web browser using JavaScript. In this script, it actually make use of Maxobj to perform some task.
> My idea goes like this:
> 1)Having this script saved in Maxfolder which its path is saved in firefox extension folder so that firefox web browser will know look into the script.
> 2)This script will make use of Maxobj to carry out specific tasks.
> Some problems that i might face:
> 1)Firefox might not be able to understand Maxobj.
> Really need any guidance now. Is there a way to allow Max to be used to carry out certain tasks and use the results to trigger the web browser?
> Hope that anyone who’s experience enough could tell me if i idea is possible or not. I wouldn’t want to waste my time in carrying out something that is impossible since i’m having a deadline for this project. =)
> Thanks for all the help.
>
>


February 14, 2007 | 6:14 am

Ok..thanks for your advise.=)


Viewing 3 posts - 1 through 3 (of 3 total)