jiglei Posted September 27, 2009 Share Posted September 27, 2009 (edited) Hello, I've created a autoit program that works only trhough the interaction of a tray. It is supposed to hide or show some windows when they exist, when the user clicks the tray items. But for some reason, there's showing up a window gui that I did not created or coded. The window looks like this:Here's the full code of the program, don't ask for technical information, if you don't know what it is, its because you aren't supposed to know ;P :expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=sboticon.ico #AutoIt3Wrapper_Outfile=Sbot Manager prototype v1.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Global $Paused Global $Botname[30] Global $names[30] Opt("WinTitleMatchMode", 2) Opt("TrayAutoPause", 0) Opt("TrayMenuMode", 1) $Hide = TrayCreateItem("Hide All SBot Windows", -1) $Show = TrayCreateItem("Show all SBot Windows", -1) $Min = TrayCreateItem("Minimize", -1) $Exittray = TrayCreateItem("Exit Program", -1) While 1 $tMsg = TrayGetMsg() Switch $tMsg Case $Hide $Windows = WinList("SBot") For $i = 1 To $Windows[0][0] WinSetState($Windows[$i][0], "", @SW_HIDE) $names[$i] = ControlGetText($Windows[$i][0], "", 570) $Botname[$i] = TrayCreateItem($names[$i]) Next Case $Show $Windows = WinList("SBot") For $i = 1 To $Windows[0][0] WinSetState($Windows[$i][0], "", @SW_SHOW) TrayItemDelete($Botname[$i]) Next Case $Botname[1] WinSetState($names[1], "", @SW_SHOW) WinActivate($names[1]) Case $Botname[2] WinSetState($names[2], "", @SW_SHOW) WinActivate($names[2]) Case $Botname[3] WinSetState($names[3], "", @SW_SHOW) WinActivate($names[3]) Case $Botname[4] WinSetState($names[4], "", @SW_SHOW) WinActivate($names[4]) Case $Botname[5] WinSetState($names[5], "", @SW_SHOW) WinActivate($names[5]) Case $Botname[6] WinSetState($names[6], "", @SW_SHOW) WinActivate($names[6]) Case $Botname[7] WinSetState($names[7], "", @SW_SHOW) WinActivate($names[7]) Case $Botname[8] WinSetState($names[8], "", @SW_SHOW) WinActivate($names[8]) Case $Botname[9] WinSetState($names[9], "", @SW_SHOW) WinActivate($names[9]) Case $Botname[10] WinSetState($names[10], "", @SW_SHOW) WinActivate($names[10]) Case $Botname[11] WinSetState($names[11], "", @SW_SHOW) WinActivate($names[11]) Case $Botname[12] WinSetState($names[12], "", @SW_SHOW) WinActivate($names[12]) Case $Botname[13] WinSetState($names[13], "", @SW_SHOW) WinActivate($names[13]) Case $Botname[14] WinSetState($names[14], "", @SW_SHOW) WinActivate($names[14]) Case $Botname[15] WinSetState($names[15], "", @SW_SHOW) WinActivate($names[15]) Case $Min $Windows = WinList("SBot") For $i = 1 To $Windows[0][0] WinSetState($Windows[$i][0], "", @SW_MINIMIZE) Next Case $Exittray Exit EndSwitch WEndThe window seems to show up usualy only when I press hide, can it have something to do with it?Is there possibly something wrong with my arrays or variables?Please help me, by trying the code or giving a quick eye on it...Thanks for your time.PS: If I close that window, the program will also close. Edited September 27, 2009 by jiglei Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 27, 2009 Share Posted September 27, 2009 That is the hidden AutoIt window. You can test it by using AutoItWinSetTitle("kjndgkjd") To fix it you should remove your Opt("Win... and use window handles instead of titles. Also do some error checking for those WinList(). .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
jiglei Posted September 27, 2009 Author Share Posted September 27, 2009 (edited) That is the hidden AutoIt window. You can test it by using AutoItWinSetTitle("kjndgkjd") To fix it you should remove your Opt("Win... and use window handles instead of titles. Also do some error checking for those WinList().Thanks, I'll try it then. While I was searching for a soulution, I found that that option changed that window name.I'll report when I have time to try what you suggested.EDIT: FIXED!!!I found a way around it, thanks to your clues.Thank you once more Edited September 27, 2009 by jiglei 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