Jump to content

With "while" Program stops responding, whitout "while" no return from function...


Recommended Posts

So, I have a $mainwindow. A double click on a listviewitem calls a function. This function checks for a menuitem's state, and if one of them is checked, it tries to create a new window (basically a custom inputbox) by calling a function that is supposed to return the value from the edit field after I press a button on it.

It seems to me that this function that creates this "rename window" returns 0, and passes it to my $moveto variable, instead of waiting for the value from the edit field... this happened after I removed the while loop, 'cause with that the whole thing just stops responding. Now how do I keep the cabbage and feed the goat ?

If BitAnd(GUICtrlRead($omi[5]),$GUI_CHECKED) = $GUI_CHECKED Then 
    $moveto = _RenameWindow($moveto)oÝ÷ Ù«­¢+ÙÕ¹}I¹µ]¥¹½Ü ÀÌØí}µ½ÙѼ¤($ÀÌØíɹµÝ¥¹½ÜôU%
ÉÑ ÅÕ½ÐíI¹µÀäÈí5½Ù´ÕÍÝ¥Ñ ÕÑ¥½¸ÌÌìÅÕ½Ðì°ÐÈÈ°ÌØ°´Ä°´Ä°´Ä°´Ä°ÀÌØíµ¥¹Ý¥¹½Ü¤($ÀÌØíɹµ¥¹ÁÐôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°Ü°Ü°ÌÐÜ°ÈĤ($%Õ¥
ÑɱÍÑÑ ÀÌØíɹµ¥¹ÁаÀÌØí}µ½ÙѼ¤($ÀÌØíɹµ¸ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíI¹µÅÕ½Ðì°ÌÔä°Ø°ÔÔ°ÈÈ°À¤(%U%MÑMÑÑ¡M]}M!=°ÀÌØíɹµÝ¥¹½Ü¤($$ÀÌØí¹5ÍôU%Ñ5Í ¤(%]¡¥±Ä($%MÝ¥Ñ ÀÌØí¹5Í($$%
ÍÀÌØíU%}Y9Q}
1=M($$$%U%MÑMÑÑ¡M]}!%°ÀÌØíɹµÝ¥¹½Ü¤($$$%IÑÕɸÅÕ½ÐìÅÕ½Ðì($$%
ÍÀÌØíɹµ¸($$$$ÀÌØí}µ½ÙѼôU%
ÑɱI ÀÌØíɹµ¥¹ÁФ($$$%U%MÑMÑÑ¡M]}!%°ÀÌØíɹµÝ¥¹½Ü¤($$$%IÑÕɸÀÌØí}µ½ÙѼ($$%
ͱÍ($%¹MÝ¥Ñ ($%M±À ÄÀÀ¤(%]¹(%
½¹Í½±]É¥Ñ ÅÕ½ÐìÌÌì´´1½½¬}I¹µ]¥¹½Ü¥¹¥Í¡Ý¥Ñ¡½ÕÐݥѥ¹½È¥¹ÁÕÐÌÌìÅÕ½Ðì¤)¹Õ¹
Edited by birdofprey
Link to comment
Share on other sites

Changed code to :

While 1
        Select
            Case $msg[0] = $GUI_EVENT_CLOSE AND $msg[1] = $renamewindow
                GUISetState(@SW_HIDE, $renamewindow)
                GUISetState(@SW_Show, $mainwindow)
                Return ""
            Case $msg[0] = $renamebn AND $msg[1] = $renamewindow
                $_moveto = GUICtrlRead ( $renameinpt )
                GUISetState(@SW_HIDE, $renamewindow)
                GUISetState(@SW_Show, $mainwindow)
                Return $_moveto
            Case Else
        EndSelect
    WEnd
    ConsoleWrite ( "!-- Look _RenameWindow finished ! ")
EndFunc

Still now working. I removed sleep. The Gui gets unresponsive again...

Shouldn't I be playing with $msg[2] here ? :)

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