Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Maximum amount of GUI's in a script?


  • Please log in to reply
22 replies to this topic

#1 Wb-FreeKill

Wb-FreeKill

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 647 posts

Posted 18 April 2005 - 04:35 PM

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:

Plain Text         
#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








#2 Wb-FreeKill

Wb-FreeKill

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 647 posts

Posted 18 April 2005 - 08:52 PM

Uhmm, anyone who tried and have the same problem? :)

It's quite simple...

#3 CyberSlug

CyberSlug

    Overwhelmed with work....

  • MVPs
  • 3,587 posts

Posted 18 April 2005 - 09:52 PM

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!

#4 layer

layer

    i love skateboarding

  • Active Members
  • PipPipPipPipPipPip
  • 2,470 posts

Posted 18 April 2005 - 10:43 PM

should have used a for...next loop to make all those gui's :">
FootbaG

#5 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 18 April 2005 - 11:41 PM

I got about 150 before the script started to hang, All of this probably just depends on the computer your using.
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#6 Wb-FreeKill

Wb-FreeKill

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 647 posts

Posted 19 April 2005 - 06:10 AM

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 :D


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 MHz
1 GB RAM
Sapphire X800 Pro
Raptor 74 Gb (bootdisk)

#7 Wb-FreeKill

Wb-FreeKill

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 647 posts

Posted 19 April 2005 - 03:15 PM

Anyone who can agree or disagree?...

#8 kjactive

kjactive

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 697 posts

Posted 19 April 2005 - 03:32 PM

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 :)

#9 Wb-FreeKill

Wb-FreeKill

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 647 posts

Posted 19 April 2005 - 03:56 PM

who needs 16 hideded windows!!!


I do, when making large programs with ALOT of buttons in different treeviewitems...

IS this a limit?

#10 w0uter

w0uter

    resreveR nA

  • Active Members
  • PipPipPipPipPipPip
  • 2,262 posts

Posted 19 April 2005 - 04:51 PM

i get to like 120-130 guis before it hangs (goes really really slow)

but yes the button works the same here ... (not :) )

Edited by w0uter, 19 April 2005 - 04:53 PM.

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

#11 Wb-FreeKill

Wb-FreeKill

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 647 posts

Posted 19 April 2005 - 06:12 PM

i get to like 120-130 guis before it hangs (goes really really slow)

but yes the button works the same here ... (not  :D )

<{POST_SNAPBACK}>

hmm wierd.. :)

#12 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 19 April 2005 - 10:58 PM

another test (100 works for me)
Plain Text         
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?
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#13 Wb-FreeKill

Wb-FreeKill

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 647 posts

Posted 20 April 2005 - 06:12 AM

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 by Wb-FreeKill, 20 April 2005 - 06:13 AM.


#14 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 20 April 2005 - 01:16 PM

It proves that we can have many guis and still have them work
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#15 herewasplato

herewasplato

    Most Senile Poster

  • Active Members
  • PipPipPipPipPipPip
  • 4,426 posts

Posted 20 April 2005 - 08:56 PM

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") WEnd


Ran this on two systems - both work at 15 and stop working at 16 loops...
..

#16 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 20 April 2005 - 10:50 PM

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 guis
Plain Text         
ToolTip ( "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 = -3


Edit: And a version for 3.1.0 users:
Plain Text         
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 = -3


Edit: 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 by Xenogis, 20 April 2005 - 11:54 PM.

If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#17 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 20 April 2005 - 11:23 PM

Do you need to use extended "guigetMsg" as in recent posts?;
Toggle GUI

Close GUI?
Randall

Edited by randallc, 20 April 2005 - 11:26 PM.


#18 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 20 April 2005 - 11:54 PM

Neither of those work.
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#19 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 21 April 2005 - 07:37 AM

Neither of those work.

<{POST_SNAPBACK}>

I see - fascinating - not that i'd know! - Will you report it somewhere? - personal mail?
Randall

#20 jpm

jpm

    a Real GUI/debug lover

  • Developers
  • 9,549 posts

Posted 21 April 2005 - 07:48 AM

THanks Wb_freeKill and herewasplato :D
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)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users