How to get camcorder record button press event on computer? - directshow

I made a desktop application to take video from the camcorder and saves it on my computer. But the only problem is that I want that when I press record button on the camcorder it will automatically start recording the video on my computer and when I again press the record button on the camcorder the recording on my computer should automatically stop.
I am using this carmcorder :Sony HandyCam dcr-vx2100
Connection : FireWire

Related

The Run button on PopSQL not working [greyed out]

The run button in PopSQL greyed out a while ago after I restarted my laptop. No matter how I tried I couldn't click on it. I re-checked, double-checked my queries but it still didn't work.
Please help.
First of all, check the following -
Your query - Check for semantic errors.
Your database connection - There may be some fault in the connection itself. Try connecting again with the database. Check if just above the tab where the connection is specified if you can see your database name like this -
If you have just installed MySQL in your laptop (or anyways, now you don't have any other option) -
Open run from Start Menu or press windows key + R.
Search for 'services.msc'.
In the search window, search for MySQL80. Double click on it to open.
You will notice that the service is either disabled (in startup type) or stopped in the service status.
Select Automatic or Automatic (Delayed start) in the select box of Startup type and click on apply. So that whenever your machine starts the MySQL service will start automatically in the background.
After that click on the Start button to start the MySQL service on your machine. It will take a few seconds to start.
Then click on apply and hit Ok. Then close the services window also.
Now try opening PopSQL you'll see that database connection has been corrected.
ENJOY!!!

Don't know how to kill app process in KaiOS

I am developing an app that uses ws connection on KaiOS. When I press back and put the app in the background, somehow the app instance is not killed. I can still get message coming in from ws connection even though the app is in background. This makes the phone runs out of battery quickly because exited app remains in the runtime process I suppose.
But, I do need a situation where the app runs in background (not killed).
So, the question is, do we have access to kill an app process, for example when user press something or normally when app is closed and screen back to menu screen from app screen?
I think you can observe the Backspace key and close the window.
Such as:
function handleKeydownEvent(e) {
if (e.key == 'Backspace') {
e.preventDefault();
window.close();
}
}
document.body.addEventListener("keydown", handleKeydownEvent);

WinRT/UWP is suspending rising on power off?

I am trying to save data before application (WinRT 8.1) close/sleep/minimze (or windows shutdown/restart in tablet with WIN10) using app suspending event.
https://learn.microsoft.com/en-us/windows/uwp/launch-resume/suspend-an-app
However, it os not working on power off / shutdown WinRT/UWP: Is suspending action rising on long power off button holding?
The Suspending lifecycle event will fire in case of a normal OS shutdown - if you do Start -> Shut down.
This is unfortunately not the case with long power off button holding and restart button press, because both these are improper ways of shutting down your PC. Holding power button to shutdown essentially suddenly "cuts-down power" to the PC, which means the OS cannot respond to this and all unsaved data are lost. This method of shutting down a PC should be used only when something really bad happens and everything freezes. That is why the UWP app has no chance to run the suspending event handler in this case.
Is suspending action rising on long power off button holding?
System will shutdown forcibly with long press power off button. And the system could not make sure Current user session is finished. So the suspending event handler could not be invoked correctly.
From Windows 10 universal Windows platform (UWP) app lifecycle:
Current user session is based on Windows logon. As long as the current user hasn't logged off, shut down, or restarted Windows, the current user session persists across events such as lock screen authentication, switch-user, and so on.
So, before shut down, the app still in the Current user session. And Suspended will be invoked on power off(shut down).
Note, you can not test it in debug model within Visual Studio. Because when you shut down the system, Visual Studio will exit degbug model at first. The Suspended event will not be invoked as expect. You could verify with following code.
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var stringBulider = new StringBuilder();
var deferral = e.SuspendingOperation.GetDeferral();
Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
Object value = localSettings.Values["exampleSetting"];
stringBulider.Append(value.ToString() + "/Next");
localSettings.Values["exampleSetting"] = stringBulider.ToString();
deferral.Complete();
}
Each time you shut down, the stringBulider will be append one at a time.

