MicroMacro open file dialog bug

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
Forum rules
This is a sub-forum for things specific to MicroMacro.

This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

MicroMacro open file dialog bug

#1 Post by rock5 » Wed Feb 12, 2014 12:43 am

After writing a long description of the strange behavior I was having, I finally figured out what was causing it. There is a bug with the new open file dialog.

To reproduce problem:
Press enter to open the dialog. MM is now screwed whether you use the dialog or not.

Observed behavior:
If you start any script such as RoMBot, keypresses such as End, Delete and Ctrl-L become unresponsive. It seems to be able to accept 1 keypress if you hold it down for a few seconds, eg. if you hold End down for a few seconds it pauses but then wont accept anymore keypressess. If instead you hold Ctrl-L down for a few seconds the script terminates.

If you manage to terminate the script then you get other strange behavior.

If you then try to start any script with

Code: Select all

startMacro(main,true)
it immediately ends with a "Script forcibly terminated".

If you run a script with

Code: Select all

startMacro(main)
so you get the message

Code: Select all

The macro is currently not running. Press the start key (F5) to begin.
You may use (F6) key to stop/pause the script.
it wont accept any keypresses. If you then switch to another window and then switch back, the moment it's active again it stops with the message "Stopping execution".

Hopefully there are enough clues for you to figure it out.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: MicroMacro open file dialog bug

#2 Post by Administrator » Wed Feb 12, 2014 10:28 am

Very weird bug. Seems like for some reason the input queue is getting trashed after the 2nd call to GetOpenFileName(), but only if the user clicks the "Open" button (pressing ENTER doesn't seem to trigger this bug). It's screwed at the OS level, so it looks like this is another Windows bug we've uncovered. However, switching to GetAsyncKeyState() instead of GetKeyState() seems to function as a workaround.

I seem to remember a good reason I wasn't using GetAsyncKeyState() before, but the reason eludes me right now. I've attached a copy that needs some testing before I put it up on the main download page.
Attachments
micromacro.1.04.158.beta.zip
(804.47 KiB) Downloaded 164 times

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: MicroMacro open file dialog bug

#3 Post by rock5 » Wed Feb 12, 2014 11:37 am

That looks like it works. I was thinking of adding support for the dialog in the rombot. I thought I would just have it pop open if you don't make a selection at the waypoint list. So, if you press enter instead of making a selection. Similar to how you have it pop open if you press enter at the prompt. So I'll get the opportunity to test this version a bit while I'm doing that.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests