Re: [U2] Monitoring Program: Can This Be Done?
I was going to recommend AHK as well, but Tony beat me to it. We use AHK here for automating logins to customers. It basically interacts with your desktop based on your script. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno Sent: Wednesday, June 26, 2013 6:55 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Monitoring Program: Can This Be Done? Dove-tailing with Ian's response, AHK would be an excellent solution, not only for acting on the client PC but also for monitoring window usage, PC transition to screensaver or hibernate, etc. It's also free - but a hefty learning curve if you're not familiar with the scripting language. To answer your question, yes, with C# this is also do-able, free, and with no new languages to learn. If you want to do this on your own, find some freeware that listens for Win32 events - though that area can present as much of a learning curve as AHK. You want a tray app that runs on system startup or with the SB client, to identify the SBClient window when it opens, then check for various events like minimize and window activated. You also want a timer that periodically checks to see if the screensaver is running. (The first mechanism is reactive, the second is proactive.) You will need to DllImport "user32.dll" for this. A search on the topic reveals many hits, including this helpful blog with a C# solution that you should be able to tweak for your purposes: http://bit.ly/1afWhF3 If you do Not want to do that on your own, you can email me to discuss development services. HTH Tony Gravagno Nebula Research and Development TG@ remove.pleaseNebula-RnD.com Nebula R&D sells mv.NET and other Pick/MultiValue products worldwide, and provides related development services http://Nebula-RnD.com/blog Visit http://PickWiki.com! Contribute! http://Twitter.com/TonyGravagno http://groups.google.com/group/mvdbms > From: McGowan, Ian > For your original question, I don't know about how to capture the > timestamp for SB activity, but http://www.autohotkey.com/ is an > amazing piece of software that can definitely switch to the SBClient > window and hit escape a bunch of times. I have used it several times > to 'scrape' data from one system and plug it into another, when more > elegant solutions wouldn't work for whatever reason... > From: Al DeWitt > I have been asked to inquire if there is a way I can write a C# program > to be installed on certain (shop floor) PCs to log SBClient activity > (keystrokes?) with a timestamp. This program would then read the > last activity timestamp, compare it to the current time and if the > interim is greater than a certain number of minutes execute a series of > Escape strokes to back the app out to the close screen and thus free > up licenses. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Monitoring Program: Can This Be Done?
Dove-tailing with Ian's response, AHK would be an excellent solution, not only for acting on the client PC but also for monitoring window usage, PC transition to screensaver or hibernate, etc. It's also free - but a hefty learning curve if you're not familiar with the scripting language. To answer your question, yes, with C# this is also do-able, free, and with no new languages to learn. If you want to do this on your own, find some freeware that listens for Win32 events - though that area can present as much of a learning curve as AHK. You want a tray app that runs on system startup or with the SB client, to identify the SBClient window when it opens, then check for various events like minimize and window activated. You also want a timer that periodically checks to see if the screensaver is running. (The first mechanism is reactive, the second is proactive.) You will need to DllImport "user32.dll" for this. A search on the topic reveals many hits, including this helpful blog with a C# solution that you should be able to tweak for your purposes: http://bit.ly/1afWhF3 If you do Not want to do that on your own, you can email me to discuss development services. HTH Tony Gravagno Nebula Research and Development TG@ remove.pleaseNebula-RnD.com Nebula R&D sells mv.NET and other Pick/MultiValue products worldwide, and provides related development services http://Nebula-RnD.com/blog Visit http://PickWiki.com! Contribute! http://Twitter.com/TonyGravagno http://groups.google.com/group/mvdbms > From: McGowan, Ian > For your original question, I don't know about how to capture the > timestamp for SB activity, but http://www.autohotkey.com/ is an > amazing piece of software that can definitely switch to the SBClient > window and hit escape a bunch of times. I have used it several times > to 'scrape' data from one system and plug it into another, when more > elegant solutions wouldn't work for whatever reason... > From: Al DeWitt > I have been asked to inquire if there is a way I can write a C# program > to be installed on certain (shop floor) PCs to log SBClient activity > (keystrokes?) with a timestamp. This program would then read the > last activity timestamp, compare it to the current time and if the > interim is greater than a certain number of minutes execute a series of > Escape strokes to back the app out to the close screen and thus free > up licenses. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Monitoring Program: Can This Be Done?
Not a technical solution, but after trying timeouts, tandem and nagging, what worked for us is peer pressure. We have a menu program that users access before getting into Unidata. I added a "show idle users" option to that program and we trained people to call the idle offenders when they received the "no more licenses" message. If you're on unidata/unix, http://www.pickwiki.com/cgi-bin/wiki.pl?IdleUsers is a perl script that provides a nice listing of the listuser command. For your original question, I don't know about how to capture the timestamp for SB activity, but http://www.autohotkey.com/ is an amazing piece of software that can definitely switch to the SBClient window and hit escape a bunch of times. I have used it several times to 'scrape' data from one system and plug it into another, when more elegant solutions wouldn't work for whatever reason... Ian -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Wednesday, June 26, 2013 2:23 PM To: (u2-users@listserver.u2ug.org) Subject: [U2] OT: Monitoring Program: Can This Be Done? Tried sending this to sbsolutions but it didn't appear to get there so I'll try here in hopes some of you are using SB+/SBClient We are having an issue where we are using all of our licenses by midday. Our current procedure is to send out a broadcast e-mail asking those who are not using the application to log off SBClient. We believe that what is happening is that certain PCs on the shop floor have SBClient started; some activity recorded and then the user walks away from the workstation leaving the particular screen open. I have been asked to inquire if there is a way I can write a C# program to be installed on certain (shop floor) PCs to log SBClient activity (keystrokes?) with a timestamp. This program would then read the last activity timestamp, compare it to the current time and if the interim is greater than a certain number of minutes execute a series of Escape strokes to back the app out to the close screen and thus free up licenses. Has anybody attempted this? If so can you share what you did? Thanks. Albert DeWitt, CPIM Sr. Programmer Analyst ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users - IMPORTANT NOTICE: This message is intended only for the addressee and may contain confidential, privileged information. If you are not the intended recipient, you may not use, copy or disclose any information contained in the message. If you have received this message in error, please notify the sender by reply e-mail and delete the message. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users