PsaltyDS Posted April 9, 2007 Share Posted April 9, 2007 Actually the messages are buffered inside AutoIt in a queue so messages should never go missing even if you ignore them for a while.I'm probably abusing proper Programmer-talk'n words.I have a script that iterates between 150 to over 500 times through a process that takes between 30sec and 2min each time. Works great, but I found that the ABORT button very often doesn't abort the script unless clicked several times. My interpretation of that was that message don't last long in whatever buffer there is. Of course the dice roller has no Sleep() in the message loop, which I had been told was bad practice because the loop monopolizes CPU cycles. Maybe the trade-off is more responsive GUI reaction? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Administrators Jon Posted April 9, 2007 Administrators Share Posted April 9, 2007 Of course the dice roller has no Sleep() in the message loop, which I had been told was bad practice because the loop monopolizes CPU cycles. Maybe the trade-off is more responsive GUI reaction? No, it's bad practice to put a Sleep() in there. GuiGetMsg() runs flat out when there are messages waiting (responsive), but idles a little before returning when nothing is going on to stop high CPU load. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Jdonner Posted April 9, 2007 Author Share Posted April 9, 2007 (edited) One last question, before I can move on Jon; how do you assign the double-click?Please, let's stick to the problem and tell me how to solve it, because I'm checking this forum, checking the help, experimenting with several things and I'm not getting anywhere. So I ask again; how can assign the double-click or get rid of it all together for a button?Oh and btw, any way to get the tools menu options in SCite at least sorted on name, because right now it has the sad honour of being the most disorganized menu I've ever seen in my life (and trust me, I've seen tens of thousands of programs in the last 25 years). Edited April 10, 2007 by Jdonner Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 10, 2007 Share Posted April 10, 2007 Please, let's stick to the problem and tell me how to solve it, because I'm checking this forum, checking the help, experimenting with several things and I'm not getting anywhere. So I ask again; how can assign the double-click or get rid of it all together for a button?(Remember, I already admitted to being a lowly non-programmer...) It appears AutoIT does not by default have any way to tell the difference between 'click' and 'doubleclick'. You have to handle the appropriate messages yourself. Here is an example of a solution by somebody that knows what he's doing (and IS a programmer).Hope that helps. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Jdonner Posted April 10, 2007 Author Share Posted April 10, 2007 (Remember, I already admitted to being a lowly non-programmer...) It appears AutoIT does not by default have any way to tell the difference between 'click' and 'doubleclick'. You have to handle the appropriate messages yourself.Thanks, but I wasn't refering to you. John said "When I turned the double click messages off it was lightning fast. " but didn't explain what he exactly did. I hate it when people tell you they solved it, but don't tell how.I will look at your suggestion, thank you very much! Link to comment Share on other sites More sharing options...
therks Posted April 11, 2007 Share Posted April 11, 2007 (edited) Jon is the tip-top head developer of AutoIt. I assume that what he meant by "When I turned the double click messages off it was lightning fast." was that he adjusted something in the AutoIt source, and then recompiled, and tried that out. Keep an eye on the bug reports, and beta versions, and eventually I imagine you'll find a fixed version.*Edit: And concerning this:Oh and btw, any way to get the tools menu options in SCite at least sorted on name, because right now it has the sad honour of being the most disorganized menu I've ever seen in my life (and trust me, I've seen tens of thousands of programs in the last 25 years).Have a look at the au3.properties file in your SciTe install directory. That holds all the configuration for SciTe concerning AutoIt concerning menu items, highlighting, etc. Modify to your hearts content. Personally I barely use any of the extra Tools that SciTe ships with, I always change that file to suit my needs. Edited April 11, 2007 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Jdonner Posted April 11, 2007 Author Share Posted April 11, 2007 Thanks Saunders, you've been a great help and I'll keep on eye on the bugs section. Link to comment Share on other sites More sharing options...
Administrators Jon Posted April 11, 2007 Administrators Share Posted April 11, 2007 Jon is the tip-top head developer of AutoIt. I assume that what he meant by "When I turned the double click messages off it was lightning fast." was that he adjusted something in the AutoIt source, and then recompiled, and tried that out.Sorry, yes. That's what I meant.Tip-top head. Rofl.I'm not in the devs' good books at the moment as I've been messing around in the code so much in the last two weeks >_> Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
herewasplato Posted April 11, 2007 Share Posted April 11, 2007 ...I'm not in the devs' good books at the moment as I've been messing around in the code so much in the last two weeks >_>...and you talk to yourself too:http://www.autoitscript.com/forum/index.ph...showtopic=43944:-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 11, 2007 Share Posted April 11, 2007 Sorry, yes. That's what I meant. Tip-top head. Rofl. I'm not in the devs' good books at the moment as I've been messing around in the code so much in the last two weeks >_> Does that mean it would be possible to add a function like this, maybe as a future feature? Or do the Windows APIs AutoIT is talking to make it impossible: GuiCtrlSetOnEvent($Edit1, "_EditText", $GUI_EVENT_SINGLE_CLICK) GuiCtrlSetOnEvent($Edit1, "_SelectText", $GUI_EVENT_DOUBLE_CLICK) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
jvanegmond Posted April 11, 2007 Share Posted April 11, 2007 No, it's bad practice to put a Sleep() in there. GuiGetMsg() runs flat out when there are messages waiting (responsive), but idles a little before returning when nothing is going on to stop high CPU load.What do you mean by 'messages waiting (responsive)'. I've noticed that you often get a lot of -7, -8 and -11 messages. Only the positive numbers are notifications that are useful. Do these negative messages also stack up? If they do stack up, then this piece of untested code can make your GUI's a lot faster. Func _GUIGetMsg() Local $message Do $message = GUIGetMsg() Until $message > 0 Return $message EndFunc github.com/jvanegmond Link to comment Share on other sites More sharing options...
therks Posted April 14, 2007 Share Posted April 14, 2007 Sorry, yes. That's what I meant.Tip-top head. Rofl.I'm not in the devs' good books at the moment as I've been messing around in the code so much in the last two weeks >_>It's still your child. It just has a lot of teachers who don't like your home schooling... or something...Okay that metaphor kind of ran away on me......and you talk to yourself too:http://www.autoitscript.com/forum/index.ph...showtopic=43944:-)Almost LOL'd at that. Methinks perhaps Mr. Bennett should see a shrink. My AutoIt Stuff | My Github 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