Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-18-2009, 10:48 AM
Junior Member
 
Join Date: Mar 2009
Posts: 9
Default switch to retry error

Hi,

I am facing a problem with swfkit application.

I embedded the swf in swfkit and added a dll created in VB6. The dll updates a word doc already created and prints the document. As soon as the print dialog appears the swfkit application shows "switch to - retry" COM error message.

The dll when run independently do not produce any error.

I even registered the dll in system and removed from attachment but the error is still present.

Please tell me if there is any way to handle this error?

Thanks,
Nitin
Reply With Quote
  #2 (permalink)  
Old 03-18-2009, 12:44 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

It's complicated as your dll calls Microsoft word via OLE. Maybe you can try to convert the VB code into ffish script, as SWFKit can also modify a word doc
Code:
word = new ActiveXObject("word.application");
word.Visible = true;
trace(word.Visible);
word.Documents.Add();
word.Selection.TypeText("This is a test...");
word.Documents[1].SaveAs("c:\\test.doc");
word.Quit();
//Example2 - create an ActivexObjext from file
doc = new ActiveXObject("c:\\test.doc");
doc.SaveAs("c:\\test1.doc");
Reply With Quote
  #3 (permalink)  
Old 03-19-2009, 03:58 AM
Junior Member
 
Join Date: Mar 2009
Posts: 9
Default

Thank you very much for your reply.

I will convert it as you suggested and will let you know how it goes.
Reply With Quote
  #4 (permalink)  
Old 03-19-2009, 01:22 PM
Junior Member
 
Join Date: Mar 2009
Posts: 9
Default

I tried this but it is not working

MyWord = new ActiveXObject("word.application");
MyWord.Visible = true;
WordDoc = MyWord.Documents.Open(getAppDir()+"Periop101_ROI_T ool.doc")
WordDoc.Application.Dialogs(wdDialogFilePrint).Sho w

The word application opens but Print Dialog box do not show up.
Reply With Quote
  #5 (permalink)  
Old 03-19-2009, 07:18 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

You must first define the wdDialogFilePrint contant

Code:
ActiveXObject.dontBeBusy();
wdDialogFilePrint = 88;
MyWord = new ActiveXObject("word.application");
MyWord.Visible = true;
WordDoc = MyWord.Documents.Open(getAppDir()+"Periop101_ROI_T ool.doc")
WordDoc.Application.Dialogs(wdDialogFilePrint).Show();
We're trying to add a method "dontBeBusy" to remove the "switch to, retry" dialog box. We'll let you know if it works in a few days.
Reply With Quote
  #6 (permalink)  
Old 03-20-2009, 04:05 AM
Junior Member
 
Join Date: Mar 2009
Posts: 9
Default

That will be really cool and thanks for your help.
Reply With Quote
  #7 (permalink)  
Old 03-20-2009, 07:35 AM
Junior Member
 
Join Date: Mar 2009
Posts: 9
Default

This does not solve the problem.

The error can be replicated by selecting/changing the printers in the dialog box.

I attached the screenshot
Attached Images
File Type: jpg swfkit_error.JPG (67.3 KB, 6 views)

Last edited by nitinmukesh; 03-20-2009 at 07:37 AM.
Reply With Quote
  #8 (permalink)  
Old 03-20-2009, 06:30 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

No, the method "dontBeBusy" hasn't been applied yet. We'll test it and the patch to you in a few days.
Reply With Quote
  #9 (permalink)  
Old 03-31-2009, 11:44 AM
Junior Member
 
Join Date: Mar 2009
Posts: 9
Default

Quote:
Originally Posted by SWFKit View Post
No, the method "dontBeBusy" hasn't been applied yet. We'll test it and the patch to you in a few days.
Any news on this?
Reply With Quote
  #10 (permalink)  
Old 03-31-2009, 01:57 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

Still working on it. It should be ready on this Thursday.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:13 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.