kjactive Posted November 20, 2005 Share Posted November 20, 2005 (edited) I stumbled over a wird thing - actually two strange things that I do not know if this is a bug - can someone please explain my simple script d not get menu returns at all but all other like resize returns... This is a squized down script to handle three or more window handles, that's why I check up to locate what windowID it came from first ( Case $msg[1] = $MainW ) as all windows got a quit and only the calling window should get quit but the calling window do neigher get the quit but all get messaged in resizeID... expandcollapse popup#include <GUIConstants.au3> Global Const $Prefs = 'HKEY_CURRENT_USER\software\Au3ComDialog\Prefs',$title = 'Menu bug ?',$Rev = '1.0',$auther = ' (c)2005 by Kåre Johansson'; init constants Global $MainW,$dm0,$Status1C,$Status2C; init main intuition variables Global $QuitM; init menu globals ReadPrefs($Prefs); readin the preferences MainWindow() While 1 $msg = GUIGetMsg(1) Select Case $msg[1] = $MainW Select Case $msg[0] = $GUI_EVENT_RESIZED ConsoleWrite(1 & @CRLF) Case $msg[0] = $GUI_EVENT_CLOSE OR $msg[0] = $QuitM ConsoleWrite(2 & @CRLF) ExitLoop EndSelect EndSelect Wend Exit ;================================================================== ;MainWindow: Open the Formwindow intuition ;argument no / return no ;================================================================== Func MainWindow() $MainW = GUICreate($title & ' ' & $rev & ' ' & $auther, $dm0[3], $dm0[4], $dm0[1], $dm0[2],BitOr($WS_OVERLAPPEDWINDOW,$WS_VISIBLE,$WS_CLIPSIBLINGS)) $ProjectM = GUICtrlCreateMenu ("Project") $QuitM = GUICtrlCreateMenuitem ("Quit",$ProjectM) $Status1C = GUICtrlCreateInput('',0,$dm0[4]-40,150,20,$ES_READONLY) $Status2C = GUICtrlCreateInput('',150,$dm0[4]-40,$dm0[3]-150,20,$ES_READONLY) EndFunc ;================================================================== ;ReadPrefs: read in the preferences from initbase ;argument: the initbase address, no returns ;================================================================== Func ReadPrefs($Prefs) $var = RegRead($Prefs, 'FormWindow') If @error Then $var = '0 0 640 480';MainW: x y w h $dm0 = StringSplit($var,' ') EndFunc The other thing is that there is no GUISetState() function to the main window and normally that leaves the window unvisualized but this window show up nicely - Why me or bug... Could someone please explain why this behave to my scrip, is this a bug or what... kjactive Edited November 20, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 20, 2005 Moderators Share Posted November 20, 2005 Hey kj... Did you try this? Func MainWindow() $MainW = GUICreate($title & ' ' & $rev & ' ' & $auther, $dm0[3], $dm0[4], $dm0[1], $dm0[2],BitOr($WS_OVERLAPPEDWINDOW,$WS_VISIBLE,$WS_CLIPSIBLINGS)) $ProjectM = GUICtrlCreateMenu ("Project") $QuitM = GUICtrlCreateMenuitem ("Quit",$ProjectM) $Status1C = GUICtrlCreateInput('',0,$dm0[4]-40,150,20,$ES_READONLY) $Status2C = GUICtrlCreateInput('',150,$dm0[4]-40,$dm0[3]-150,20,$ES_READONLY) GUISetState(@SW_SHOW) EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MHz Posted November 20, 2005 Share Posted November 20, 2005 @kjactive If you think it is a bug, then you should mention your AutoIt version. Especially if you have posted a bug report. I notice you are using StringSplit without checking the @error macro. The last couple of beta versions have had troubles with StringSplit, so it would be good to know if you using 3.1.1.88 ? Beta is always a risk and unknown so you need to be more specific with beta problems. We can only answer to what we know and what version of AutoIt we/you are using. Link to comment Share on other sites More sharing options...
kjactive Posted November 20, 2005 Author Share Posted November 20, 2005 Well yes - I always use latest beta revision...Hey kj... Did you try this?Yes and that fixes the trouble but the thing is 'written in documentation' and it used to be - that the window should not be visioniced before 'GUISetState()' but it does, is this not a bug or somehow me...kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc... Link to comment Share on other sites More sharing options...
jpm Posted November 21, 2005 Share Posted November 21, 2005 Well yes - I always use latest beta revision...Yes and that fixes the trouble but the thing is 'written in documentation' and it used to be - that the window should not be visioniced before 'GUISetState()' but it does, is this not a bug or somehow me...kjactive How Autoit can fight to your desire $WS_VISIBLE use at creation timeJust don't use it if you want to manage the popup with the GUISetState.I have to admit that the not displaying of control can be improved. Link to comment Share on other sites More sharing options...
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