Jump to content

guiregistermsg delay (non-block) ?


Myicq
 Share

Recommended Posts

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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...