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

runrev at animabit.de runrev at animabit.de
Thu Sep 25 05:18:12 EDT 2008


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 <m.schonewille at economy-x-talk.com>
To:      boehmisch at animabit.de

> 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, runrev at animabit.de 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 at 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 at lists.runrev.com





More information about the use-livecode mailing list