Porting a plug-in from CS3 to CS4 - IScriptRunner woes

Hi,
I'm currently porting an InDesign CS3 plug-in to CS4 and everything seems to compile allright. However, I have some problems getting my IScriptRunner to work. I am aware of some changes to the RunScript() method call, and have changed my code accordingly:
  do
    // Get a handle on the ExtendScript Manager
    InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
    ASSERT(scriptManager);
    if (!scriptManager) break;
    InterfacePtr<IScriptRunner> scriptRunner(scriptManager, UseDefaultIID());
    ASSERT(scriptRunner);
    if (!scriptRunner) break;
    RunScriptParams params(scriptRunner);
    params.SetInvokeDebugger(kFalse);
    params.SetShowErrorAlert(kTrue);
    scriptRunner->RunScript(script, params);
  while (false);
However, now I'm getting assert errors when starting up my plug-in, and the script is not executed (the line that seems to break is the ASSERT(scriptRunner).
I have read that the implementation of IScriptManager has changed and that IScriptRunner is no longer directly on IScriptManager, but rather on IScriptEngine (is it just me, or is this discussed rather vague in the porting guide?) and I haved tried using the IScriptManager::QueryDefaultEngine() method to get an IScriptEngine (and got one), but so far I have been unable to extract an IScriptRunner from there.
InterfacePtr<IScriptEngine> scriptEngine(scriptManager->QueryDefaultEngine());
ASSERT(scriptEngine);
if (!scriptEngine) break;
// Will not compile:
//   error C2664: 'InterfacePtr<IFace>::InterfacePtr(const IPMUnknown *,PMIID)' : cannot convert parameter 1 from 'InterfacePtr<IFace>' to 'const IPMUnknown *'
InterfacePtr<IScriptRunner> scriptRunner(scriptEngine, UseDefaultIID());
ASSERT(scriptRunner);
if (!scriptRunner) break;
Anyone who has an idea as to how to fix this?
Thanks!
Kind regards
Message was edited by: WouterDem - Fixed some typos in the code snippets.

Hi,
I have been able to get an instance of IScriptRunner through the method you've provided, which I then use to execute a script from a PMString:
IDFile libMyPlugin = IDFile();
... // Fill in the path to the ExtendScript library.
InterfacePtr<IScriptRunner> scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(libMyPlugin));
ASSERT(scriptRunner);
if (!scriptRunner) break;
PMString script("MyPluginLib.SomeExtendScriptFunction()");
RunScriptParams params(scriptRunner);
params.SetInvokeDebugger(kFalse);
params.SetShowErrorAlert(kTrue);
scriptRunner->RunScript(script, params);
As you can see, an ExtendScript library is loaded earlier and I'm using this file to get to my script runner.
This seems to work, however I get an assertion error now:
ASSERT 'RequestContext( fRequestContext ) == RequestContext( other->GetRequestContext() )' in c:\Development\basil\source\public\libs\publiclib\scripting\CScriptEventData.cpp at line 742 failed.
c:\Development\basil\source\public\libs\publiclib\scripting\CScriptEventData.cpp (742)
Does anybody have an idea?
Kind regards

