Sign in to follow this  
Followers 0
Myicq

guiregistermsg delay (non-block) ?

4 posts in this topic

I am experimenting with a small gui where operator can filter results in a listbox based on another input box (source follows later). And then by selecting "NAME" column get other columns returned. I will use SQLite in the background to store actual data, and Excel as original source of data.

It pretty much works. My only question is: can I delay a GuiRegisterMsg event, so that, schematically:

* key event registers

* has n msec passed since last keypress ?

* if yes, then filter results. Else reset time counter.

 

Reason is I don't want to delay gui too much if user is typing fast. 

I would prefer if this could be done in a non-blocking way, so no sleep() command.

I am not using guionevent mode.

Thanks for any help!


I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites



Use TimerDiff at the beginning to get the difference to last execution. If not greater than return, else execute and use TimerInit. If you need further help make a small runable script.

Share this post


Link to post
Share on other sites

@AutoBert: I think this is pretty much along my thinking as well. I will try to pull something together, and post here.


I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites

Here is the script so far.

I have not been able to make the delay work, because the WM_MESSAGE only fires after keypress. So if I press two keys fast, and nothing else, it does not search until next keypress. Desired is to fire after last keypress+500 msec.

 

Feedback is welcomed. Purpose of this script is to allow client to select a template. I want to display ONLY the name, but have other properties returned when selected.

Search function is realtively fast already, but just for good measure, I would like to learn about the delay.

and, if I could have done the same without SQLite, I would be happy to learn !

 

listbox-example.zip


I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0