Jump to content

Recommended Posts

Posted (edited)

Hi All,

Am new to this forum, but long time since I have been relying on this forum for my questions and for sure have found the answers at ease in this forum.

This time am stuck up with an issue. I have a script which creates a GUI and upon clicking start button execution starts once execution starts other button press is not being recognized even though I have declared "Opt("GUIOnEventMode",1)" , but much to my surprise all the buttons presses are recognized before pressing the start buttons but after pressing the same the other buttons are not recognized(Ex: I have Exit,Pause buttons in my App)

Pl Guide me.

Thanks to one and All.

My special thanks to AutoIt Admins for hosting such a wonder full site :-)

Note: Am attaching my Script for your reference too.

Cheers,

Vishu

Script.au3

Edited by vishu
Posted

Hi All,

Am new to this forum, but long time since I have been relying on this forum for my questions and for sure have found the answers at ease in this forum.

This time am stuck up with an issue. I have a script which creates a GUI and upon clicking start button execution starts once execution starts other button press is not being recognized even though I have declared "Opt("GUIOnEventMode",1)" , but much to my surprise all the buttons presses are recognized before pressing the start buttons but after pressing the same the other buttons are not recognized(Ex: I have Exit,Pause buttons in my App)

Pl Guide me.

Thanks to one and All.

My special thanks to AutoIt Admins for hosting such a wonder full site :-)

Note: Am attaching my Script for your reference too.

Cheers,

Vishu

The description sounded familiar, and sure enough, I found the problem without even reading your script. I saw "GuiOnEventMode" at the top, and then search for any instance of GuiGetMsg()... bingo!

Once you enable "GuiOnEventMode", GuiGetMsg() cannot be used at all, and will only return 0. It's all-or-nothing. If you want to use events (which I prefer myself), use events for everything.

:D

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

Hi PsaltyDS,

Wow that was amazing you excatly pinpoint the problem that was too good I could understand the conflict between GuiOnEventMode and GuiGetMsg().

But I have one doubt is their any alternative way wherein I could use any othe command other than GuiGetMsg().along with GuiOnEventMode. If so pl let me know it would be great.

Thanks once again PsaltyDS.

Cheers,

Vishu

Posted

...is their any alternative way wherein I could use any othe command other than GuiGetMsg().along with GuiOnEventMode.

Say what? I didn't understand the question, but in general you have a choice to either code the entire script to use GuiGetMsg() loop, or code the entire script to use event mode for everything.

There are technically ways to try and play them both or switch between modes on the fly, but that's unnecessarily complicated and nobody would want to do that. If you haven't figured out how to get either method working by itself, you certainly aren't ready to try an absurdly complicated mixing of them.

:D

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

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
  • Recently Browsing   0 members

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