Jump to content

Recommended Posts

Posted

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?

:shocked:

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
  • Administrators
Posted

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?

:shocked:

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.


 

Posted (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 by Jdonner
Posted

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.

:shocked:

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
Posted

(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!

Posted (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 by Saunders
  • Administrators
Posted

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 >_>


 

Posted

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)

:shocked:

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
Posted

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
Posted

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...

Almost LOL'd at that. Methinks perhaps Mr. Bennett should see a shrink. :shocked:

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
×
×
  • Create New...