Results 1 to 5 of 5

Thread: How to call javascript in vb

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    3

    Thumbs up How to call javascript in vb

    I have developed javascript(.js) for adobe illustrator. Now i need to know how to call javascript from vb6.

    Regards,
    Maria

  2. #2
    Fanatic Member Dungeon Keeper's Avatar
    Join Date
    Mar 2008
    Posts
    590

    Re: How to call javascript in vb

    Try to look for your answer here

    Edit:

    Sorry, here:
    http://msdn2.microsoft.com/en-us/lib...4a(VS.85).aspx

  3. #3
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: How to call javascript in vb

    What do you mean call JavaScript from VB? JavaScript is a language written for web browsers, and it uses the browser's object model, ie: DOM (Document Object Model).

    Can you give an example what you want to do?

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to call javascript in vb

    If I'm remembering correctly, Illustrator can work with JavaScript, accept certain commands, etc. What I don't know is how Illustrator accepts the .js (or .vbs for that matter). It may be a commandline argument, but you will need to consult the Illustrator documentation on how this can be invoked via command line. Once you get that, I'm sure VB6's Shell can help you.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    3

    Re: How to call javascript in vb

    Quote Originally Posted by mendhak
    If I'm remembering correctly, Illustrator can work with JavaScript, accept certain commands, etc. What I don't know is how Illustrator accepts the .js (or .vbs for that matter). It may be a commandline argument, but you will need to consult the Illustrator documentation on how this can be invoked via command line. Once you get that, I'm sure VB6's Shell can help you.
    I called the javascript(.js) file through visual Basic for Adobe illustrator CS. Its working nice. But some times javascript runtime error occured. But if i run the .js file directly, it does not throws any error. Could you please advice me.

    code:
    Dim docref As Illustrator.Document
    Dim appRef As New Illustrator.Application
    appRef.DoJavaScriptFile ("C:\HH.js")

    Thanks,
    Maria

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width