Guest nap Posted August 10, 2005 Share Posted August 10, 2005 how could i creat a permanent window which couldn't be closed until the app says? this window should although show "..." as a small animation this means one "." two ".." three "..." zero ""and then start again. only to show that the system is active. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 Could do a GUI w/ no X button. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Guest nap Posted August 10, 2005 Share Posted August 10, 2005 how to get away the x button? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 #NoTrayIcon #include <GuiConstants.au3> GUICreate("My GUI", 300, 250, 400, 305, 0x80080040, $WS_EX_TOPMOST) GuiSetState() While 1 ;script here Wend Annoying little bugger too! Please Note that I took the tray Icon out, If you don't feel like using the taskmanager to close the program, I suggest you remove #NoTrayIcon Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Guest nap Posted August 10, 2005 Share Posted August 10, 2005 doesn't work it only creats a normal window with x. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 Works in mine, XP Pro SP2. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Guest nap Posted August 10, 2005 Share Posted August 10, 2005 (edited) now it works don't know what i did wrong ^^. the next thing is this window should popup while i push a button and the other window should be hidden by pushing this button. here i have two probs: how to hide the parent window and how could the new window popup? Edited August 10, 2005 by nap Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 (edited) Read the help file on @SW_SHOW AND @SW_HIDE Here's a small example without the Child window. #NoTrayIcon #include <GuiConstants.au3> GUICreate("My GUI", 300, 250, 400, 305, 0x80080040, $WS_EX_TOPMOST) $Label = GUICtrlCreateLabel("", 100, 100, 400, 305) GuiSetState(@SW_HIDE) While 1 Sleep(5000) GUISetState(@SW_SHOW) GUICtrlSetData($Label, "...3") GUICtrlSetFont($Label, 36, "Arial Bold") Sleep(2000) GUICtrlSetData($Label, "...2") GUICtrlSetFont($Label, 36, "Arial Bold") Sleep(2000) GUICtrlSetData($Label, "...1") GUICtrlSetFont($Label, 36, "Arial Bold") Sleep(2000) GUICtrlDelete($Label) $Label = GUICtrlCreateLabel("", 50, 30, 400, 305) GUICtrlSetData($Label, "The Show" & @CRLF & "Will Now" & @CRLF & "Begin") GUICtrlSetFont($Label, 36, "Arial Bold") Sleep(3000) ExitLoop Wend It's not the code you want.... but it has everything you need... so look at it closely. Edit: Added a Sleep(3000) so you could see the last part of the loop. Edit 2: Added a Sleep(2000) after "...1" so you could see that... I suck at scripts on the fly!! Edited August 10, 2005 by ronsrules Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 I was working on one of my scripts, and realized I probably should of just did the 3,2,1 in a For Statement to give you an even better idea on things you might try. #NoTrayIcon #include <GuiConstants.au3> GUICreate("My GUI", 300, 250, 400, 305, 0x80080040, $WS_EX_TOPMOST) $Label = GUICtrlCreateLabel("", 100, 100, 400, 305) GuiSetState(@SW_HIDE) While 1 Sleep(5000) GUISetState(@SW_SHOW) For $i = 3 To 1 Step - 1 GUICtrlSetData($Label, "..." & $i) GUICtrlSetFont($Label, 36, "Arial Bold") Sleep(2000) Next Sleep(1000) GUICtrlDelete($Label) $Label = GUICtrlCreateLabel("", 50, 30, 400, 305) GUICtrlSetData($Label, "The Show" & @CRLF & "Will Now" & @CRLF & "Begin...") GUICtrlSetFont($Label, 36, "Arial Bold") Sleep(3000) ExitLoop Wend Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Guest nap Posted August 10, 2005 Share Posted August 10, 2005 i think i'm too noobish. here some lines of my code: #include <GuiConstants.au3> $win1= GUICreate("window1", 350, 200) $button1= GUICtrlCreateButton("press", 10,10) GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg= $button1 GUISetState(@SW_HIDE) $win2= GUICreate("window2", 150, 50, 400, 305, 0x80080040, $WS_EX_TOPMOST) ; this label should be visible in window 2 GUICtrlCreateLabel("test", 20, 10) EndSelect WEnd the only thing which works is the hiding window1. but window2 doesn't popup could u please tell me which command is missing? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 $win2= GUICreate("window2", 150, 50, 400, 305, 0x80080040, $WS_EX_TOPMOST); this label should be visible in window 2 GUICtrlCreateLabel("test", 20, 10) GuiSetState(@SW_SHOW) EndSelectI didn't look much, but try setting the state of the other GUI.Good Luck Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Guest nap Posted August 10, 2005 Share Posted August 10, 2005 oO u were right, thx a lot. is it possible to suround window2 with black lines? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 Considering we shaved off all the borders, I would assume the only way would be to make a GUI behind that one a bit bigger. I also looked at your code again... What's up w/ your While statement? While GuiGetMsg() <> $GUI_EVENT_CLOSE ?? 1st, I dunno what your trying to do here, 2nd.... Thought you didn't want the GUI To Close? #include <GuiConstants.au3> $win1= GUICreate("window1", 350, 200) $button1= GUICtrlCreateButton("press", 10,10) GuiSetState() While 1 $msg = GUIGetMsg() Select Case $msg= $button1 GUISetState(@SW_HIDE) $win2= GUICreate("window2", 50, 50, 400, 305, 0x80080040, $WS_EX_TOPMOST) GUISetBkColor(0xFFFFFF) $LABEL = GUICtrlCreateLabel("TEST", 13, 15) GUICtrlSetFont($LABEL, 10, "ARIAL BOLD") GUICtrlSetColor($LABEL, 0x0000FF) GUISetState() $WIN3 = GUICreate("", 70, 70, 390, 295, 0x80080040) GUISetBkColor(0x000000) GUISetState() EndSelect WEnd I don't know if this is good or not, I'm sure gafrost will be around in a bit to tell us how bad of an idea this is () or maybe he can show how to make it better. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Guest nap Posted August 10, 2005 Share Posted August 10, 2005 i set the gui color to yellow this should be enough. i took the code out of bigger script and didn't change this thing ^^. 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