Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
E

ebruinsma

@ebruinsma
About
Posts
7
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Newbie: Using a com object in VC 7.1
    E ebruinsma

    I have added the reference to the com object, what do I have to do to get an object of the type InDesign.Application? Or am I going wrong way with this :confused: Let me clearify what I'm trying to get: I want a simple webservice, that will allow me to call the 'runscript' method on the Adobe InDesign COM object. The webservice I was able to create, now I only need to call the runscript from the webservice and return it's results. So if someone knows a different way to do this in c++, your help is more than welcome... TIA Erik

    Managed C++/CLI help c++ com csharp java

  • Newbie: Using a com object in VC 7.1
    E ebruinsma

    I had this commented out, and some other parts, because i've been trying to combine different examples I found on the net. And the "using" doesn't seem to make a difference, while I still get the same "error C2065: 'InDesign' : undeclared identifier " error.:( Erik

    Managed C++/CLI help c++ com csharp java

  • Newbie: Using a com object in VC 7.1
    E ebruinsma

    Hello, After trying to figure this out for days, and getting more and more frustrated, I decided that I need some help with my problem. I'm working in Microsoft Visual C++ .NET version 2003 Standard, an just learnt from posting in the Visual C++ forum that I'm using managed C++, so I'm reposting my question in this forum. My problem is this, I'm trying to create a webservice that allows me to run Java scripts in an Adobe InDesign instance. I've got sample code of how someone else created it in Visual Basic, but I've only got visual c++ v7.1 (bought it for an InDesign plugin Project, wich we're not going to do because it's just to complicated, and the Javascript seems to be enough for our needs) Seeing that the only code that he needed to insert himself is about 8 lines, and the rest was automaticly generated by starting a new webservice project, I foolishly thought that it shouldn't be that hard to recreate that functionality into c++. Creating the webservice was that easy indeed, you even got a "hello world" without even coding a single line. The VB I want to recreate is: Public Function DoScript(ByVal script As String) As String Try Dim ind As InDesign.Application ind = CreateObject("InDesign.Application.CS2", "localhost") Dim x As String = ind.DoScript(script, InDesign.idScriptLanguage.idJavascript) Return x Catch ex As Exception Return "An error occurred: " & ex.Message End Try End Function I found this article on this site and used it as a lead. http://www.codeproject.com/Purgatory/Adobe_InDesign_COM_object.asp[^] So I started by adding a reference to the InDesign com object to my project, and as far as I can see that was succesful. But when I want to compile the following code, I get the following error message: #include "stdafx.h" #include "InDesignCS2Class.h" #include "Global.asax.h" //using namespace Interop::InDesign; namespace InDesignCS2 { String* InDesignCS2Class::RunScript(String* script) { // create an InDesign instance InDesign.Application app = (InDesign.Application) COMCreateObject("InDesign.Application"); // get a reference to the current active document //InDesign.Document doc = app.ActiveDocument; // get the first page //InDesign.Page page = (InDesign.Page) doc.Pa

    Managed C++/CLI help c++ com csharp java

  • Newbie: Using a com object in VC 7.1
    E ebruinsma

    Ok, I'll try it there. Thanx

    C / C++ / MFC help c++ com java javascript

  • Newbie: Using a com object in VC 7.1
    E ebruinsma

    Sorry, I don't know what the diference is between those languages:confused:, I thought that when I use MicroSoft's visual C++ that I was using c++, with their compiler. How can I see what I'm using. What I did to create the project, was: Choose new project from the file menu, and choose: visual c++ project/.net/ ASP.NET web service. So, my question still is what do I need to do, to get a webservice that allows me to call runscrip in InDesign. TIA Erik.

    C / C++ / MFC help c++ com java javascript

  • Newbie: Using a com object in VC 7.1
    E ebruinsma

    Hi Cedric, Yes, I'm working in Microsoft Visual C++ .NET version 2003 Standard. That will be the problem then, but can you tell me what is the correct way to use a/the InDesign com object, because I'm completely lost. Erik

    C / C++ / MFC help c++ com java javascript

  • Newbie: Using a com object in VC 7.1
    E ebruinsma

    Hello, After trying to figure this out for days, and getting more and more frustrated, I decided that I need some help with my problem. My problem is this, I'm rying to create a webservice that allows me to run Java scripts in an Adobe InDesign instance. I've got sample code of how someone else created it in Visual Basic, but I've only got visual c++ v7.1:( (bought it for an InDesign plugin Project, wich we're not going to do because it's just to complicated, and the Javascript seems to be enough for our needs) Seeing that the only code that he needed to insert himself is about 8 lines, and the rest was automaticly generated by starting a new webservice project, I foolishly thought that it shouldn't be that hard to recreate that functionality into c++. Creating the webservice was that easy indeed, you even got a "hello world" without even coding a single line:). The VB I want to recreate is: Public Function DoScript(ByVal script As String) As String Try Dim ind As InDesign.Application ind = CreateObject("InDesign.Application.CS2", "localhost") Dim x As String = ind.DoScript(script, InDesign.idScriptLanguage.idJavascript) Return x Catch ex As Exception Return "An error occurred: " & ex.Message End Try End Function I found this article on this site and used it as a lead. http://www.codeproject.com/Purgatory/Adobe_InDesign_COM_object.asp[^] So I started by adding a reference to the InDesign com object to my project, and as far as I can see that was succesful. But when I want to compile the following code, I get the following error message: #include "stdafx.h" #include "InDesignCS2Class.h" #include "Global.asax.h" //using namespace Interop::InDesign; namespace InDesignCS2 { String* InDesignCS2Class::RunScript(String* script) { // create an InDesign instance InDesign.Application app = (InDesign.Application) COMCreateObject("InDesign.Application"); // get a reference to the current active document //InDesign.Document doc = app.ActiveDocument; // get the first page //InDesign.Page page = (InDesign.Page) doc.Pages[1]; //1e pagina // get the first textframe //InDesign.TextFrame frame = (InDesign.Tex

    C / C++ / MFC help c++ com java javascript
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups