Jump to content

Help Needed


Recommended Posts

Im not sure how to get the stop button to work i have tryed every thing but am incopetent can any one help me please?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>


If FileExists("Renamer.ini") Then
Else
    IniWrite("Renamer.ini", "Presets", "name1", "Element Client")
    IniWrite("Renamer.ini", "Presets", "name2", "Damage Dealer")
    IniWrite("Renamer.ini", "Presets", "name3", "Healer")
    IniWrite("Renamer.ini", "Presets", "name4", "Item Collector")
    IniWrite("Renamer.ini", "Presets", "name5", "Store")
    IniWrite("Renamer.ini", "Presets", "newname1", "Element Client")
    IniWrite("Renamer.ini", "Presets", "newname2", "Damage Dealer")
    IniWrite("Renamer.ini", "Presets", "newname3", "Healer")
    IniWrite("Renamer.ini", "Presets", "newname4", "Item Collector")
    IniWrite("Renamer.ini", "Presets", "newname5", "Store")
;MsgBox(4096,"Renamer.ini", "Does NOT exists")

EndIf

Local $msg
Local $Text, $Times, $c, $txt
Local $namer, $win, $n

$dlgTabbed = GUICreate("Cernunnos", 410, 308, 248, 133)
$PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
$TabTalker = GUICtrlCreateTabItem("Talker")
$Group3 = GUICtrlCreateGroup("Text:", 40, 48, 329, 97)
$Text = GUICtrlCreateEdit("", 48, 64, 313, 73)
$Group4 = GUICtrlCreateGroup("Repeat Time:", 40, 152, 153, 49)
$Times = GUICtrlCreateInput("", 48, 168, 129, 22)
$Group5 = GUICtrlCreateGroup("Client Name:", 216, 152, 153, 49)
$ininewwintitle1 = IniRead("Renamer.ini","Presets","newname1","Damage Dealer")
$namer = GUICtrlCreateInput("", 224, 168, 129, 22)
$Button3 = GUICtrlCreateButton("Start", 105, 216, 89, 25, 0)
$Button4 = GUICtrlCreateButton("Stop",215, 216, 89, 25, 0)

$TabRenamer = GUICtrlCreateTabItem("Renamer")
$Renamer = GUICtrlCreateButton("Rename", 280, 152, 81, 25, 0)
$Group1 = GUICtrlCreateGroup("Current Name", 40, 56, 201, 89)
Global $OldPr1=GuiCtrlCreateButton("1",78, 84, 17, 17, 0)
Global $OldPr2=GuiCtrlCreateButton("2", 102, 84, 17, 17, 0)
Global $OldPr3=GuiCtrlCreateButton("3", 126, 84, 17, 17, 0)
Global $OldPr4=GuiCtrlCreateButton("4", 150, 84, 17, 17, 0)
Global $OldPr5=GuiCtrlCreateButton("5", 174, 84, 17, 17, 0)

Global $NewPr1=GuiCtrlCreateButton("1", 78, 191, 17, 17, 0)
Global $NewPr2=GuiCtrlCreateButton("2", 102, 191, 17, 17, 0)
Global $NewPr3=GuiCtrlCreateButton("3", 126, 191, 17, 17, 0)
Global $NewPr4=GuiCtrlCreateButton("4", 150, 191, 17, 17, 0)
Global $NewPr5=GuiCtrlCreateButton("5", 174, 191, 17, 17, 0)
$Group2 = GUICtrlCreateGroup("New Name", 40, 168, 201, 81)
$iniwintitle1 = IniRead("Renamer.ini","Presets","name1","Element Client")
$ininewwintitle1 = IniRead("Renamer.ini","Presets","newname1","Damage Dealer")
$wintitle = GUICtrlCreateinput($iniwintitle1, 46, 108, 185, 22)
$new_wintitle = GUICtrlCreateinput($ininewwintitle1, 46, 216, 185, 22)
$msg = 0
GuiSetState()

$TabHelp = GUICtrlCreateTabItem("Help")
$LblHelp = GUICtrlCreateLabel("For help on any tab please view each section. If you have any issues or", 32, 56, 353, 18)
$LblHTalker = GUICtrlCreateLabel("Talker Help:", 32, 104, 60, 18)
$LblHRenamer = GUICtrlCreateLabel("Renamer Help:", 32, 184, 74, 18)
$Label2 = GUICtrlCreateLabel("you want to comment or leave a tip please PM me at VirtualSkills.net.", 32, 72, 333, 18)
$Label4 = GUICtrlCreateLabel("Help:", 32, 40, 28, 18)
$Label5 = GUICtrlCreateLabel("To work the Renamer just put your current PW client name (Element Client)", 32, 200, 362, 18)
$Label3 = GUICtrlCreateLabel("in the current name box. Then put the new name you want to change it too", 32, 216, 364, 18)
$Label6 = GUICtrlCreateLabel("into the new name box. After that just hit Rename and it should be renamed.", 32, 232, 369, 18)
$Label12 = GUICtrlCreateLabel("To work the auto talker just type in the text you want said and the number", 32, 120, 359, 18)
$Label13 = GUICtrlCreateLabel("of times you want it to repeat. Then type in the name of your client and hit", 32, 136, 358, 18)
$Label14 = GUICtrlCreateLabel("hit start.", 32, 152, 43, 18)


