Jump to content

why is this script not working?


8218
 Share

Recommended Posts

Everytime i run this script it come with th error

Line 5 (File "C:\AutoIT\WoW-Realmchancer.au3

GUISetBkColor(000000)

^ERROR

Error: Unknown function name

Code:

;the interface

GUICreate("Realm Changer By 1337", 210, 80, (@DesktopWidth - 449) / 2, (@DesktopHeight - 338) / 2)

GUISetBkColor(000000)

;buttons
Global $txt
$txtin = GUICtrlCreateEdit("The New Realm Name", 5, 30, 200, 20)
$finish = GUICtrlCreateButton("Change Realm", 50, 50, 100, 20)
$wtf = FileOpenDialog("Find Your realmlist.wtf file in your wow Folder", @DesktopDir, "WTF Files (*wtf)", 1 + 4 )
If Not @error Then
Else
Exit
EndIf
$line = FileReadLine($wtf)
$txtin2 = GUICtrlCreateEdit($line, 5, 5, 200, 20)


;the big thing
GUISetState()
While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = -3 
         ExitLoop
      Case $msg = $finish
         $txt = GUIRead($txtin)
         FileDelete($wtf)
         FileWriteLine($wtf, "set realmlist " & $txt)
         MsgBox(0, "Success", "your realm is now changed")
         $line = FileReadLine($wtf)
         $txtin2 = GUICtrlCreateEdit($realmlist, 5, 5, 200, 20)
   EndSelect
Wend
Link to comment
Share on other sites

Everytime i run this script it come with th error

Line 5 (File "C:\AutoIT\WoW-Realmchancer.au3

GUISetBkColor(000000)

^ERROR

Error: Unknown function name

Code:

;the interface

GUICreate("Realm Changer By 1337", 210, 80, (@DesktopWidth - 449) / 2, (@DesktopHeight - 338) / 2)

GUISetBkColor(000000)

;buttons
Global $txt
$txtin = GUICtrlCreateEdit("The New Realm Name", 5, 30, 200, 20)
$finish = GUICtrlCreateButton("Change Realm", 50, 50, 100, 20)
$wtf = FileOpenDialog("Find Your realmlist.wtf file in your wow Folder", @DesktopDir, "WTF Files (*wtf)", 1 + 4 )
If Not @error Then
Else
Exit
EndIf
$line = FileReadLine($wtf)
$txtin2 = GUICtrlCreateEdit($line, 5, 5, 200, 20)
;the big thing
GUISetState()
While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = -3 
         ExitLoop
      Case $msg = $finish
         $txt = GUIRead($txtin)
         FileDelete($wtf)
         FileWriteLine($wtf, "set realmlist " & $txt)
         MsgBox(0, "Success", "your realm is now changed")
         $line = FileReadLine($wtf)
         $txtin2 = GUICtrlCreateEdit($realmlist, 5, 5, 200, 20)
   EndSelect
Wend

<{POST_SNAPBACK}>

because, GUISetBkColor(000000) should be GUISetBkColor (0x000000)
FootbaG
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...