birdofprey Posted May 6, 2007 Posted May 6, 2007 (edited) 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 May 6, 2007 by birdofprey
Zedna Posted May 6, 2007 Posted May 6, 2007 Look here Resources UDF ResourcesEx UDF AutoIt Forum Search
birdofprey Posted May 6, 2007 Author Posted May 6, 2007 Look hereThanks ! I only need to (and probably can) call this GUIGetMsg () once in my script, right ?
birdofprey Posted May 7, 2007 Author Posted May 7, 2007 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 ?
birdofprey Posted May 7, 2007 Author Posted May 7, 2007 Putting a sleep back into the loop saves the program from becoming unresponsive, but then nothing happens if I press the button...
Zedna Posted May 7, 2007 Posted May 7, 2007 While 1 $msg = GuiGetMsg(1) Select Resources UDF ResourcesEx UDF AutoIt Forum Search
birdofprey Posted May 7, 2007 Author Posted May 7, 2007 While 1 $msg = GuiGetMsg(1) Select Great, you just answered my first question after your post. I need a $msg = GuiGetMsg(1) in every while loop. Thanks a lot !
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now