Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Mr. Dowson,

Is it possible to program the HidScanner to close automatically after it's written the log? Either hard coded or maybe with a command parameter? /close or /exit

I've tried a PostMessage command to close the window... well the window "disappears" but the program continues to run.

Currently, my new GoFlight-Lua Scripter can not detect the GF devices. So I thought, I would run the scanner and read the log into my program, counting the devices. But I have to manually close the HidScanner window.

I hope you enjoyed your "time off".

Thanks,

Joe

Posted

Is it possible to program the HidScanner to close automatically after it's written the log? Either hard coded or maybe with a command parameter? /close or /exit

The idea was that it sits monitoring devices being connected or disconnected. I suppose a command line parameter would be easy enough.

I've tried a PostMessage command to close the window... well the window "disappears" but the program continues to run.

Did you send a WM_QUIT or just a WM_CLOSE?

The other way is to obtain the Process ID and use a Terminate API, like Task Manager does.

Currently, my new GoFlight-Lua Scripter can not detect the GF devices. So I thought, I would run the scanner and read the log into my program, counting the devices. But I have to manually close the HidScanner window.

This should really be possible in Lua via the COM/HID library. If not it might be better for me to add a way. What is it precisely that is needed, just a way of enumerating devices, getting the VIDs and PIDs and Sequence numbers in the Windows-provided order?

I'd rather do something more productive like that than mess with what was an experimental program whilst I was working out how to deal with HID devices.

Either way I don't think I'll be able to get to it this week. It'll go on a list which is growing already! ;-)

Regards

Pete

Posted
The idea was that it sits monitoring devices being connected or disconnected. I suppose a command line parameter would be easy enough.
I didn't realize that. Now I know why it's a "scanner".
Did you send a WM_QUIT or just a WM_CLOSE?
I used the WM_QUIT.
The other way is to obtain the Process ID and use a Terminate API, like Task Manager does.
I'll give that a shot.
This should really be possible in Lua via the COM/HID library.
That's what I thought, But I was looking in the wrong place. Thanks.
What is it precisely that is needed
I just needed a count of how many models are attached.
I'd rather do something more productive like that than mess with what was an experimental program whilst I was working out how to deal with HID devices.

Either way I don't think I'll be able to get to it this week. It'll go on a list which is growing already! ;-)

Then don't waste your time with it, I'll use the Lua.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.