ajag Posted September 9, 2010 Share Posted September 9, 2010 Hi all, I am wondering if there is a way to create a GUI that is always active. That means it never looses the focus. What I found is to make a Window (GUI) topmost, even if it is inactive. But this does not fit my intention. A-Jay Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
wakillon Posted September 9, 2010 Share Posted September 9, 2010 Like this... AdlibRegister ( '_WinActivate' ) While 1 ;Some action... WEnd Func _WinActivate WinActivate ( 'GuiTitle', 'text' ) EndFunc AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
ajag Posted September 9, 2010 Author Share Posted September 9, 2010 wakillon, thanx, but I don't like this workaround because it is a "re-activate" instead of "stay active". A-Jay Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
martin Posted September 9, 2010 Share Posted September 9, 2010 wakillon,thanx, but I don't like this workaround because it is a "re-activate" instead of "stay active". A-JayOnly one window can be active at any one time. If your window could stay active then you would not be able to use any other program or get to your desktop etc. So what you have asked for is not possible IMO, and the sort of work-around wakillon showed is the best uou will get. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
ajag Posted September 10, 2010 Author Share Posted September 10, 2010 Only one window can be active at any one time. If your window could stay active then you would not be able to use any other program or get to your desktop etc.But this is excactly what I want!Background: I'm programming an application for scanning barcodes. After starting the application the user takes a wireless barcodescanner (keyboard emulation) and scans barcodes far away from the workstaton. Since the user can not see if the application is active or not while scanning the barcodes I want make the application is always active to ensure that all the keystrokes comming from the barcode scanner go to the application. (It is very frustrating if the user see "oops, no barcodes captured" after scanning 50 barcodes, just because a popup catched the focus).But maybe there is another solution?A-Jay Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
Homes32 Posted September 11, 2010 Share Posted September 11, 2010 I use code similar to wakillon's example for a similar purpose and have never had an issue. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now