neverasunset Posted September 6, 2009 Posted September 6, 2009 ok i have a gui that runs ok until i press on a button which calls this function: Func Rename() If GUICtrlRead($inputOldName) = "Default Name" Then WinSetTitle("some window","",GUICtrlRead($inputNewName)) Else WinSetTitle(GUICtrlRead($inputOldName), "", GUICtrlRead($inputNewName)) EndIf EndFunc after that it hangs itself, also uses 100% cpu. what did i do wrong? thanks in advance!
Hawkwing Posted September 6, 2009 Posted September 6, 2009 Could you please post the whole script? I don't see anything wrong with Rename(), but I can't test it without the rest of the script. The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.
neverasunset Posted September 6, 2009 Author Posted September 6, 2009 here it is: expandcollapse popup#include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) ;--------------- ;Define Globals ;--------------- Global $fish1 = "Fisher 1" Global $fish2 = "Fisher 2" Global $fish3 = "Fisher 3" Global $fish4 = "Fisher 4" ;--------------------- ;Draw the main window ;--------------------- $guiWidth = 750 $guiHeight = 350 $guiWidthMargin = 20 $guiHeightMargin = 30 $font = "Verdana" GUICreate("Reza's ZXPlayeR™", $guiWidth, $guiHeight) GUISetFont(8, 600, "", $font) $tabs = GUICtrlCreateTab(0, 0, $guiWidth, $guiHeight - 150) ;--------------- ;Baiter Contents ;--------------- $guiFisherGroupWidth = ($guiWidth - ($guiWidthMargin*5))/4 $guiFisherGroupHeight = $guiHeight - (2*$guiHeightMargin) - 100 $tabBaiter = GUICtrlCreateTabItem("BaiteR") GUISetFont(8, 300, "", $font) $grpFish1 = GUICtrlCreateGroup($fish1, $guiWidthMargin, $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher1 = GUICtrlCreateLabel("fishgold01: Pending", $guiWidthMargin + 15, 50, $guiFisherGroupWidth) $lblFisher5 = GUICtrlCreateLabel("fishgold05: Pending", $guiWidthMargin + 15, 65, $guiFisherGroupWidth) $lblFisher9 = GUICtrlCreateLabel("fishgold09: Pending", $guiWidthMargin + 15, 80, $guiFisherGroupWidth) $grpFish2 = GUICtrlCreateGroup($fish2, ($guiWidthMargin*2) + $guiFisherGroupWidth, $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher2 = GUICtrlCreateLabel("fishgold02: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 50, $guiFisherGroupWidth) $lblFisher6 = GUICtrlCreateLabel("fishgold06: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 65, $guiFisherGroupWidth) $lblFisher10 = GUICtrlCreateLabel("fishgold10: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 80, $guiFisherGroupWidth) $grpFish3 = GUICtrlCreateGroup($fish3, ($guiWidthMargin*3) + ($guiFisherGroupWidth*2), $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher3 = GUICtrlCreateLabel("fishgold03: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 50, $guiFisherGroupWidth) $lblFisher7 = GUICtrlCreateLabel("fishgold07: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 65, $guiFisherGroupWidth) $lblFisher11 = GUICtrlCreateLabel("fishgold11: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 80, $guiFisherGroupWidth) $grpFish4 = GUICtrlCreateGroup($fish4, ($guiWidthMargin*4) + ($guiFisherGroupWidth*3), $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher4 = GUICtrlCreateLabel("fishgold04: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 50, $guiFisherGroupWidth) $lblFisher8 = GUICtrlCreateLabel("fishgold08: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 65, $guiFisherGroupWidth) $lblFisher12 = GUICtrlCreateLabel("fishgold12: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 80, $guiFisherGroupWidth) $tabFisher = GUICtrlCreateTabItem("FisheR") $tabGrinder = GUICtrlCreateTabItem("GrindeR") $tabKSer = GUICtrlCreateTabItem("KSeR") $tabSeller = GUICtrlCreateTabItem("SelleR") $tabConster = GUICtrlCreateTabItem("ConsteR") $tabScheduler = GUICtrlCreateTabItem("ScheduleR") GUICtrlCreateTabItem("") ;--------------- ;Common Controls ;--------------- $grpRenamer = GUICtrlCreateGroup("RenameR", $guiWidthMargin, 210, 200, 90) $lblOldName = GUICtrlCreateLabel("Old Name", $guiWidthMargin + 15, 230, 60, 15) $inputOldName = GUICtrlCreateInput("Default Name", $guiWidthMargin + 90, 230, 95, 15) $lblNewName = GUICtrlCreateLabel("New Name", $guiWidthMargin + 15, 250, 60, 15) $inputNewName = GUICtrlCreateInput("", $guiWidthMargin + 90, 250, 95, 15) $butRenamer = GUICtrlCreateButton("Rename", $guiWidthMargin + 15, 270, 170, 20) GUICtrlSetOnEvent($butRenamer, "Rename") Func Rename() If GUICtrlRead($inputOldName) = "Default Name" Then WinSetTitle("test","",GUICtrlRead($inputNewName)) GUICtrlSetData($inputNewName, WinGetTitle("[active]")) Else WinSetTitle(GUICtrlRead($inputOldName), "", GUICtrlRead($inputNewName)) EndIf EndFunc $grpSpammer = GUICtrlCreateGroup("SpammeR", $guiWidthMargin + 220, 210, 490, 90) $lblSpamWindow = GUICtrlCreateLabel("Window Name", $guiWidthMargin + 235, 230, 90, 15) $inputSpamWindow = GUICtrlCreateInput("Default Name", $guiWidthMargin + 325, 230, 370, 15) $lblSpamText = GUICtrlCreateLabel("Message", $guiWidthMargin + 235, 250, 90, 15) $inputSpamText = GUICtrlCreateInput("", $guiWidthMargin + 325, 250, 370, 15) $butAutoChatter = GUICtrlCreateButton("Start Spamming!!!", $guiWidthMargin + 235, 270, 460, 20) While 1 GUISetState(@SW_SHOW) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd thanks for looking into it
Hawkwing Posted September 6, 2009 Posted September 6, 2009 (edited) The reason is your While loop. You don't have it waiting at all, so it just keeps repeating as fast as your system allowes. I added a sleep(100) inside the while loop, and took the guisetstate out of it as I saw no point for it being there. expandcollapse popup#include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) ;--------------- ;Define Globals ;--------------- Global $fish1 = "Fisher 1" Global $fish2 = "Fisher 2" Global $fish3 = "Fisher 3" Global $fish4 = "Fisher 4" ;--------------------- ;Draw the main window ;--------------------- $guiWidth = 750 $guiHeight = 350 $guiWidthMargin = 20 $guiHeightMargin = 30 $font = "Verdana" GUICreate("Reza's ZXPlayeR™", $guiWidth, $guiHeight) GUISetFont(8, 600, "", $font) $tabs = GUICtrlCreateTab(0, 0, $guiWidth, $guiHeight - 150) ;--------------- ;Baiter Contents ;--------------- $guiFisherGroupWidth = ($guiWidth - ($guiWidthMargin*5))/4 $guiFisherGroupHeight = $guiHeight - (2*$guiHeightMargin) - 100 $tabBaiter = GUICtrlCreateTabItem("BaiteR") GUISetFont(8, 300, "", $font) $grpFish1 = GUICtrlCreateGroup($fish1, $guiWidthMargin, $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher1 = GUICtrlCreateLabel("fishgold01: Pending", $guiWidthMargin + 15, 50, $guiFisherGroupWidth) $lblFisher5 = GUICtrlCreateLabel("fishgold05: Pending", $guiWidthMargin + 15, 65, $guiFisherGroupWidth) $lblFisher9 = GUICtrlCreateLabel("fishgold09: Pending", $guiWidthMargin + 15, 80, $guiFisherGroupWidth) $grpFish2 = GUICtrlCreateGroup($fish2, ($guiWidthMargin*2) + $guiFisherGroupWidth, $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher2 = GUICtrlCreateLabel("fishgold02: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 50, $guiFisherGroupWidth) $lblFisher6 = GUICtrlCreateLabel("fishgold06: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 65, $guiFisherGroupWidth) $lblFisher10 = GUICtrlCreateLabel("fishgold10: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 80, $guiFisherGroupWidth) $grpFish3 = GUICtrlCreateGroup($fish3, ($guiWidthMargin*3) + ($guiFisherGroupWidth*2), $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher3 = GUICtrlCreateLabel("fishgold03: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 50, $guiFisherGroupWidth) $lblFisher7 = GUICtrlCreateLabel("fishgold07: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 65, $guiFisherGroupWidth) $lblFisher11 = GUICtrlCreateLabel("fishgold11: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 80, $guiFisherGroupWidth) $grpFish4 = GUICtrlCreateGroup($fish4, ($guiWidthMargin*4) + ($guiFisherGroupWidth*3), $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher4 = GUICtrlCreateLabel("fishgold04: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 50, $guiFisherGroupWidth) $lblFisher8 = GUICtrlCreateLabel("fishgold08: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 65, $guiFisherGroupWidth) $lblFisher12 = GUICtrlCreateLabel("fishgold12: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 80, $guiFisherGroupWidth) $tabFisher = GUICtrlCreateTabItem("FisheR") $tabGrinder = GUICtrlCreateTabItem("GrindeR") $tabKSer = GUICtrlCreateTabItem("KSeR") $tabSeller = GUICtrlCreateTabItem("SelleR") $tabConster = GUICtrlCreateTabItem("ConsteR") $tabScheduler = GUICtrlCreateTabItem("ScheduleR") GUICtrlCreateTabItem("") ;--------------- ;Common Controls ;--------------- $grpRenamer = GUICtrlCreateGroup("RenameR", $guiWidthMargin, 210, 200, 90) $lblOldName = GUICtrlCreateLabel("Old Name", $guiWidthMargin + 15, 230, 60, 15) $inputOldName = GUICtrlCreateInput("Default Name", $guiWidthMargin + 90, 230, 95, 15) $lblNewName = GUICtrlCreateLabel("New Name", $guiWidthMargin + 15, 250, 60, 15) $inputNewName = GUICtrlCreateInput("", $guiWidthMargin + 90, 250, 95, 15) $butRenamer = GUICtrlCreateButton("Rename", $guiWidthMargin + 15, 270, 170, 20) GUICtrlSetOnEvent($butRenamer, "Rename") Func Rename() If GUICtrlRead($inputOldName) = "Default Name" Then WinSetTitle("test","",GUICtrlRead($inputNewName)) GUICtrlSetData($inputNewName, WinGetTitle("[active]")) Else WinSetTitle(GUICtrlRead($inputOldName), "", GUICtrlRead($inputNewName)) EndIf EndFunc $grpSpammer = GUICtrlCreateGroup("SpammeR", $guiWidthMargin + 220, 210, 490, 90) $lblSpamWindow = GUICtrlCreateLabel("Window Name", $guiWidthMargin + 235, 230, 90, 15) $inputSpamWindow = GUICtrlCreateInput("Default Name", $guiWidthMargin + 325, 230, 370, 15) $lblSpamText = GUICtrlCreateLabel("Message", $guiWidthMargin + 235, 250, 90, 15) $inputSpamText = GUICtrlCreateInput("", $guiWidthMargin + 325, 250, 370, 15) $butAutoChatter = GUICtrlCreateButton("Start Spamming!!!", $guiWidthMargin + 235, 270, 460, 20) GUISetState(@SW_SHOW) While 1 Sleep(100) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Edited September 6, 2009 by Hawkwing The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.
neverasunset Posted September 6, 2009 Author Posted September 6, 2009 The reason is your While loop. You don't have it waiting at all, so it just keeps repeating as fast as your system allowes. I added a sleep(100) inside the while loop, and took the guisetstate out of it as I saw no point for it being there. expandcollapse popup#include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) ;--------------- ;Define Globals ;--------------- Global $fish1 = "Fisher 1" Global $fish2 = "Fisher 2" Global $fish3 = "Fisher 3" Global $fish4 = "Fisher 4" ;--------------------- ;Draw the main window ;--------------------- $guiWidth = 750 $guiHeight = 350 $guiWidthMargin = 20 $guiHeightMargin = 30 $font = "Verdana" GUICreate("Reza's ZXPlayeR™", $guiWidth, $guiHeight) GUISetFont(8, 600, "", $font) $tabs = GUICtrlCreateTab(0, 0, $guiWidth, $guiHeight - 150) ;--------------- ;Baiter Contents ;--------------- $guiFisherGroupWidth = ($guiWidth - ($guiWidthMargin*5))/4 $guiFisherGroupHeight = $guiHeight - (2*$guiHeightMargin) - 100 $tabBaiter = GUICtrlCreateTabItem("BaiteR") GUISetFont(8, 300, "", $font) $grpFish1 = GUICtrlCreateGroup($fish1, $guiWidthMargin, $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher1 = GUICtrlCreateLabel("fishgold01: Pending", $guiWidthMargin + 15, 50, $guiFisherGroupWidth) $lblFisher5 = GUICtrlCreateLabel("fishgold05: Pending", $guiWidthMargin + 15, 65, $guiFisherGroupWidth) $lblFisher9 = GUICtrlCreateLabel("fishgold09: Pending", $guiWidthMargin + 15, 80, $guiFisherGroupWidth) $grpFish2 = GUICtrlCreateGroup($fish2, ($guiWidthMargin*2) + $guiFisherGroupWidth, $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher2 = GUICtrlCreateLabel("fishgold02: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 50, $guiFisherGroupWidth) $lblFisher6 = GUICtrlCreateLabel("fishgold06: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 65, $guiFisherGroupWidth) $lblFisher10 = GUICtrlCreateLabel("fishgold10: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 80, $guiFisherGroupWidth) $grpFish3 = GUICtrlCreateGroup($fish3, ($guiWidthMargin*3) + ($guiFisherGroupWidth*2), $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher3 = GUICtrlCreateLabel("fishgold03: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 50, $guiFisherGroupWidth) $lblFisher7 = GUICtrlCreateLabel("fishgold07: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 65, $guiFisherGroupWidth) $lblFisher11 = GUICtrlCreateLabel("fishgold11: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 80, $guiFisherGroupWidth) $grpFish4 = GUICtrlCreateGroup($fish4, ($guiWidthMargin*4) + ($guiFisherGroupWidth*3), $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher4 = GUICtrlCreateLabel("fishgold04: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 50, $guiFisherGroupWidth) $lblFisher8 = GUICtrlCreateLabel("fishgold08: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 65, $guiFisherGroupWidth) $lblFisher12 = GUICtrlCreateLabel("fishgold12: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 80, $guiFisherGroupWidth) $tabFisher = GUICtrlCreateTabItem("FisheR") $tabGrinder = GUICtrlCreateTabItem("GrindeR") $tabKSer = GUICtrlCreateTabItem("KSeR") $tabSeller = GUICtrlCreateTabItem("SelleR") $tabConster = GUICtrlCreateTabItem("ConsteR") $tabScheduler = GUICtrlCreateTabItem("ScheduleR") GUICtrlCreateTabItem("") ;--------------- ;Common Controls ;--------------- $grpRenamer = GUICtrlCreateGroup("RenameR", $guiWidthMargin, 210, 200, 90) $lblOldName = GUICtrlCreateLabel("Old Name", $guiWidthMargin + 15, 230, 60, 15) $inputOldName = GUICtrlCreateInput("Default Name", $guiWidthMargin + 90, 230, 95, 15) $lblNewName = GUICtrlCreateLabel("New Name", $guiWidthMargin + 15, 250, 60, 15) $inputNewName = GUICtrlCreateInput("", $guiWidthMargin + 90, 250, 95, 15) $butRenamer = GUICtrlCreateButton("Rename", $guiWidthMargin + 15, 270, 170, 20) GUICtrlSetOnEvent($butRenamer, "Rename") Func Rename() If GUICtrlRead($inputOldName) = "Default Name" Then WinSetTitle("test","",GUICtrlRead($inputNewName)) GUICtrlSetData($inputNewName, WinGetTitle("[active]")) Else WinSetTitle(GUICtrlRead($inputOldName), "", GUICtrlRead($inputNewName)) EndIf EndFunc $grpSpammer = GUICtrlCreateGroup("SpammeR", $guiWidthMargin + 220, 210, 490, 90) $lblSpamWindow = GUICtrlCreateLabel("Window Name", $guiWidthMargin + 235, 230, 90, 15) $inputSpamWindow = GUICtrlCreateInput("Default Name", $guiWidthMargin + 325, 230, 370, 15) $lblSpamText = GUICtrlCreateLabel("Message", $guiWidthMargin + 235, 250, 90, 15) $inputSpamText = GUICtrlCreateInput("", $guiWidthMargin + 325, 250, 370, 15) $butAutoChatter = GUICtrlCreateButton("Start Spamming!!!", $guiWidthMargin + 235, 270, 460, 20) GUISetState(@SW_SHOW) While 1 Sleep(100) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd its still hanging itself
Hawkwing Posted September 6, 2009 Posted September 6, 2009 (edited) What do you mean when you say that "it hangs itself"? The only thing that didn't work for me was the exit button, and this seems to fix that. expandcollapse popup#include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) ;--------------- ;Define Globals ;--------------- Global $fish1 = "Fisher 1" Global $fish2 = "Fisher 2" Global $fish3 = "Fisher 3" Global $fish4 = "Fisher 4" ;--------------------- ;Draw the main window ;--------------------- $guiWidth = 750 $guiHeight = 350 $guiWidthMargin = 20 $guiHeightMargin = 30 $font = "Verdana" GUICreate("Reza's ZXPlayeR™", $guiWidth, $guiHeight) GUISetOnEvent($GUI_EVENT_CLOSE, "close") GUISetFont(8, 600, "", $font) $tabs = GUICtrlCreateTab(0, 0, $guiWidth, $guiHeight - 150) ;--------------- ;Baiter Contents ;--------------- $guiFisherGroupWidth = ($guiWidth - ($guiWidthMargin*5))/4 $guiFisherGroupHeight = $guiHeight - (2*$guiHeightMargin) - 100 $tabBaiter = GUICtrlCreateTabItem("BaiteR") GUISetFont(8, 300, "", $font) $grpFish1 = GUICtrlCreateGroup($fish1, $guiWidthMargin, $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher1 = GUICtrlCreateLabel("fishgold01: Pending", $guiWidthMargin + 15, 50, $guiFisherGroupWidth) $lblFisher5 = GUICtrlCreateLabel("fishgold05: Pending", $guiWidthMargin + 15, 65, $guiFisherGroupWidth) $lblFisher9 = GUICtrlCreateLabel("fishgold09: Pending", $guiWidthMargin + 15, 80, $guiFisherGroupWidth) $grpFish2 = GUICtrlCreateGroup($fish2, ($guiWidthMargin*2) + $guiFisherGroupWidth, $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher2 = GUICtrlCreateLabel("fishgold02: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 50, $guiFisherGroupWidth) $lblFisher6 = GUICtrlCreateLabel("fishgold06: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 65, $guiFisherGroupWidth) $lblFisher10 = GUICtrlCreateLabel("fishgold10: Pending", ($guiWidthMargin*2) + $guiFisherGroupWidth + 15, 80, $guiFisherGroupWidth) $grpFish3 = GUICtrlCreateGroup($fish3, ($guiWidthMargin*3) + ($guiFisherGroupWidth*2), $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher3 = GUICtrlCreateLabel("fishgold03: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 50, $guiFisherGroupWidth) $lblFisher7 = GUICtrlCreateLabel("fishgold07: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 65, $guiFisherGroupWidth) $lblFisher11 = GUICtrlCreateLabel("fishgold11: Pending", ($guiWidthMargin*3) + ($guiFisherGroupWidth*2) + 15, 80, $guiFisherGroupWidth) $grpFish4 = GUICtrlCreateGroup($fish4, ($guiWidthMargin*4) + ($guiFisherGroupWidth*3), $guiHeightMargin, $guiFisherGroupWidth, 80) $lblFisher4 = GUICtrlCreateLabel("fishgold04: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 50, $guiFisherGroupWidth) $lblFisher8 = GUICtrlCreateLabel("fishgold08: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 65, $guiFisherGroupWidth) $lblFisher12 = GUICtrlCreateLabel("fishgold12: Pending", ($guiWidthMargin*4) + ($guiFisherGroupWidth*3) + 15, 80, $guiFisherGroupWidth) $tabFisher = GUICtrlCreateTabItem("FisheR") $tabGrinder = GUICtrlCreateTabItem("GrindeR") $tabKSer = GUICtrlCreateTabItem("KSeR") $tabSeller = GUICtrlCreateTabItem("SelleR") $tabConster = GUICtrlCreateTabItem("ConsteR") $tabScheduler = GUICtrlCreateTabItem("ScheduleR") GUICtrlCreateTabItem("") ;--------------- ;Common Controls ;--------------- $grpRenamer = GUICtrlCreateGroup("RenameR", $guiWidthMargin, 210, 200, 90) $lblOldName = GUICtrlCreateLabel("Old Name", $guiWidthMargin + 15, 230, 60, 15) $inputOldName = GUICtrlCreateInput("Default Name", $guiWidthMargin + 90, 230, 95, 15) $lblNewName = GUICtrlCreateLabel("New Name", $guiWidthMargin + 15, 250, 60, 15) $inputNewName = GUICtrlCreateInput("", $guiWidthMargin + 90, 250, 95, 15) $butRenamer = GUICtrlCreateButton("Rename", $guiWidthMargin + 15, 270, 170, 20) GUICtrlSetOnEvent($butRenamer, "Rename") $grpSpammer = GUICtrlCreateGroup("SpammeR", $guiWidthMargin + 220, 210, 490, 90) $lblSpamWindow = GUICtrlCreateLabel("Window Name", $guiWidthMargin + 235, 230, 90, 15) $inputSpamWindow = GUICtrlCreateInput("Default Name", $guiWidthMargin + 325, 230, 370, 15) $lblSpamText = GUICtrlCreateLabel("Message", $guiWidthMargin + 235, 250, 90, 15) $inputSpamText = GUICtrlCreateInput("", $guiWidthMargin + 325, 250, 370, 15) $butAutoChatter = GUICtrlCreateButton("Start Spamming!!!", $guiWidthMargin + 235, 270, 460, 20) GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func close() Exit EndFunc Func Rename() If GUICtrlRead($inputOldName) = "Default Name" Then WinSetTitle("test","",GUICtrlRead($inputNewName)) GUICtrlSetData($inputNewName, WinGetTitle("[active]")) Else WinSetTitle(GUICtrlRead($inputOldName), "", GUICtrlRead($inputNewName)) EndIf EndFunc Edit: in case you were wondering, the reason you can't use guigetmsg() is because you have guioneventmode set to 1. Edited September 6, 2009 by Hawkwing The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.
neverasunset Posted September 6, 2009 Author Posted September 6, 2009 sweet! just got time to test it and it works now! you made my day m8!
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