Re-2: using an ActiveX (twiz32.ocx) from runrev by vbs

2008-09-25 Thread [EMAIL PROTECTED]
Hi Mark,

of course you are right - I cannot Form like in vb6 and dont try this. I just 
tried
scanner = CreateObject(Twizlib.Twiz)
 scanner.AutoFeeder = True
 scanner.MaxImages = 3
 scanner.ShowUI = False
 scanner.Resolution = 300
 scanner.AcquireToFile(c:\test.jpg)

I will test your suggestion:
SET scanner = createObject(TwizLib.Twiz)

this might be a starting point. Thanks!

Franz

 Original Message 
Subject: Re: using an ActiveX (twiz32.ocx)  from runrev by vbs (25-Sep-2008 
11:05)
From:Mark Schonewille [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]

 Hi Franz,
 
 I don't think you can use sub routines in the do command. Each time  
 when you call form_load, you'll probably have to rewrite the entire  
 function verbose.
 
 Sometimes, I have to experiment a bit with the createObject function  
 to make it work. For example, adding set' in front of the scanner  
 variable might work:
 
 set scanner = createObject(TwizLib.Twiz)
 
 --
 Best regards,
 
 Mark Schonewille
 
 Economy-x-Talk Consulting and Software Engineering
 http://economy-x-talk.com
 http://www.salery.biz
 Dutch forum: http://runrev.info/rrforum/
 
 Benefit from our inexpensive hosting services. See http://economy-x-talk.
 com/server.html 
   for more info.
 
 On 25 sep 2008, at 10:47, [EMAIL PROTECTED] wrote:
 
  Hello,
 
  Is it possible and how can we use activeX with the alternateLanguage   
  Function of runrev by the way of visual basic script vbs? I do know   how 
  to run Excel or Word from runrev in this way (using COM and  
  createObject), but not how to use an ocx.
 
  Any idea or suggestions?
 
  I use an ocx (Olympus Twain Wizard) for administration of a scanner   on 
  windows (TWAIN). This works in Visual Basic 6.0 without any user   
  interaction (in this case Scan if the Form opens:)
 
  Private Sub Form_Load()
  Form1.Twiz1.AutoFeeder = True
  Form1.Twiz1.ShowUI = False
  Form1.Twiz1.Resolution = 300
  Form1.Twiz1.AcquireToFile (c:\test.jpg)
  End Sub
 
  Now I try to do this with vbs in runrev (but I do not know whether  
  this is possible).
 
  I tried
 
 
scanner = CreateObject(Twizlib.Twiz)
 scanner.AutoFeeder = True
 scanner.MaxImages = 3
 scanner.ShowUI = False
 scanner.Resolution = 300
 scanner.AcquireToFile(c:\test.jpg)
 
 
 
  But the ocx seems not to be accessible by createObject (The ActiveX   
  object can not produce a new object). To be shure: But this error  
  even occurs when the name of the class is wrong.
 
  The Typelib ID of this ocx is
 
  {A96AC4E1-6EBF-11D0-AA7C-00608CC9A71F}
 
  the most importent methods and settings are
  ShowUI = False
  AcquireToFile(c:\test.jpg)
 
  Regards
  Mit freundlichen Grüßen
  Franz Böhmisch
 
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your 
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution
 
 To: use-revolution@lists.runrev.com


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Re-2: using an ActiveX (twiz32.ocx) from runrev by vbs

2008-09-25 Thread Ken Ray


 I will test your suggestion:
 SET scanner = createObject(TwizLib.Twiz)
 
 this might be a starting point. Thanks!

BTW, as someone who's done a lot of VBScripting with Rev, I would strongly
recommend that you write up the VBScript in a text file (Notepad works, or
TextPad, etc.), and save it as a .vbs file. Then try to double-click the
.vbs file and see if it does what you want. If it does, then you only need
to utilize that VBScript from Rev (with minor exceptions about returning
values to Rev from VBS) in order to get your app to work.

BTW, I'm assuming you're talking about Rev 3, right? If not, let me know as
there's a couple of differences between VBS in Rev 2.x and Rev 3.


Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution