Sign in to follow this  
Followers 0
Aceguy

2 guis

6 posts in this topic

why doesnt this work please

#include <WindowsConstants.au3>
$box1=GUICreate('', 20, 20, 50, default, $WS_POPUP)
GUISetBkColor(0xff0000)
$box2=GUICreate('', 20, 20, 100, default, $WS_POPUP)
GUISetBkColor(0xff0000)
GUISetState()

While 1
    Sleep(1000)
WEnd

Share this post


Link to post
Share on other sites



It's a little red box, what did you want it to be?

Share this post


Link to post
Share on other sites

I'm not familiar with WindowsConstants.au3 and I think you need another GUISetState() before you make the second GUICreate


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

why doesnt this work please

#include <WindowsConstants.au3>
$box1=GUICreate('', 20, 20, 50, default, $WS_POPUP)
GUISetBkColor(0xff0000)
$box2=GUICreate('', 20, 20, 100, default, $WS_POPUP)
GUISetBkColor(0xff0000)
GUISetState()

While 1
    Sleep(1000)
WEnd
It (GUISetState) in your current setup would only show the last created GUI. Instead, you'd want to do a GUISetState for each GUI (assuming that what you're trying to do is make them both visible at once)

Try replacing the existing GUISetState() line with:

GUISetState(@SW_SHOW,$box1)
GUISetState(@SW_SHOW,$box2)

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0