Wb-FreeKill Posted January 10, 2005 Share Posted January 10, 2005 How can i open a new GUI, by pressing a button in the current GUI? If $msg = $newkey then GUICreate("New Key", 100,150) GUICtrlSetState(0,$GUI_SHOW) GuiSetState () endif Link to comment Share on other sites More sharing options...
Wolvereness Posted January 10, 2005 Share Posted January 10, 2005 How can i open a new GUI, by pressing a button in the current GUI?If $msg = $newkey then GUICreate("New Key", 100,150) GUICtrlSetState(0,$GUI_SHOW) GuiSetState () endif<{POST_SNAPBACK}>Best way is making a GUI ahead of time and just setting the action to take when the button is pressed (if you don't know that then read up on GUIs better) To GUISetState(@SW_HIDE) GUISwitch($SecondaryGui) GuiSetState()That will switch the current working GUI. For the new controls just add them to the normal loop, it wont pick up a msg if the GUI isn't active. Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 10, 2005 Author Share Posted January 10, 2005 Ive now made the GUI, in the GUI, but when i close the 2'nd GUI, it closes the otherone to If $msg = $newkey_btn then $SecondaryGui = GUICreate("Change Your Windows Key", 270,150) GUICtrlCreateLabel("WARNING", 90, 13, 100, 20) GUICtrlSetFont (-1, 14, 400, 4,"Comic Sans MS") GUICtrlCreateLabel("Changing your Windows CD-Key is on your own risk, i will not take any responsebility for any damage caused by this act! ", 10, 45, 250, 50) GUICtrlCreateLabel("Are you sure?", 10, 90, 70, 15) $key_yes = GUICtrlCreateButton ("YES",30,115, 90, 22) $key_no = GUICtrlCreateButton ("Cancel",150, 115, 90, 22) GUISetState(@SW_HIDE) GUISwitch($SecondaryGui) GuiSetState() endif Link to comment Share on other sites More sharing options...
Josbe Posted January 10, 2005 Share Posted January 10, 2005 Look in the helpfile about GUIGetMsg(1) (parameter 1). Maybe this little example helps you:#include <GUIConstants.au3> $parent= GUICreate("Example") $btnChild = GUICtrlCreateButton("Open a GUI", 150, 150, 150, 50) GUISetState () $child = GUICreate("Child", 150, 150, 70, 70, -1, -1, $parent) GUISetState (@SW_HIDE) GUISetState ($parent) While 1 $msg = GUIGetMsg(1) $msg_event = $msg[0] $msg_win = $msg[1] ; Closing parent window If $msg_event = $GUI_EVENT_CLOSE AND $msg_win = $parent Then ExitLoop ; Closing child window If $msg_event = $GUI_EVENT_CLOSE AND $msg_win = $child Then GuiSetState(@SW_HIDE) GuiSwitch($parent) EndIf If $msg_event = $btnChild Then GuiSwitch($child) GuiSetState() EndIf Wend • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 10, 2005 Author Share Posted January 10, 2005 Ive tried all kind of ways now, and i think i allmost got it right now! But there is one problem. When ive closed the 2'nd GUI, and return to the first one, and then close it, its still open in the progress bar? The first GUI is called $GUI1 If $msg = $newkey_btn then $GUI2 = GUICreate("Change Your Windows Key", 270,150) GUICtrlCreateLabel("WARNING", 90, 13, 100, 20) GUICtrlSetFont (-1, 14, 400, 4,"Comic Sans MS") GUICtrlCreateLabel("Changing your Windows CD-Key is on your own risk, i will not take any responsebility for any damage caused by this act! ", 10, 45, 250, 50) GUICtrlCreateLabel("Are you sure?", 10, 90, 70, 15) $key_yes = GUICtrlCreateButton ("YES",30,115, 90, 22) $key_no = GUICtrlCreateButton ("Cancel",150, 115, 90, 22) GuiSetState() while 1 $msg = GuiGetMsg() If $msg = $GUI_EVENT_CLOSE Then GuiSetState(@SW_HIDE) GuiSwitch($GUI1) endif WEnd endif Hope you guys can help me Link to comment Share on other sites More sharing options...
Josbe Posted January 10, 2005 Share Posted January 10, 2005 When ive closed the 2'nd GUI, and return to the first one, and then close it, its still open in the progress bar?Progress bar? (Suggestion: If you want, add your script in an attachment or post the entire script.) • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 11, 2005 Author Share Posted January 11, 2005 Task bar, were the clock is Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 11, 2005 Author Share Posted January 11, 2005 (edited) I can attatch the script, but it is very messy, but try to find out why the second GUI closes both? And under Specifikation, how i make the pic as a button to the website! Edited January 11, 2005 by Wb-FreeKill Link to comment Share on other sites More sharing options...
DirtyBanditos Posted January 11, 2005 Share Posted January 11, 2005 (edited) I can attatch the script, but it is very messy, but try to find out why the second GUI closes both?And under Specifikation, how i make the pic as a button to the website!<{POST_SNAPBACK}>Hi your script looks good but he tell me not my wlan ip adress he say me offline löl))) ((i use this for load any picks ^^look it and test I hope you like it!#include <GUIConstants.au3> HotKeySet ("{F5}", "Close") $xPos = -1 $yPos = 0 $Title = "Multi Spammbot Loader 1.3 Alfa By DirtyBanditos - Press F5 to exit !(11.01.2005) " GUICreate ($Title, 520, 500, $xPos, $yPos, 0x00800000) WinSetTrans ($Title, "", 200 ) GUISetState () While 1 $get= GUIGetMsg () Select Case $get= -3 Exit EndSelect GetEcho () GUICtrlCreatePic (@TempDir & "\Pick%201.gif", -1, -1, 700, 485) Sleep (60000) WEnd Func GetEcho () InetGet ("http://people.freenet.de/SacredBugedShop/Pick%201.gif", @TempDir & "\Pick%201.gif", 1, 0) EndFunc Func Close () Exit EndFunc Edited January 11, 2005 by DirtyBanditos Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 11, 2005 Author Share Posted January 11, 2005 Someone plz help me with the script, i cant get it to work Link to comment Share on other sites More sharing options...
Josbe Posted January 11, 2005 Share Posted January 11, 2005 (edited) Check the small changes/additions between:Lines: 388-399, 407-426I recommend you, again, read all about GUIGetMsg(), GUISwitch() functions.Good luck...PC_Info_v1.4__Eng__changed_.au3 Edited January 11, 2005 by josbe • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 11, 2005 Author Share Posted January 11, 2005 Really good job josbe! thx alot About the picture, ill look at it! Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 11, 2005 Author Share Posted January 11, 2005 (edited) #Dirtybanditos - hmm, weird, it goes search for www.myip.dk and 2 other sites, to look for a specific file. Maybe you turned something off? Edited January 11, 2005 by Wb-FreeKill Link to comment Share on other sites More sharing options...
DirtyBanditos Posted January 11, 2005 Share Posted January 11, 2005 #Dirtybanditos - hmm, weird, it goes search for www.myip.dk and 2 other sites, to look for a specific file. Maybe you turned something off?<{POST_SNAPBACK}>Hi Wb-freeKill i have look your link to my ip he tell my ip real ip 83.135.85.188 this is my lan ip 178.13.45.11 on the wlan!but your script tell error wen looking your ar offline say it(( 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