modernes Posted April 18, 2005 Share Posted April 18, 2005 Help! I wrote an AU3 script to be used by a bunch of people but for some reason, on some of the computers, the GUI disappeared and never came back. I created a GUI file to record/set the position of the window (initially 20,20) and it does not make any difference on the visibility of the GUI. The only difference that I can find is that the GUI was created on a machine with Windows 2000 and the only computers that it seems to be happening on have WinXP. However, some of the WinXP computers seem to have it visible. I tried changing the resolution and that didn't make any difference either. Any ideas? Link to comment Share on other sites More sharing options...
buzz44 Posted April 18, 2005 Share Posted April 18, 2005 Would help if you post your script . Are you using and Transparnecy settings or WinMove() or anything that could affect its positioning? qq Link to comment Share on other sites More sharing options...
modernes Posted April 18, 2005 Author Share Posted April 18, 2005 Maybe this can help. Each of the menu items triggers a function from another file expandcollapse popupGlobal $status = "Ready" Global $ABORT_ACTION = 0 $helpdoc = FileGetShortName("<path>") $nowDate = @MON & "/" & @MDAY & "/" & @YEAR $nowTime = @HOUR & ":" & @MIN & ":" & @SEC $winpos[0] = IniRead("<ini path>", "IMSC Settings", "WinPosX", -1) $winpos[1] = IniRead("<ini path>", "IMSC Settings", "WinPosY", -1) #EndRegion ~Variables #Region ~Main Gui Design $IMSC = GUICreate("IMSC", 200, 36, $winpos[0], $winpos[1], -1, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW);819 and 90 $statuslabel = GUICtrlCreateLabel($status, 0, 0, 200, 16, $SS_SIMPLE + $SS_SUNKEN) GUISetIcon("<path for icon>") #Region ~Asset Menu Item $assetmenu = GUICtrlCreateMenu("<menu name>") $assetitem1 = GUICtrlCreateMenuitem("<menu item name>" & @TAB & "Ctrl-Alt-O", $assetmenu) $assetitem3 = GUICtrlCreateMenuitem("<menu item name>" & @TAB & "Ctrl-Alt-A", $assetmenu) $assetitem4 = GUICtrlCreateMenuitem("<menu item name>" & @TAB & "Ctrl-Alt-L", $assetmenu) GUICtrlCreateMenuitem("", $assetmenu) $termmenu = GUICtrlCreateMenu("&Termination", $assetmenu) $termitem1 = GUICtrlCreateMenuitem("<menu item name>", $termmenu, 1) $termitem2 = GUICtrlCreateMenuitem("<menu item name>", $termmenu, 2) $termitem3 = GUICtrlCreateMenuitem("<menu item name>", $termmenu, 3) $termitem4 = GUICtrlCreateMenuitem("<menu item name>", $termmenu, 4) $termitem5 = GUICtrlCreateMenuitem("<menu item name>", $termmenu, 5) $termitem6 = GUICtrlCreateMenuitem("<menu item name>", $termmenu, 6) GUICtrlCreateMenuitem("", $assetmenu) $ordermenu = GUICtrlCreateMenu("<menu name>", $assetmenu) GUICtrlCreateMenuitem("", $assetmenu) $chnotesmenu = GUICtrlCreateMenu("<menu name>", $assetmenu) $dismenu = GUICtrlCreateMenu("<menu name>", $chnotesmenu) $disitem1 = GUICtrlCreateMenuitem("<menu item name>", $dismenu) $disitem2 = GUICtrlCreateMenuitem("<menu item name>", $dismenu) $disitem3 = GUICtrlCreateMenuitem("<menu item name>", $dismenu) $tammenu = GUICtrlCreateMenu("<menu name>", $assetmenu) $tamitem1 = GUICtrlCreateMenuitem("<menu item name>", $tammenu) $tamitem2 = GUICtrlCreateMenuitem("<menu item name>", $tammenu) $tamitem3 = GUICtrlCreateMenuitem("<menu item name>", $tammenu) $tamitem4 = GUICtrlCreateMenuitem("<menu item name>", $tammenu) $tamitem5 = GUICtrlCreateMenuitem("<menu item name>", $tammenu) $tamitem6 = GUICtrlCreateMenuitem("<menu item name>", $tammenu) $tamitem7 = GUICtrlCreateMenuitem("<menu item name>", $tammenu) GUICtrlCreateMenuitem("", $assetmenu) $assetitem11 = GUICtrlCreateMenuitem("<menu item name>" & @TAB & "Ctrl-Alt-T", $assetmenu) $assetitem14 = GUICtrlCreateMenuitem("<menu item name>", $assetmenu) $assetitem15 = GUICtrlCreateMenuitem("<menu item name>", $assetmenu) $assetitem12 = GUICtrlCreateMenuitem("<menu item name>", $assetmenu) $assetitem13 = GUICtrlCreateMenuitem("<menu item name>", $assetmenu) #EndRegion ~Asset Menu Item #Region ~IMAC Menu $mnuImac = GUICtrlCreateMenu("&Imac") $mnuImacQueue = GUICtrlCreateMenuitem("<menu item name>", $mnuImac) $mnuImacOrder = GUICtrlCreateMenuitem("<menu item name>", $mnuImac) #EndRegion ~IMAC Menu #Region ~Global Menu Item $globalmenu = GUICtrlCreateMenu("&Global") $globalitem1 = GUICtrlCreateMenuitem("<menu item name>", $globalmenu) $globalitem2 = GUICtrlCreateMenuitem("<menu item name>", $globalmenu) $globalitem3 = GUICtrlCreateMenuitem("<menu item name>", $globalmenu) #EndRegion ~Global Menu Item #Region ~Login Menu Item $loginmenu = GUICtrlCreateMenu("&Login") $loginitem1 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu) $loginitem1 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu) $loginitem2 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu) $loginitem8 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu)$loginitem3 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu)$loginitem4 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu)$loginitem5 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu)$separator5 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu)$loginitem7 = GUICtrlCreateMenuitem("<menu item name>", $loginmenu) #EndRegion ~Login Menu Item #Region ~Help Menu Item $helpmenu = GUICtrlCreateMenu("&Help") $helpitem1 = GUICtrlCreateMenuitem("<menu item name>", $helpmenu) $separator6 = GUICtrlCreateMenuitem("", $helpmenu) $helpitem2 = GUICtrlCreateMenuitem("<menu item name>", $helpmenu) $separator7 = GUICtrlCreateMenuitem("", $helpmenu) $helpitem3 = GUICtrlCreateMenuitem("<menu item name>", $helpmenu) #EndRegion ~Help Menu Item GUISetState();Run the GUI until the dialog is closed Link to comment Share on other sites More sharing options...
buzz44 Posted April 18, 2005 Share Posted April 18, 2005 (edited) Check on a computer, where this is happening, the INI file and see what values are in WinPos[0] and WinPos[1]. Edited April 18, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
modernes Posted April 18, 2005 Author Share Posted April 18, 2005 I've checked the ini file and tested various positions, and I also tried to change the resolution, but the GUI never shows up. Any other suggestions? Link to comment Share on other sites More sharing options...
buzz44 Posted April 18, 2005 Share Posted April 18, 2005 (edited) Try GUISetState(@SW_SHOW). And try this for the GUI window. $IMSC = GUICreate("IMSC", 200, 36, $winpos[0], $winpos[1], -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) Edited April 18, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
CyberSlug Posted April 18, 2005 Share Posted April 18, 2005 You've encountered a bug that has gotten me a few times. Maybe we should remind jpm and the guys: Your window HEIGHT is too small. If the height is less than the height of a titlebar, then the GUI never appears.... Under the default Windows XP style, the titlebar height is bigger than it used to be. Try a height of 100 Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
jpm Posted April 18, 2005 Share Posted April 18, 2005 You've encountered a bug that has gotten me a few times. Maybe we should remind jpm and the guys:Your window HEIGHT is too small. If the height is less than the height of a titlebar, then the GUI never appears....Under the default Windows XP style, the titlebar height is bigger than it used to be. Try a height of 100<{POST_SNAPBACK}>I am not sure to understand what too small mean. It is the user responsability to define the HEIGHT in agreement with the windows/Style it is running with.Where do you suggest I put this warning in the doc? Link to comment Share on other sites More sharing options...
CyberSlug Posted April 18, 2005 Share Posted April 18, 2005 I might be wrong.... Hmm, I can't track down the problem.... modernes's code only works for me if I increase the height.... HOWEVER, the following works for me:$height = 1 #include <GuiConstants.au3> GuiCreate("This works for me", 200, $height) GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE Wend confused Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
jpm Posted April 19, 2005 Share Posted April 19, 2005 (edited) I might be wrong.... Hmm, I can't track down the problem....modernes's code only works for me if I increase the height....HOWEVER, the following works for me:$height = 1 #include <GuiConstants.au3> GuiCreate("This works for me", 200, $height) GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE Wend confused<{POST_SNAPBACK}>that's work for me too.@modernescan you post a fully (non)working script with associated data so I can reproduce?Thanks Edited April 19, 2005 by jpm Link to comment Share on other sites More sharing options...
modernes Posted April 19, 2005 Author Share Posted April 19, 2005 Hey Guys, You were right, the sizing of the GUI was too small. So I increased it and it appeared again. Thanks for all your help! 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