using an ActiveX (twiz32.ocx) from runrev by vbs
Mark Schonewille
m.schonewille at economy-x-talk.com
Thu Sep 25 05:05:17 EDT 2008
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
More information about the use-livecode
mailing list