Jump to content

Program jumping to wrong function


Recommended Posts

I had this problem before and was able to fix it, but now I can't remember how and the problem has returned. I was going through and optimizing the code for my program launcher and what happens is,

if you right click a shortcut added to the main gui to bring up the options then click the green arrow to close, the main gui "sticks" to the mouse until you left click. (this is the behavior of the _MoveGui() function)

What it is supposed to do is close the right click gui and return to the main _Gadget_CreateGUI() function.

_Gadget_CreateGUI() starts on line 948

the problem area is line 1486 (which is the switch to close the right click menu)

_MoveGui() is on line 1782

the function that calls MoveGui() is _Tray() on line 1311

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

What it is supposed to do is close the right click gui and return to the main _Gadget_CreateGUI() function.

I've tried the following:

- dragged an application to the listview

- right-clicked on it; the properties GUI showed.

- closed the properties GUI from the green arrow (it returned to the main GUI).

I don't see what's the problem... Seems ok to me.

Link to comment
Share on other sites

I don't see any "sticking" on my machine (Win7 x64/x86 Aero ON).

You could try running with #AutoIt3Wrapper_Run_Debug_Mode=Y and maybe you'll see where the bad turn happens.

If that doesn't work there's a bunch of debug tools in the Tools menu you could try for that effect too.

Edited by AdmiralManHairAlkex
Link to comment
Share on other sites

I forgot to mention that it was tested with Windows7/32bit/Classic theme. I made a test now with Aero and got the same issue as you said. Maybe if you disable the main gui when the properties gui shows, then re-enable when the green arrow is clicked, might be a solution.

Link to comment
Share on other sites

Thanks taietel I'll give that a try.

Also thank you Admiral for reminding me of the debug mode. Most often my issues come from variables which I use msgbox to debug. Unfortunately I don't think msgbox would help in this case.

*edit*

adding GUISetState(@SW_DISABLE,$hGUI) at the start of the ListView_RightClick() function

and then adding GUISetState(@SW_ENABLE,$hGUI)and WinActivate($hGUI) before each return has stopped the gui from sticking :) Thank you!

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

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