$TabAbout = GUICtrlCreateTabItem("About")
$LblProductname = GUICtrlCreateLabel("Product Name: Cernunnos", 37, 55, $WS_GROUP)
$LblVersion = GUICtrlCreateLabel("Version: 1.0", 37, 79, 60, 17, $WS_GROUP)
$LblCopyright = GUICtrlCreateLabel("Created By: Judge", 37, 103, 91, 17, $WS_GROUP)
$LblComments = GUICtrlCreateLabel("This program was made to talk autmatically for you when you are ", 37, 191, 311, 17, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Credits: Master", 37, 142, 74, 17)
$Label8 = GUICtrlCreateLabel("away from your computer. It can also rename your clients. I am not", 37, 208, 315, 17)
$Label9 = GUICtrlCreateLabel("responsible for any characters been banned. Happy Gaming.", 37, 224, 290, 17)
$Label10 = GUICtrlCreateLabel("-Cheers-", 37, 240, 43, 17)
$Label11 = GUICtrlCreateLabel("Comments:", 37, 176, 56, 17)
GUICtrlCreateTabItem("")
$Exit = GUICtrlCreateButton("Exit", 318, 272, 75, 25, 0)
$Label7 = GUICtrlCreateLabel("Cernunnos for PW MY-EN (V1.0)", 16, 280)
GUISetState(@SW_SHOW)


While $msg <> $GUI_EVENT_CLOSE
      $msg = GuiGetMsg()
      Select 
        Case $Msg = $Button3
            $txt=GUICtrlRead($Text)
            $c=GUICtrlRead($Times)
            $win=GuiCtrlRead($namer)
                Do
                    $c = $c - 1
                    Sleep(5000)
                    ControlSend( $win, "", "Edit1", "{ENTER}")
                    ControlSend( $win, "", "Edit1", $txt)
                    ControlSend( $win, "", "Edit1", "{ENTER}")
                    Sleep(10000)                
                Until $c = 0            
        Case $msg = $Renamer
             $old=GUICtrlRead($wintitle)
             $new=GUICtrlRead($new_wintitle)
             wingettitle($old)
             winsettitle($old,"",$new) 
         Case $msg = $OldPr1
             $iniwintitle1 = IniRead("Renamer.ini","Presets","name1","Element Client")
             GuictrlSetdata($wintitle,$iniwintitle1)
         Case $msg = $OldPr2
             $iniwintitle2 = IniRead("Renamer.ini","Presets","name2","Damage Dealer")
             GuictrlSetdata($wintitle,$iniwintitle2)
         Case $msg = $OldPr3
             $iniwintitle3 = IniRead("Renamer.ini","Presets","name3","Healer")
             GuictrlSetdata($wintitle,$iniwintitle3)
         Case $msg = $OldPr4
             $iniwintitle4 = IniRead("Renamer.ini","Presets","name4","Item Collector")
             GuictrlSetdata($wintitle,$iniwintitle4)
         Case $msg = $OldPr5
             $iniwintitle5 = IniRead("Renamer.ini","Presets","name5","Store")
             GuictrlSetdata($wintitle,$iniwintitle5)      
         Case $msg = $NewPr1
             $ininewwintitle1 = IniRead("Renamer.ini","Presets","newname1","Element Client")
             GuictrlSetdata($new_wintitle,$ininewwintitle1)         
         Case $msg = $NewPr2
             $ininewwintitle2 = IniRead("Renamer.ini","Presets","newname2","Damage Dealer")
             GuictrlSetdata($new_wintitle,$ininewwintitle2)   
         Case $msg = $NewPr3
             $ininewwintitle3 = IniRead("Renamer.ini","Presets","newname3","Healer")
             GuictrlSetdata($new_wintitle,$ininewwintitle3)   
         Case $msg = $NewPr4
             $ininewwintitle4 = IniRead("Renamer.ini","Presets","newname4","Item Collector")
             GuictrlSetdata($new_wintitle,$ininewwintitle4)   
         Case $msg = $NewPr5
             $ininewwintitle5 = IniRead("Renamer.ini","Presets","newname5","Store")
             GuictrlSetdata($new_wintitle,$ininewwintitle5)   
         Case $msg = $Exit
             ExitLoop
      EndSelect
  WEnd
Link to comment
Share on other sites

Sorry would you explane a little more im still some what new to this

Hi

You've made the variable $Button4. Now you should call it.

Case $Msg = $Button4

Do something

Arnaud

Electron microscopes rule!!!
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...