Automatically select video source from dialog? VB.net - vb.net

I've been playing with a generic usb camera to take snapshots every few seconds. With the help of this SO question, I was able to get the camera working; however, when you click the button to connect to the camera, a dialog box appears.
The difference between the other question and my question is that I have two video sources: a built in webcam and a usb camera. I also intend to have multiple cameras connected, all taking pictures. It appears that when you have multiple devices, you always get the dialog box where you have to choose the device. I'm trying to automatically choose the camera (and eventually cameras, plural) without this dialog box.
There are other pieces of sample code that I have played with - samples that have a device listbox that is populated; I thought this was what I needed (and I'd just remove the listbox control and process the list and what to connect to in code), but every one of these samples populates the listbox with "Microsoft WDM Image Capture (Win32)" instead of the devices listed in the dialog after attempting to connect to this "device."
Surely there's a way to automate the webcam(s) I'm connecting to instead of having to choose it from a dropdown in a Windows dialog, right? How would I go about doing this?

The solution ultimately was to use EMGU to access the camera; this also allows for connecting to multiple cameras at the same time.

Related

I want to have a F-key activated script to control OBS Studio rather than a user

I am attempting to provide my church with video streaming to Facebook using a PTZ camera and OBS Studio. The goal is to allow non-computer-literate people to start it up. I've already got the program to autostart on boot. There are several config point and clicks to get it to start the stream and I need some directions how to accomplish. I've thought about using key/mouse recorded macros and just have the user push a F-key to run the macro. It gets complicated if window placement, size, position, etc. changes from boot to boot, then the macro won't be able to locate the correct mouse click locations and so won't accomplish the desired effect.
My question and quest for posting here is, since OBS Studio is open source, is there anybody here that could help me accomplish the key presses and mouse clicks by some kind of Python script that could effect these steps directly by manipulation of the code within OBS Studio application?

chrome command line flag for auto sharing system sound

I am developing web automation of Zoom meeting (all the way from creation till joining and leaving thereon).
I have been able to complete the creation, joining and screen sharing automation.
I am using --auto-select-desktop-capture-source=MyTab flag to automatically share the desired tab. Up until here, its all working fine.
Where I am stuck is that the chrome tab gets shared without system sound.
I want to automatically share the screen/tab along with system sound / tab audio.
What is the appropriate chrome flag for sharing audio along with screen?

Show Networks Flyout (the "connect-to-network" thingie) without explorer.exe running

Requirements:
Our application replaces the usual windows shell (explorer.exe). This is a product requirement for a closed system that we're supplying.
We oughtta let the user select a wi-fi network and connect to it.
The problem: The wi-fi networks dialog only shows up when explorer.exe is running
What we tried:
Write our own wi-fi manager that uses wlan API. It lists connectible networks and allows the user to connect/disconnect. Problem: too many network types/configuratons that have to be tested, especially when the wheel has already been invented and reinvented all over.
Try and check how is the networks dialog implemented. It appears that it's and undocumented COM interface (IUIRAdioManager). Problem: it's undocumented, so no API
Use an existing network manager, for instance the one that comes with the driver. Problems: it's ugly, not to the product's taste; and it opens too many options for the user, like creating and loading profiles, browsing for files on a file system - these things are unacceptable.
Running explorer.exe just for the purpose of showing the networks dialog and then killing it. Problem: once we run explorer.exe - it pops up metro view and hides our fullscreen application or shows the taskbar.
The latter seems like the preferred solution: no need to reinvent the wheel, it does what's needed. Just gotta make explorer.exe not pop out, keep it quiet in the background.
So, we're down to two options:
How to show the networks flyout dialog without explorer.exe?
How to run explorer.exe without it popping out metro or taskbar above our application?
Your first solution would be incredibly difficult to implement. I am almost certain that the Networks window is dependent on explorer.
However, your second is entirely possible.
To hide the taskbar, you will need to find a window (using FindWindowEx) to find the taskbar (name is Shell_traywnd). This will hide the taskbar and start button. EDIT: Unless you are implementing your own taskbar, you might want to set the taskbar to autohide.
Next you will need to hide all of the metro programs. In a similar fashion as above, find the class named EdgeUiInputWndClass and close it. You should be able to get the process name of it and then kill the process.
Windows key. This is a little more difficult. You will probably need to use a program and delete the key or a keyboard hook (a low level keyboard hook) and just ignore key presses with the same scancode as the windows key. Left Windows is 0x5b and Right is 0x5c (source). Note that this will not block Ctrl+Alt+Del.
Finally, to show the Flyout, you can run %windir%\explorer.exe shell:::{38A98528-6CBF-4CA9-8DC0-B1E1D10F7B1B}
(source).
EDIT2:
You should also be able to hide toast notifications via this
Of course, I don't see why you cannot just use Windows 8/8.1 and put the app in kiosk mode.

Programmatically synchronize(camera-link) multiple intersection windows

Ocean2013.1 provides a sample(WheelerViewer) for using cameras(OpenInventor features) for 3D Windows, but is it possible to synchronize(equivalent of clicking the camera link toolbar option) multiple intersection windows in Ocean/Petrel programmatically?
Camera linking is available as a Petrel feature but not as a Ocean API for developer to access programmatically
You need to be mode specific on what you are trying to synchronize and why.
The Window3D exposes enough camera API that one can write his own camera view synchronization.
If all you want is to be able to click the "Synchronize camera" button via API, it's a different issue. Why do you need this? Often users ask to be able to link all windows with one mouse button click. This, I believe, might be coming in 2015 as a user feature.

Controlling USB keyboard and mouse

We have a hardware device, with an LCD display. It supports an USB interface to connect keyboard and mose. Using these keyboard and mouse, we can navigate to varios menu items and edit entries.
We have couple of test cases written to verify that mouse click and keyboard input events are working when pressed respective key.
My task is to automate these test cases.
I donot have any control to the hardware device, as I can not access the o/s kernel or any application running there. There is one way to verify what is currently displayed on the UI. So I have to use that and verify whether the mouse/keyboard has performed the appropriate events.
As I have gone through couple of previous posts, it seems like that one of the way to achieve this is through virual HID device driver rather than actual keyboard and mosue. But I am not sure how to achieve it.
Please do help me for it. I am fine with any programming language.
I am more interested to simulate the mouse and keyboard events.
You probably don't need to write your own driver. AutoHotKey does pretty much anything you can think of, and the scripting language is quite easy to learn.
You can get it here:
http://www.autohotkey.com/
Since you're using linux, here's a similar project that will run on linux:
http://sikuli.org/