Wb-FreeKill Posted April 18, 2005 Share Posted April 18, 2005 Just noticed, when you have more than 16 GUI's in a script, hided or not.. if you have a button in one of these gui's, it wont be "cought" by the GUIGetMsg() if pressed Is there a limit of how many GUI's in a script? Example: expandcollapse popup#Include <GUIConstants.au3> GUICreate("1",200,200) GUISetState(@SW_HIDE) GUICreate("2",200,200) GUISetState(@SW_HIDE) GUICreate("3",200,200) GUISetState(@SW_HIDE) GUICreate("4",200,200) GUISetState(@SW_HIDE) GUICreate("5",200,200) GUISetState(@SW_HIDE) GUICreate("6",200,200) GUISetState(@SW_HIDE) GUICreate("7",200,200) GUISetState(@SW_HIDE) GUICreate("8",200,200) GUISetState(@SW_HIDE) GUICreate("9",200,200) GUISetState(@SW_HIDE) GUICreate("10",200,200) GUISetState(@SW_HIDE) GUICreate("11",200,200) GUISetState(@SW_HIDE) GUICreate("12",200,200) GUISetState(@SW_HIDE) GUICreate("13",200,200) GUISetState(@SW_HIDE) GUICreate("14",200,200) GUISetState(@SW_HIDE) GUICreate("15",200,200) GUISetState(@SW_HIDE) #CS GUICreate("16",200,200); Test GUI, try activate.. and then press button GUISetState(@SW_HIDE) #CE GUICreate("My GUI",300,330) $Button = GUIctrlcreatebutton("Push me",115,290,70,22) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg =$GUI_EVENT_CLOSE Then Exit If $msg = $Button Then msgbox(0,"","test") WEnd Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 18, 2005 Author Share Posted April 18, 2005 Uhmm, anyone who tried and have the same problem? It's quite simple... Link to comment Share on other sites More sharing options...
CyberSlug Posted April 18, 2005 Share Posted April 18, 2005 Works for me using http://www.autoitscript.com/fileman/users/jpm/AutoIt3-gui/...What happens when you run the following?: I get up to 99 on the tooltip, but then the script hangs....#include <GuiConstants.au3> $count = 0 While 1 sleep(10) $result = GuiCreate("GUI Number " & $count, 200, 200) If @error Then ExitLoop $count = $count + 1 ToolTip("Creating GUI Window " & $count, 0, 0) WEnd MsgBox(4096,"Information", "Created " & $count & " GUI windows") 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...
layer Posted April 18, 2005 Share Posted April 18, 2005 should have used a for...next loop to make all those gui's :"> FootbaG Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 18, 2005 Share Posted April 18, 2005 I got about 150 before the script started to hang, All of this probably just depends on the computer your using. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Author Share Posted April 19, 2005 Works for me using AutoIt 3.1.1.8 on Windows XP SP2...But did you tri the button, when more than 16 GUI's are created... testet in on several of my scripts, and i didn't work.. i counted the gui's and i was the same amount every time I got about 150 before the script started to hang, All of this probably just depends on the computer your using.It's not about how many GUI's you can create, but if the buttons in them works..At my example, if i activate the 17'th GUI, the button wont respond at all.. but if i deactivate the 17'th it work again And i don't think is my pc!AMD 64 3200+ @ 2400 MHz1 GB RAMSapphire X800 ProRaptor 74 Gb (bootdisk) Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Author Share Posted April 19, 2005 Anyone who can agree or disagree?... Link to comment Share on other sites More sharing options...
kjactive Posted April 19, 2005 Share Posted April 19, 2005 Well I get just the same 'looks like a bug' on my au3 system on XP Rev. 1 - I tried the script in different conditions and it do blocks the messages from the attached control some how but it's a wird script, who needs 16 hideded windows!!! Kåre 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...
Wb-FreeKill Posted April 19, 2005 Author Share Posted April 19, 2005 who needs 16 hideded windows!!!I do, when making large programs with ALOT of buttons in different treeviewitems...IS this a limit? Link to comment Share on other sites More sharing options...
w0uter Posted April 19, 2005 Share Posted April 19, 2005 (edited) i get to like 120-130 guis before it hangs (goes really really slow) but yes the button works the same here ... (not ) Edited April 19, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Author Share Posted April 19, 2005 i get to like 120-130 guis before it hangs (goes really really slow)but yes the button works the same here ... (not )<{POST_SNAPBACK}>hmm wierd.. Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 19, 2005 Share Posted April 19, 2005 another test (100 works for me) main() Func main() ToolTip ( "Waiting for user interaction", 0, 0, "Script Status" ) $n = InputBox ( "AutoIt V3 Test", "Type the number of GUIs to create", 100 ) If $n = "" Then Exit ToolTip ( "Creating GUIs", 0, 0, "Script Status" ) For $n = 0 To $n-1 GUICreate ( "Hidden window", 1, 1 ) Next GUICreate ( "Shown Window", 100, 25 ) ToolTip ( "Displaying GUI", 0, 0, "Script Status" ) $button = GUICtrlCreateButton ( "Push me", 0, 0, 100, 25 ) GUISetState ( ) ToolTip ( "Waiting for user interaction", 0, 0, "Script Status" ) Do Sleep ( 10 ) Until GUIGetMsg ( ) = $button ToolTip ( "Disabling button", 0, 0, "Script Status" ) GUICtrlSetState ( $button, 128 ) ToolTip ( "Waiting for user interaction", 0, 0, "Script Status" ) Do Sleep ( 10 ) Until GUIGetMsg ( ) = -3 ToolTip ( "Waiting for user interaction", 0, 0, "Script Status" ) $msgbox = MsgBox ( 32 + 4, "AutoIt V3 Test", "Would you like to test AutoIt V3 again?" ) ToolTip ( "Exiting", 0, 0, "Script Status" ) If $msgbox = 6 Then _ main() EndFunc Exit i just tried 200 and that worked too whats the highest you guys get? [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 20, 2005 Author Share Posted April 20, 2005 (edited) Hmm, when i run the program, it gives me an error about the tooltip, so i removed "Script Status" from it.. When i run the program after removeing it, it gives me that input, i set it to 100 gui's.. the "show window" GUI shows, and when pressing the button, it bacomes disabled.. and then nothing happens at all Edit: But what should this prove? Edited April 20, 2005 by Wb-FreeKill Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 20, 2005 Share Posted April 20, 2005 It proves that we can have many guis and still have them work [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
herewasplato Posted April 20, 2005 Share Posted April 20, 2005 Uhmm, anyone who tried and have the same problem? It's quite simple...<{POST_SNAPBACK}>I changed your code ever so slightly:#Include <GUIConstants.au3> For $i = 1 to 16 GUICreate($i,400,400) GUISetState(@SW_SHOW) Next GUICreate("My GUI",300,330) $Button = GUIctrlcreatebutton("Push me",115,290,70,22) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg =$GUI_EVENT_CLOSE Then Exit If $msg = $Button Then msgbox(0,"","test") WEndRan this on two systems - both work at 15 and stop working at 16 loops... [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 20, 2005 Share Posted April 20, 2005 (edited) Sorry, i messed up when i made my code. Here is the fixed version that also shows the bug of windows not working when you get to 16 guisToolTip ( "Waiting for user interaction", 0, 0, "Script Status" ) $num = InputBox ( "AutoIt V3 Test", "Type the number of GUIs to create", 15 ) If $num = "" Then Exit ToolTip ( "Creating GUIs", 0, 0, "Script Status" ) For $n = 0 To $num-1 GUICreate ( "Hidden Window", 1, 1 ) Next $gui = GUICreate ( "Shown Window", 100, 25 ) ToolTip ( "Displaying GUI", 0, 0, "Script Status" ) $button = GUICtrlCreateButton ( "Push me", 0, 0, 100, 25 ) GUISetState ( ) GuiSwitch ( $gui ) ToolTip ( "Waiting for user interaction", 0, 0, "Script Status" ) Do $msg_array = GUIGetMsg(1) $msg = $msg_array[0] Until $msg = $button ToolTip ( "Disabling button", 0, 0, "Script Status" ) GUICtrlSetState ( $button, 128 ) ToolTip ( "Waiting for user interaction", 0, 0, "Script Status" ) Do $msg_array = GUIGetMsg(1) $msg = $msg_array[0] Until $msg = -3Edit: And a version for 3.1.0 users:ToolTip ( "Waiting for user interaction", 0, 0 ) $num = InputBox ( "AutoIt V3 Test", "Type the number of GUIs to create", 15 ) If $num = "" Then Exit ToolTip ( "Creating GUIs", 0, 0 ) For $n = 0 To $num-1 GUICreate ( "Hidden Window", 1, 1 ) Next $gui = GUICreate ( "Shown Window", 100, 25 ) ToolTip ( "Displaying GUI", 0, 0 ) $button = GUICtrlCreateButton ( "Push me", 0, 0, 100, 25 ) GUISetState ( ) GuiSwitch ( $gui ) ToolTip ( "Waiting for user interaction", 0, 0 ) Do $msg_array = GUIGetMsg(1) $msg = $msg_array[0] Until $msg = $button ToolTip ( "Disabling button", 0, 0 ) GUICtrlSetState ( $button, 128 ) ToolTip ( "Waiting for user interaction", 0, 0 ) Do $msg_array = GUIGetMsg(1) $msg = $msg_array[0] Until $msg = -3Edit: When i create 16 GUIs with this code the button does not work. But when i create 16 with the originally posted code it works. The code herewasplato posted didn't work.Edit: Modified code.Edit: GUI Switch does NOT fix the bug.Edit: Modified code.Edit: Extended GUI msg does NOT fix the bug. Edited April 20, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
randallc Posted April 20, 2005 Share Posted April 20, 2005 (edited) Do you need to use extended "guigetMsg" as in recent posts?;Toggle GUIClose GUI?Randall Edited April 20, 2005 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 20, 2005 Share Posted April 20, 2005 Neither of those work. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
randallc Posted April 21, 2005 Share Posted April 21, 2005 Neither of those work.<{POST_SNAPBACK}>I see - fascinating - not that i'd know! - Will you report it somewhere? - personal mail?Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
jpm Posted April 21, 2005 Share Posted April 21, 2005 THanks Wb_freeKill and herewasplato I found the BUG. I am not sure the correction will not break something else. So please everybody check with 3.1.1.12 (not yet uploaded) 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