[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] =?utf-8?q?Usb?=
From:       "sundar j" <sundar_ima () rediffmail ! com>
Date:       2013-07-31 2:02:15
Message-ID: 1375178107.S.5444.23708.H.TktlbmRlIEtyaXN6dGnDoW4AUmU6IFtHYW1iYXMtdXNlcl0gVXNi.RU.jfsv, jfs1, w2273, 31,
[Download RAW message or body]


Use dbus component for reliable usb detection. Have a look at these links
http://gambasdoc.org/help/comp/gb.dbus?v3http://udisks.freedesktop.org/docs/1.0.5/Device.html#Device:DeviceFile



From: Kende Kriszti  n &lt;nemh@freemail.hu&gt;
Sent: Tue, 30 Jul 2013 15:25:07 
To: gambas-user@lists.sourceforge.net
Subject: Re: [Gambas-user] Usb
&gt; &gt;&gt; is it possible to list all the usb devices on a system?

&gt; &gt;&gt;

&gt; &gt; Yeah, the lsusb command is your friend.

&gt; &gt;

&gt; 

&gt; I should have said usb drive I was thinking using dev some how

&gt; 



No problem, I use this for pendrives:



Dim item, dev, name As String



For Each item In Dir("/dev/disk/by-id", "usb-*", gb.Link)



 &nbsp;dev = Stat("/dev/disk/by-id/" &amp; item).Link

 &nbsp;dev = "/dev/" &amp; Right(dev, - RInStr(dev, "/"))



 &nbsp;If Len(dev) = 8



 &nbsp; &nbsp;name = Right(item, -4)

 &nbsp; &nbsp;name = Left(name, RInStr(name, "_"))



 &nbsp; &nbsp;Print dev &amp; " " &amp; Replace(name, "_", " ")



 &nbsp;Endif



Next



This not work with HDDs.



------------------------------------------------------------------------------

Get your SQL database under version control now!

Version control is standard for application code, but databases havent 

caught up. So what steps can you take to put your SQL databases under 

version control? Why should you start doing it? Read more to find out.

http://pubads.g.doubleclick.net/gampad/clk?id=49501711&amp;iu=/4140/ostg.clktrk

_______________________________________________

Gambas-user mailing list

Gambas-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/gambas-user

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic