forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Use scanner Help [SOLVED]

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Aug 17, 2010 12:30 am    Post subject: Use scanner Help [SOLVED] Reply with quote

Hi to all

I need to use a scanner to acquire image in a my script, it's possible connect to Twain and use it ? How?


Many tnx


Last edited by Tdk161 on Sat Aug 28, 2010 2:19 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Aug 17, 2010 1:48 pm    Post subject: Reply with quote

I think there was a version of VDSDLL that had this ability??? It may be a module?
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Aug 17, 2010 3:31 pm    Post subject: Reply with quote

Smile Hi vdsalchemist,

I don't know but I will controll VdsDll,

Thanks for your info

Byez
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Wed Aug 18, 2010 1:51 am    Post subject: Reply with quote

The only scanner type option in the VDSDLL is for barcode reading.
Back to top
View user's profile Send private message Send e-mail
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed Aug 18, 2010 5:10 am    Post subject: Reply with quote

Thank's Aslan

I thinked to to connect to Windows Api using GadgetX.dll,if possible but I don't know how Embarassed .

Any suggestion?
Back to top
View user's profile Send private message Send e-mail
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Wed Aug 18, 2010 7:47 am    Post subject: Reply with quote

Hi

I'm nearly sure I have a vds all called vdstwain.dll, I'll check when I get into the office, not sure it will work with vds5,6

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed Aug 18, 2010 7:54 am    Post subject: Reply with quote

Very Happy

Many tnx Nathan,, I wait hoping you will found it Thumbs Up

Byez
Back to top
View user's profile Send private message Send e-mail
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Wed Aug 18, 2010 8:58 am    Post subject: Reply with quote

Here ya go.... Wink ( enjoy )

The source code for the dll is included....

The dll was created on the 28th June 2001
- Created with Delphi 4


Download from:
http://80.76.205.33/files/vds/vdstwain.zip


So there is no details on who created it... ;-(

Hopefully it works for ya...

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed Aug 18, 2010 9:25 am    Post subject: Reply with quote

Hi Nathan,

thank you very much, I downloaded it and triyed but not work, maybe on last O.S. not work No

I will search some Delphi programmer to correct it.......hoping to found

Thank's again

Byez
Back to top
View user's profile Send private message Send e-mail
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Aug 24, 2010 12:10 pm    Post subject: Reply with quote

Hi Vds people Smile

there is a Delphi programmer wold like (and have time to spend) to correct thie VdsTwain dll to be able to work fine with Vds6 and latest version of windows?
Unfortunatly I searched Delphi programmer to make it without found Sad
and I don't know delphi language to correct myself the dll code

VdsTwain Download Link:
Code:
http://www.mediafire.com/?7ro3qm4nc7j9443


Many tnx for any info or Help
Byez
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Fri Aug 27, 2010 8:56 pm    Post subject: Reply with quote

Tdk161, Well from what I can tell from the source that is included with the dll it used a product called EZTwain. This brings back memories so I did some googling and found that if you go here http://www.dosadi.com/eztwain1.htm you can download a DLL called eztw32.dll... If you can get that DLL then to do what the vdstwain.dll does you only need to do 2 functions to acquire an image from the scanner... I could be wrong because I have not messed with this stuff in a very long time.

Code:

Title Test EZTwain
#define command,TWAIN_Acquire

TWAIN_Acquire @Path(%0)test.bmp
stop

:TWAIN_Acquire
  LoadLib eztw32.dll
  # %1 is the path and name of the file to save the scanned image to
  %A = %1
  %R = @lib(eztw32,TWAIN_SelectImageSource,INT:,INT:0)
  %R = @lib(eztw32,TWAIN_AcquireToFilename,INT:,INT:0,INT:@Addr("%A"))
  FreeLib eztw32
Exit


Have fun Wink

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Fri Aug 27, 2010 10:04 pm    Post subject: Reply with quote

vdsalchemist Smile Smile Smile

Wave WORK!!!!!!!!!!! Laughing
Worship I don't know how to tell you thank

you resolved a my big big trouble
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Aug 28, 2010 12:04 pm    Post subject: Reply with quote

You are very welcome Wink If I had more time I would wrap this DLL and build us a nice little DSU but for now that should do much of what one would want to do with a scanner.
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sat Aug 28, 2010 12:55 pm    Post subject: Reply with quote

Hi Smile

I writed this little dsu for my script to use scanner with your routine
Code:
#Define Command,Acquire

#  Sintax:
#    Acquire [Path\Filename.bmp),[optional] 0
#                                           1 to show error description
#
#@Ok()= True if operation Success
#
# Usage Example:
#
#Acquire Image.bmp
#If @Not(@Ok())
#  Warn Error
#End
#
#stop


:Acquire
If @Not(@File(eztw32.dll))
  If %2
    Warn External Library Eztw32.dll Not Found! @Cr()Execution Stopped
  End
  Error -1
  Exit
End
If @Not(%1)
  If %2
    Warn Missing destination file@Cr()Sintax: Acquire [Path]\Filename.Bmp
  End
  Error -1
  Exit
End
LoadLib eztw32.dll
%A = %1
%R = @Lib(eztw32,TWAIN_SelectImageSource,INT:,INT:0)
If %r
  Error -1
End
%R = @Lib(eztw32,TWAIN_AcquireToFilename,INT:,INT:0,INT:@Addr("%A"))
If %r
  error -1
End 
FreeLib eztw32 .dll
Exit


I know it's very stupid dsu Embarassed

Thank you again


Last edited by Tdk161 on Sun Aug 29, 2010 12:51 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sat Aug 28, 2010 3:38 pm    Post subject: Reply with quote

I changed little bit the Dsu
Code:
Title Aquire from scanner
#Define Command,Acquire

:Acquire
If @Null(@Ext(%1))
  %i = %1.bmp
ElsIf @UnEqual(@Ext(%1),BMP)
  %I = @Path(%1)Temp.BMP
  %o = %1
Elsif @Equal(@Ext(%1),BMP)
  %i = %1
End

If @Not(@File(eztw32.dll))
  Error -75
  Exit
End
If @Not(%1)
  Error -76
  Exit
End
 

LoadLib eztw32.dll
 
%R = @Lib(eztw32,TWAIN_SelectImageSource,INT:,INT:0)
If @Zero(%r)
  Error -1
  Exit
End
%R = @Lib(eztw32,TWAIN_AcquireToFilename,INT:,INT:0,INT:@Addr("%i"))
If @Zero(%r)
  error -1
  Exit
End 
FreeLib eztw32 .dll
If @Both(@Zero(%r),@File(VdsConv.Dll))
  External VdsConv.dll
  #Define Command,Convert
 
  If @Equal(@Ext(%o),GIF)
    convert bmp2Gif,%I,%o
  ElsIf @Equal(@Ext(%o),JPG)
    convert bmp2jpg,%I,%o
  End
  If @File(Temp.bmp)
    File Delete,Temp.bmp
  End
End
Exit

Now if Is present Vdsconv.dll the dsu convert automaticaly into format .JPG or .GIF, if the extension of filename passed is one of this

Wink Enjoy


***************
Correct code to stop process if Cancel Button on select source dialog is pressed

**************
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group