Using apple script to press the return key when prompted to connect to server

Currently this is my delima. Once in a while a build agent will reboot. It needs to always stay connected to share on one of our servers. The idea was to tell finder to mount the volume, wait 2 seconds, and then press enter...since the user name and pssword are both part of the address when I enter it such as SMB://username:password#Server1/DFS it pops up the pasword dialog fully populated but I can't get applescript to recognize it, then press either connect or the return to say "Yes" login witht hat name and don't prompt me.
it worked fine when connecting at home to a synology device but it's not working when connecting to a server in the office.
tell application "Finder" to mount volume "SMB://username:password#Server1/DFS"
delay 2
tell application "System Events" to keystroke "return" -- key code 36
Any help for this seemingly simple step would be greatly apprecited.
I have looked ove the forums and found variou stratagies but they all relate to an application like Firefox or some other script aware app. I just need it to press enter when the password dialog comes up.
First of all the Finder is not needed to mount a volume, you can delete the tell block.
Secondly, if username and password are passed the volume is supposed to mount without a dialog. Maybe you could find the reason why it doesn't.
Nevertheless the password dialog belongs to the process SecurityAgent, you have to use (ugly) GUI scripting to press the button:
tell application "System Events"
repeat until exists process "SecurityAgent"
delay 0.5
end repeat
tell window 1 of process "SecurityAgent"
click button 2
end tell
end tell
The script waits until the window appeared, this is much more reliable than an hard-coded delay.
Looks like a possible XY Problem as I would expect a solution such as https://apple.stackexchange.com/a/698/204318 to work for you to directly mount the share:
mount -t smbfs //username:password#MACHINENAME/SHARENAME /SomeLocalFolderOfChoice
However, if you are really required to interact with the dialog, and as you asked about it, take a look at this tutorial (written in Python) for scripting up something:
detect missing connection
attempt connection
capture screen periodically
look for dialog box, else loop
error after a few seconds of failure
if dialog is detected, interact with it
input username and password
wait, then press return
check if connection worked after a small delay
success or failure
This type of strategy is very powerful for interacting with all sorts of different dialogs you may encounter and should be possible in AppleScript if you are much more familiar with it (or another scripting language).
If you are open to non-AppleScript solutions, then you might consider Keyboard Maestro, one of the best Mac automation tools available.
You said:
it pops up the pasword dialog fully populated but I can't get
applescript to recognize it, then press either connect or the return
to say "Yes" login witht hat name and don't prompt me.
You could probably do this very easily using Keyboard Maestro. Here's an example of the KM Actions to accomplish this.
If you'd like help with KM, please visit the forum at:
https://forum.keyboardmaestro.com/
I'm a big AppleScript/JXA user, but I often find it easier/quicker to use KM for many automation tasks. Of course, KM Macros can execute AppleScript, JXA, Shell Scripts, and other scripts easily.
You can try a full version of KM for free for 30 days.

Stop Processing Of ASP.Net Web Form on Opening an Exe

In my ASP.net application, i have to open a EXE on click of button. When the EXE is open, User should not be allowed to perform any action on the web form, i.e. the exe should behave like a modal popup. I am using the current code to open and return value from EXE.
Dim p As Process
p = Process.Start("D:\VS2010Projects\SignatureCaptureWindows\bin\Debug\SignatureCaptureWindows.exe")
p.WaitForExit()
If (Not p.ExitCode.Equals(0)) Then
Response.Write("Image Successfully saved in Database with ID = " + p.ExitCode.ToString())
DisplaySavedImage(p.ExitCode)
End If
The Exe is opening fine and returning the correct value. However, the user is able to perform action on the web form when the exe is open...
What will be the best way to handle such a scenario ??
Its impossible to do the way you won it. From the moment the user send a submit, or try to open the page, and on code behind you run this exe, then user is wait for the results - in this time you can not make the user to not do anything else - you can not lock the browser, user can close it, reload it, open again the same page, etc.
What you can do is to lock this process using Mutex and not allow to run again if all ready run it.
Mutex on msdn with example : http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx

Resources