Hi,
I'm fairly new to Python COM development and I'm having trouble
automating
Microsoft Excel. I have the following piece of code:
d = win32com.client.Dispatch('Excel.Application')
d.Visible = 1
dw = d.Workbooks.Open('c:\\datos.xls')
dw.Sheets(1
Tim Golden wrote:
>
> (I spend most of my WMI time doing detective work like that!)
>
> I think what I meant was that the OP wanted to step through
> some kind installation process when the device was initiated.
> At least, I think that's what he wanted to do. And I'm not
> sure how much closer the
Tim Roberts wrote:
> Tim Golden wrote:
>> It's actually made a bit easier by using
>> the Win32_DeviceChange event under WMI
>> (you will not be surprised to hear me say!)
>>
>> But once you've got the fact that the device has
>> changed, I'm not sure where you go from there...
>
> I admit that WM
Tim Golden wrote:
>
> It's actually made a bit easier by using
> the Win32_DeviceChange event under WMI
> (you will not be surprised to hear me say!)
>
> But once you've got the fact that the device has
> changed, I'm not sure where you go from there...
I admit that WMI is not my strong suit, but
Tim Roberts wrote:
> Simon Dahlbacka wrote:
>> Random thought.. there *has* to be a better way of finding out when a
>> usb device is plugged in...
>>
>> (not that I know how, but I haven't needed to find out either..)
>
> Oh, there is. You can watch for the WM_DEVICECHANGE message, which
> fires
On 5/3/07, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Oh, there is. You can watch for the WM_DEVICECHANGE message, which
> fires every time there is a plug-and-play event. Once you get that
> message, you can go enumerate the devices in your device class using the
> SetupDi APIs to see if you are p
Simon Dahlbacka wrote:
> Random thought.. there *has* to be a better way of finding out when a
> usb device is plugged in...
>
> (not that I know how, but I haven't needed to find out either..)
Oh, there is. You can watch for the WM_DEVICECHANGE message, which
fires every time there is a plug-and
When your program starts, take a snapshot of all the storage devices.
You can do this with a timer, every few seconds or so.
If the new snapshot changes from the original, you can call an API to
see if the new device is removable or not. This won't tell you if it's
a USB drive specifically, but fo