Similar Messages

  • Transferring Boris FS plug-ins from CS3 to CS4 - Mac OSX

    I purchased Continuum Complete 5 AE for Mac OSX to use the plug-ins for my CS3 versions of After Effects and Premiere Pro. Now that I have CS4 versions of After Effects and Premiere Pro, how do transfer the plug-ins to work with the CS4 versions. According to Boris FX website, Continuum Complete is compatible for CS4, but it doesn't mention how to transfer the files. I've emailed them, but haven't heard back from them. Looking within the application folders of the CS3 versions, it doesn't look like it's a simple drag and drop into a plug-in folder. Being that I can't find the plug-ins within the application folder. Does anybody know how to do this?

    What happens when you try to install the plugins to CS4?

  • How do I transfer plugins/actions from CS3 to CS4?

    I am working on a newer computer for my wife. Her current computer is Windows XP Pro with Photoshop CS3, her new computer will be Vista Ultimate with CS4, both with default installation locations. I know she has alot of actions/presets/plugins she uses; my question is...
    How do I transfer all of her actions/plugins from CS3 to CS4? Is there a folder I can just copy/paste?
    Any information would be helpful. Thanks!

    For actions it depends how they are saved.
    The best thing is to save them in sets on the old computer in a folder of your choice. They can then be loaded from a copy of that folder on the new computer.
    Third party plug-ins should be installed again because not all will work in 64-bit and you may need to get updates.

  • Transferring plug-ins from CS3 to CS6 in Creative Cloud?

    How do I transfer plug ins from CS3 to CS 6?

    Syb2440 wrote:
    Transferring plug-ins from CS3 to CS6 in Creative Cloud? - How do I transfer plug ins from CS3 to CS 6?
    You may want to re-download the plugins from where you bought them and install them fresh for CS6. Or at a minimum check to see if new CS6 versions are available. The underlying architecture changed for plug-ins when CS6 was released. Some developers had to re-write CS6 versions. Some may work, while others may have had to be updated to work with CS6.

  • Migrate actions from CS3 to CS4

    Hi,
    I would like to migrate my actions from CS3 to CS4. The CS4 is a new install on a fresh Windows 7, from the CS3 settings I only have a backup of my disk before the new install. Of this backup I checked the "C:\Users\<username>\AppData\Roaming\Adobe\Adobe Photoshop CS3\Presets\Actions" folder but it is empty. In my CS3 I had many actions, sorted in different folders. The other presets (like for curves or the channel mixer) are there, so I am quite confident that my backup worked correctly.
    Am I missing something here and can I find the actions of CS3 somewhere else or are they gone for good?
    Thanks and regards, Robert

    Different folders as in different action sets in the Actions panel right? did you actually use the Save Actions command from the Actions panel menu? If you didn't save them then try copying this file: C:\Users\<username>\AppData\Roaming\Adobe\Adobe Photoshop CS3\Adobe Photoshop CS3 Settings\Actions Palette.psp to the same location but with CS4 instead of CS3 in the path

  • Copy favorites from CS3 to CS4

    Is there a way to copy favorites, keywords, other settings from CS3 to CS4?
    Thanks,

    Hi Mogur203,
    Sorry, but there is no way to copy your CS3 Favorites over to CS4. However you are able to copy your keywords over if they did not get imported during your first launch.
    1. Launch CS3, Click on the flyout menu in the keyword panel
    2. Select export, Save the text file
    3. Launch CS4, Click on the flyout menu in the keyword panel
    4. Select import, select the text file that you saved from CS3
    This should complete the import of all the keywords from CS3 to CS4.
    Please let me know what other settings you are referring to and I will let you know if you can copy them over or not. Please let me know if you have any other question

  • Getting error after administrator who upgraded from CS3 to CS4

    Hi,
    We have had an administrator who upgraded from CS3 to CS4.
    However, any of our other users still using CS3 now get the
    following error message:
    “The website is being administered with a newer version
    of Contribute. For more information contact this website's
    administrator."
    Do you know any way around this issue?
    Thanks,
    Greg

    quote:
    Originally posted by:
    sdfsdf e3wwre4
    Just wondering if somebody here can clerify the following....
    If I upgrade contribute and then administer a contribute enabled
    website will users of CS3 still be able to edit the site or will
    the be forced to update as well?
    Hi,
    No they don't have to, at least I think so. If your
    administror go to the menubar: Contribute>Administer
    Websites> Choose the site you wish to set the settings for. In
    'Compatibility' choose 'Transition Mode' and klik OK. This should
    allow the other users to keep working in their version of
    Contribute.
    I say 'should'... Read my entry in the general discussion
    forum.
    (a not so happy) Ingrid

  • Transferring PDF, Print and Preferences from CS3 to CS4

    I have just upgraded from CS3 to CS4 (all in Windows) and wonder if it is possible to transfer the preferences, export-to-PDF and print settings in CS3 to CS4. Just askin.
    potterjazz

    What happens when you try to install the plugins to CS4?

  • Exporting site info from CS3 to CS4

    How do I export my "remote info" under "manage sites" from CS3 to CS4? I have about 30 sites under "manage sites" and would hate to have to dig up all the passwords after the upgrade. I used the "export" button in CS3, but it didn't bring in the remote info.

    1.  In CS3, open Site Manager
    2.  Select the sites you want to Export
    3.  Click Export and select a KNOWN location into which to write the *.ste files
    4.  Open CS4.
    5.  Open Site Manager
    6.  Click IMPORT, browse to and select the site files you just exported and click OK.
    Such fundamental questions as this are always answered in DW's F1 Help.  You'd have been done an hour ago if you had looked there.

  • Taking Site List from CS3 to CS4

    Hi,
    I want to upgrade from CS3 to CS4 but am a little nervous that I will lose all over my sites in my site list.
    Is there a way to carry my sites accross to CS4?
    Thanks

    Click on the first site listed, Shift+Click on the last site listed (so they're all highlighted) then Export.
    Individual .ste files will be created for each defined site.

  • What happen to plugins when upgrade from CS3 to CS4?

    This question may have been asked before but I could not find in the forum.
    I have a few plugins installed in my CS3 now. Do I need to manually reinstall all of them when I upgrade to CS4?
    Thanks

    Hi,
    I'm assuming you are asking about 3rd party plug-ins.
    Most likely you will need to reinstall for each version; But it depends on how you installed it. You may also need to check with the 3rd party about license and activation.
    You can opt to install into the Ps plug-in folder for any given version, or install to a location outside of Ps and then point to that directory in the Ps preferences (see Preferences> Plug-Ins> Additional Plug-Ins Folder).
    If you went the former route then reinstall to CS4. If you went the later, check the preference option and point to the folder.
    BTW, don't just move the whole CS3 Plug-Ins directory over to CS4 because the set shipped with Ps get rebuilt and you will put copies from CS3 that are not compatible with CS4 into that directory.

  • Is it time to upgrade from CS3 to CS4?

    I currently use CS3 but have a version of CS4.  I edit full HD XD CAM EX and Cineform 25p.   The reason I have not yet switched to CS4 is because I am waiting for the bugs to be worked out.  I am now checking in to see how things have moved forward on that end.  Is it worth it to upgrade or should I stick with CS3 for now?    

    I currently use CS3 but have a version of CS4.
    What is stopping you from trying it out? CS3 and CS4 can peacefully coexist on the same system. Given your decisiveness shown in the past, only you can decide and you have the means to make a decision. OTOH, I would not be surprised I you only make your decision when CS5 has been on the market for over a year.
    Your question has about the same value as someone saying:
    "I have a Beamer 530 from 2004 and a Beamer 530 from 2009. Should I be driving the 2009 version?"

  • What serial number from CS3 does CS4 want?

    I'm upgrading from CS3 Production Premium/Windows to CS4 Design Standard/Mac. I have the email from the CS3 order (it does not show up anywhere in my order history on adobe.com, I don't know why) and I have 3 serial numbers. 2 are 6 groups of 4 numbers, and 1 is 6 groups of 4 numbers with 4 letters preceding them. None of these work when I enter them into the CS4 install dialog.
    Also, I was unable to deactivate CS3... the option was grayed out.
    I'm guessing my next step is to call Adobe, but I thought maybe someone here would have some advice also.

    Mac CS4 wants a Mac CS3 serial.
    You can't do what you tried, it does not work.
    If you are moving to Mac you need to get a crossgrade. This includes a letter of destruction of the Windows software then Adobe will send you the correct software to install on your Mac.
    Only Customer service can help you.

  • Upgrade from CS3 to CS4 Extended

    I have just purchased an upgrade from Photoshop CS3 Standard to Photoshop CS4 Extended, and have problems activating. In the dropdown it only offers an upgrade from CS3 Extended and will not accept a serial number from CS3. I've spent about 2 FRUSTRATING hours on the phone today and all they can offer is that I give them the challenge code and they activate this installation, and each time I have to re install I would have to do the same. Needless to say I wasn't impressed at all, and have got an RMA number. Has anyone else suffered from this problem?

    call customer service.

  • Moving from CS3 to CS4

    Sorry if I'm in the wrong area but I was wondering if I can just use a saved file from CS3 flash like on my flash drive and use it on a different computer that has CS4 flash on it. Also if I can is there a specific way I need to import it or can I just open it up when I start up CS4?

    cs4 can open any cs3 file like you open any file.  cs3 cannot open a file saved for cs4.

Maybe you are looking for

  • N-Up Printing Gone from iPhoto '08

    I sure hope Apple brings this feature back but "N-Up" printing has been removed from iPhoto '08. It's a feature we used almost exclusively when printing from previous versions. I was able to tweak the size of the prints to get 16 on a page (we print

  • Will Acrobat Reader recognize an HTML bookmark as a named destination?

    I have a Word file with bookmarks. I make a PDF from this file. How do I code an HTML link in a different file that will open the PDF at the location of a bookmark. I asked a similar but maybe less precise question yesterday. The response I received

  • Sales data(urgent)

    Hi If any employee is working in different sales offices different countries how can we maintain different sales data. In PA30 Infotype SALE DATA can be used? i tried to use infotype Sales Data but what is happening is it overwrites the previous reco

  • I downloaded apps from my iPad but want to update it with my iTunes.

    how can i update my ipad without losing the apps that i downloaded from my ipad?

  • Generic third party connection supported?

    I was trying to configure a ssh jdbc driver, it works in SQuirrel, wondering if it is supported in Oracle SQL developer? Previous post said generic third party connection URL isn''t available until 2.0. Can someone confirm with that? Thank you!