Unc3nZureD Posted June 9, 2010 Share Posted June 9, 2010 hi, i tried to do a little "program" with a GUI but i get stucked at the testing.1st i show my source: expandcollapse popupmsgbox(4096, "Credits", "All credit goes to Unc3nZureD!" & @CRLF & " Thanks For Using") #include <GUIConstantsEx.au3> $GUI = GUICreate("Help", 200, 200) $B1 = GUICtrlCreateButton("Button 1",0,0,200,50) $B2 = GUICtrlCreateButton("Button 2",0,50,200,50) $B3 = GUICtrlCreateButton("Button 3",0,100,200,50) $B4 = GUICtrlCreateButton("Button 4",0,150,200,50) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $B1 $sVar = InputBox("Spammer", "Write the text what u want to spam. Avoid for the character limits") Global $Paused HotKeySet("{F10}", "ShowMe") While 1 Sleep(100) WEnd Func ShowMe() Send("{ENTER}") Send($sVar) Send("{ENTER}") EndFunc Case $B2 Case $B3 Case $B4 EndSwitch WEnd (the case2,3,4 is currently clear, i'll do more features there) now my problem: when i press Button1 the window will open but i can't do other thing in the GUI window. is that possible to let me use the GUI and the opened script too? thanks! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 9, 2010 Moderators Share Posted June 9, 2010 Unc3nZureD,You are stuck in an infinite loop within the $B1 Case structure - remove it. Also put the Func ShowMe() code at the end of your script.That should get you on your way - although posting code which includes the word "spam" will not make you many friends nor get you much more help around here. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Unc3nZureD Posted June 9, 2010 Author Share Posted June 9, 2010 oops ok i'll try it and sorry for spam text Link to comment Share on other sites More sharing options...
CodyBarrett Posted June 11, 2010 Share Posted June 11, 2010 a different method for the GUI... expandcollapse popupmsgbox(4096, "Credits", "All credit goes to Unc3nZureD!" & @CRLF & " Thanks For Using") ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; Opt ('GuiOnEventMode',1) ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; #include <GUIConstantsEx.au3> $GUI = GUICreate("Help", 200, 200) $B1 = GUICtrlCreateButton("Button 1",0,0,200,50) ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; GUICtrlSetOnEvent ($B1,'_B1') ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; $B2 = GUICtrlCreateButton("Button 2",0,50,200,50) $B3 = GUICtrlCreateButton("Button 3",0,100,200,50) $B4 = GUICtrlCreateButton("Button 4",0,150,200,50) GUISetState(@SW_SHOW) ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; GUISetOnEvent ($GUI_EVENT_CLOSE,'_GUI_EVENT_CLOSE',$GUI) ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; While 1 ;~ $nMsg = GUIGetMsg() ;~ Switch $nMsg ;~ Case $GUI_EVENT_CLOSE ;~ Exit ;~ Case $B1 ;~ $sVar = InputBox("Spammer", "Write the text what u want to spam. Avoid for the character limits") ;~ Global $Paused ;~ HotKeySet("{F10}", "ShowMe") ;~ While 1 ;~ Sleep(100) ;~ WEnd ;~ Func ShowMe() ;~ Send("{ENTER}") ;~ Send($sVar) ;~ Send("{ENTER}") ;~ EndFunc ;~ Case $B2 ;~ Case $B3 ;~ Case $B4 ;~ EndSwitch Sleep (100) WEnd Func _B1 () MsgBox (0,'Notice','This is an example of ON EVENT, as apposed to GUIGETMSG') EndFunc Func _GUI_EVENT_CLOSE () Exit EndFunc [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] 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