I made a script i posted it at bottom and when I use it with WoW the game has pauses like every 3 seconds its really anoying I tried making just While 1 Wend just thoes 2 lines in a script and it did it does anyone know any options that will help this. Oh and will only happen when WoW is in window mode. I also use JotToKey but that doesnt cuase the lag. If anyone is woundering this script is to use WoW with a GamePad it lists the spells and lets u cast them with the arrow keys or D Pad
Oh and Im also getting this error when running the script: But I can jsut click continue anyways and it will work
[autoit]; WoWPad
; Play WoW with gamepad
; Created By: Frostfel
#include <GUIConstants.au3>
AutoItSetOption ( "MouseCoordMode", 0 )
; ###############
; Null Varabiles
; ###############
$GUI1 = 0
$SpellNum = 3
$SpellName = 0
$SpellUp = 0
$SpellDown = 0
$CatSel = 1
$mouseon = 0
$mouseoff = 0
$Spell1 = 0
$Spell2 = 0
$Spell3 = 0
$Spell4 = 0
$Spell5 = 0
$Spell6 = 0
$Spell7 = 0
$Spell8 = 0
$Spell9 = 0
$Spell10 = 0
$Spell11 = 0
$Spell12 = 0
$Category = 1
$SpellName1 = IniRead ( "WoWPad.ini", "category"&$Category, "spell1", "None" )
$SpellName2 = IniRead ( "WoWPad.ini", "category"&$Category, "spell2", "None" )
$SpellName3 = IniRead ( "WoWPad.ini", "category"&$Category, "spell3", "None" )
$SpellName4 = IniRead ( "WoWPad.ini", "category"&$Category, "spell4", "None" )
$SpellName5 = IniRead ( "WoWPad.ini", "category"&$Category, "spell5", "None" )
$SpellName6 = IniRead ( "WoWPad.ini", "category"&$Category, "spell6", "None" )
$SpellName7 = IniRead ( "WoWPad.ini", "category"&$Category, "spell7", "None" )
$SpellName8 = IniRead ( "WoWPad.ini", "category"&$Category, "spell8", "None" )
$SpellName9 = IniRead ( "WoWPad.ini", "category"&$Category, "spell9", "None" )
$SpellName10 = IniRead ( "WoWPad.ini", "category"&$Category, "spell10", "None" )
$SpellName11 = IniRead ( "WoWPad.ini", "category"&$Category, "spell11", "None" )
$SpellName12 = IniRead ( "WoWPad.ini", "category"&$Category, "spell12", "None" )
$setfont = IniRead ( "WoWPad.ini", "main", "font", "Arial" )
$spellcolor = IniRead ( "WoWPad.ini", "main", "selcolor", "0x00FF00" )
$spellcoloroff = IniRead ( "WoWPad.ini", "main", "unselcolor", "0xFFFFFF" )
$Category4 = IniRead ( "WoWPad.ini", "main", "category1", "None" )
$Category5 = IniRead ( "WoWPad.ini", "main", "category2", "None" )
$Category6 = IniRead ( "WoWPad.ini", "main", "category3", "None" )
$cat1 = IniRead ( "WoWPad.ini", "category1", "spell", "None" )
$cat2 = IniRead ( "WoWPad.ini", "category2", "spell", "None" )
$cat3 = IniRead ( "WoWPad.ini", "category3", "spell", "None" )
$bindkeyup = IniRead ( "WoWPad.ini", "keybind", "menuup", "None" )
$bindkeydown = IniRead ( "WoWPad.ini", "keybind", "menudown", "None" )
$bindkeyleft = IniRead ( "WoWPad.ini", "keybind", "menuback", "None" )
$bindkeyright = IniRead ( "WoWPad.ini", "keybind", "menuforward", "None" )
$bindkeyloot = IniRead ( "WoWPad.ini", "keybind", "loot", "None" )
$bindkeyviewsel = IniRead ( "WoWPad.ini", "keybind", "viewhold", "None" )
$bindkeycatsel = IniRead ( "WoWPad.ini", "keybind", "catsel", "None" )
$cast1 = IniRead ( "WoWPad.ini", "keybind", "cast1", "None" )
$cast2 = IniRead ( "WoWPad.ini", "keybind", "cast2", "None" )
$cast3 = IniRead ( "WoWPad.ini", "keybind", "cast3", "None" )
$cast4 = IniRead ( "WoWPad.ini", "keybind", "cast4", "None" )
$cast5 = IniRead ( "WoWPad.ini", "keybind", "cast5", "None" )
$cast6 = IniRead ( "WoWPad.ini", "keybind", "cast6", "None" )
$cast7 = IniRead ( "WoWPad.ini", "keybind", "cast7", "None" )
$cast8 = IniRead ( "WoWPad.ini", "keybind", "cast8", "None" )
$cast9 = IniRead ( "WoWPad.ini", "keybind", "cast9", "None" )
$cast9 = IniRead ( "WoWPad.ini", "keybind", "cast9", "None" )
$cast10 = IniRead ( "WoWPad.ini", "keybind", "cast10", "None" )
$cast11 = IniRead ( "WoWPad.ini", "keybind", "cast11", "None" )
$cast12 = IniRead ( "WoWPad.ini", "keybind", "cast12", "None" )
; ###############
; Null Varabiles End
; ###############
Call ( "spellcast" )
; ###############
; View Hold
; ###############
Func viewholdon()
MouseDown ( "right" )
EndFunc
Func viewholdoff()
MouseUp ( "right" )
EndFunc
Func viewsel()
Select
Case $mouseon = 1
$mouseon = 0
$mouseoff = 1
Call ( "viewholdoff" )
Case $mouseoff = 1
$mouseon = 1
$mouseoff = 0
Call ( "viewholdon" )
Case Else
$mouseon = 1
$mouseoff = 0
Call ( "viewholdon" )
EndSelect
EndFunc
; ###############
; View Hold End
; ###############
; ###############
; GUI Selet
; ###############
Func catsel2()
Select
Case $CatSel = 1
$Category = 1
$CatSel = 2
Send ( $cat1 )
$SpellName1 = IniRead ( "WoWPad.ini", "category"&$Category, "spell1", "None" )
$SpellName2 = IniRead ( "WoWPad.ini", "category"&$Category, "spell2", "None" )
$SpellName3 = IniRead ( "WoWPad.ini", "category"&$Category, "spell3", "None" )
$SpellName4 = IniRead ( "WoWPad.ini", "category"&$Category, "spell4", "None" )
$SpellName5 = IniRead ( "WoWPad.ini", "category"&$Category, "spell5", "None" )
$SpellName6 = IniRead ( "WoWPad.ini", "category"&$Category, "spell6", "None" )
$SpellName7 = IniRead ( "WoWPad.ini", "category"&$Category, "spell7", "None" )
$SpellName8 = IniRead ( "WoWPad.ini", "category"&$Category, "spell8", "None" )
$SpellName9 = IniRead ( "WoWPad.ini", "category"&$Category, "spell9", "None" )
$SpellName10 = IniRead ( "WoWPad.ini", "category"&$Category, "spell10", "None" )
$SpellName11 = IniRead ( "WoWPad.ini", "category"&$Category, "spell11", "None" )
$SpellName12 = IniRead ( "WoWPad.ini", "category"&$Category, "spell12", "None" )
GUICtrlSetData ( $Spell1, $SpellName1 )
GUICtrlSetData ( $Spell2, $SpellName2 )
GUICtrlSetData ( $Spell3, $SpellName3 )
GUICtrlSetData ( $Spell4, $SpellName4 )
GUICtrlSetData ( $Spell5, $SpellName5 )
GUICtrlSetData ( $Spell6, $SpellName6 )
GUICtrlSetData ( $Spell7, $SpellName7 )
GUICtrlSetData ( $Spell8, $SpellName8 )
GUICtrlSetData ( $Spell9, $SpellName9 )
GUICtrlSetData ( $Spell10, $SpellName10 )
GUICtrlSetData ( $Spell11, $SpellName11 )
GUICtrlSetData ( $Spell12, $SpellName12 )
Case $CatSel = 2
$Category = 2
$CatSel = 3
Send ( $cat2 )
$SpellName1 = IniRead ( "WoWPad.ini", "category"&$Category, "spell1", "None" )
$SpellName2 = IniRead ( "WoWPad.ini", "category"&$Category, "spell2", "None" )
$SpellName3 = IniRead ( "WoWPad.ini", "category"&$Category, "spell3", "None" )
$SpellName4 = IniRead ( "WoWPad.ini", "category"&$Category, "spell4", "None" )
$SpellName5 = IniRead ( "WoWPad.ini", "category"&$Category, "spell5", "None" )
$SpellName6 = IniRead ( "WoWPad.ini", "category"&$Category, "spell6", "None" )
$SpellName7 = IniRead ( "WoWPad.ini", "category"&$Category, "spell7", "None" )
$SpellName8 = IniRead ( "WoWPad.ini", "category"&$Category, "spell8", "None" )
$SpellName9 = IniRead ( "WoWPad.ini", "category"&$Category, "spell9", "None" )
$SpellName10 = IniRead ( "WoWPad.ini", "category"&$Category, "spell10", "None" )
$SpellName11 = IniRead ( "WoWPad.ini", "category"&$Category, "spell11", "None" )
$SpellName12 = IniRead ( "WoWPad.ini", "category"&$Category, "spell12", "None" )
GUICtrlSetData ( $Spell1, $SpellName1 )
GUICtrlSetData ( $Spell2, $SpellName2 )
GUICtrlSetData ( $Spell3, $SpellName3 )
GUICtrlSetData ( $Spell4, $SpellName4 )
GUICtrlSetData ( $Spell5, $SpellName5 )
GUICtrlSetData ( $Spell6, $SpellName6 )
GUICtrlSetData ( $Spell7, $SpellName7 )
GUICtrlSetData ( $Spell8, $SpellName8 )
GUICtrlSetData ( $Spell9, $SpellName9 )
GUICtrlSetData ( $Spell10, $SpellName10 )
GUICtrlSetData ( $Spell11, $SpellName11 )
GUICtrlSetData ( $Spell12, $SpellName12 )
Case $CatSel = 3
$Category = 3
$CatSel = 1
Send ( $cat3 )
$SpellName1 = IniRead ( "WoWPad.ini", "category"&$Category, "spell1", "None" )
$SpellName2 = IniRead ( "WoWPad.ini", "category"&$Category, "spell2", "None" )
$SpellName3 = IniRead ( "WoWPad.ini", "category"&$Category, "spell3", "None" )
$SpellName4 = IniRead ( "WoWPad.ini", "category"&$Category, "spell4", "None" )
$SpellName5 = IniRead ( "WoWPad.ini", "category"&$Category, "spell5", "None" )
$SpellName6 = IniRead ( "WoWPad.ini", "category"&$Category, "spell6", "None" )
$SpellName7 = IniRead ( "WoWPad.ini", "category"&$Category, "spell7", "None" )
$SpellName8 = IniRead ( "WoWPad.ini", "category"&$Category, "spell8", "None" )
$SpellName9 = IniRead ( "WoWPad.ini", "category"&$Category, "spell9", "None" )
$SpellName10 = IniRead ( "WoWPad.ini", "category"&$Category, "spell10", "None" )
$SpellName11 = IniRead ( "WoWPad.ini", "category"&$Category, "spell11", "None" )
$SpellName12 = IniRead ( "WoWPad.ini", "category"&$Category, "spell12", "None" )
GUICtrlSetData ( $Spell1, $SpellName1 )
GUICtrlSetData ( $Spell2, $SpellName2 )
GUICtrlSetData ( $Spell3, $SpellName3 )
GUICtrlSetData ( $Spell4, $SpellName4 )
GUICtrlSetData ( $Spell5, $SpellName5 )
GUICtrlSetData ( $Spell6, $SpellName6 )
GUICtrlSetData ( $Spell7, $SpellName7 )
GUICtrlSetData ( $Spell8, $SpellName8 )
GUICtrlSetData ( $Spell9, $SpellName9 )
GUICtrlSetData ( $Spell10, $SpellName10 )
GUICtrlSetData ( $Spell11, $SpellName11 )
GUICtrlSetData ( $Spell12, $SpellName12 )
EndSelect
EndFunc
; ###############
; GUI Selet End
; ###############
; ###############
; Loot
; ###############
Func loot()
MouseUp ( "right" )
MouseClick ( "right" )
MouseDown ( "right" )
EndFunc
; ###############
; Loot End
; ###############
; ###############
; Nav Keys
; ###############
Func keyup1()
GUICtrlSetBkColor ( $Spell1, $spellcoloroff )
GUICtrlSetBkColor ( $Spell2, $spellcoloroff )
GUICtrlSetBkColor ( $Spell3, $spellcoloroff )
GUICtrlSetBkColor ( $Spell4, $spellcoloroff )
GUICtrlSetBkColor ( $Spell5, $spellcoloroff )
GUICtrlSetBkColor ( $Spell6, $spellcoloroff )
GUICtrlSetBkColor ( $Spell7, $spellcoloroff )
GUICtrlSetBkColor ( $Spell8, $spellcoloroff )
GUICtrlSetBkColor ( $Spell9, $spellcoloroff )
GUICtrlSetBkColor ( $Spell10, $spellcoloroff )
GUICtrlSetBkColor ( $Spell11, $spellcoloroff )
GUICtrlSetBkColor ( $Spell12, $spellcoloroff )
Select
Case $SpellNum < 3
$SpellNum = 14
Case $SpellNum > 14
$SpellNum = 3
EndSelect
If $SpellDown = 1 Then
Select
Case $SpellNum = 3
$SpellNum = 13
$SpellName = GUICtrlRead ( $SpellNum )
GUICtrlSetBkColor ( $SpellNum, $spellcolor )
$SpellNum -= 1
$SpellUp = 1
$SpellDown = 0
Case $SpellNum = 4
$SpellNum = 14
$SpellName = GUICtrlRead ( $SpellNum )
GUICtrlSetBkColor ( $SpellNum, $spellcolor )
$SpellNum -= 1
$SpellUp = 1
$SpellDown = 0
Case Else
$SpellNum -= 2
$SpellName = GUICtrlRead ( $SpellNum )
GUICtrlSetBkColor ( $SpellNum, $spellcolor )
$SpellNum -= 1
$SpellUp = 1
$SpellDown = 0
EndSelect
Else
$SpellName = GUICtrlRead ( $SpellNum )
GUICtrlSetBkColor ( $SpellNum, $spellcolor )
$SpellNum -= 1
$SpellUp = 1
$SpellDown = 0
EndIf
EndFunc
Func keydown1()
GUICtrlSetBkColor ( $Spell1, $spellcoloroff )
GUICtrlSetBkColor ( $Spell2, $spellcoloroff )
GUICtrlSetBkColor ( $Spell3, $spellcoloroff )
GUICtrlSetBkColor ( $Spell4, $spellcoloroff )
GUICtrlSetBkColor ( $Spell5, $spellcoloroff )
GUICtrlSetBkColor ( $Spell6, $spellcoloroff )
GUICtrlSetBkColor ( $Spell7, $spellcoloroff )
GUICtrlSetBkColor ( $Spell8, $spellcoloroff )
GUICtrlSetBkColor ( $Spell9, $spellcoloroff )
GUICtrlSetBkColor ( $Spell10, $spellcoloroff )
GUICtrlSetBkColor ( $Spell11, $spellcoloroff )
GUICtrlSetBkColor ( $Spell12, $spellcoloroff )
Select
Case $SpellNum < 3
$SpellNum = 14
Case $SpellNum > 14
$SpellNum = 3
EndSelect
;MsgBox ( 0, "Test", $SpellNum )
If $SpellUp = 1 Then
Select
Case $SpellNum = 14
$SpellNum = 4
$SpellName = GUICtrlRead ( $SpellNum )
GUICtrlSetBkColor ( $SpellNum, $spellcolor )
$SpellNum += 1
$SpellUp = 0
$SpellDown = 1
Case $SpellNum = 13
$SpellNum = 3
$SpellName = GUICtrlRead ( $SpellNum )
GUICtrlSetBkColor ( $SpellNum, $spellcolor )
$SpellNum += 1
$SpellUp = 0
$SpellDown = 1
Case Else
$SpellNum += 2
$SpellName = GUICtrlRead ( $SpellNum )
GUICtrlSetBkColor ( $SpellNum, $spellcolor )
$SpellNum += 1
$SpellUp = 0
$SpellDown = 1
EndSelect
Else
$SpellName = GUICtrlRead ( $SpellNum )
GUICtrlSetBkColor ( $SpellNum, $spellcolor )
$SpellNum += 1
$SpellUp = 0
$SpellDown = 1
EndIf
EndFunc
Func keyleft1()
Call ( "catsel2" )
EndFunc
Func keyright1()
Select
; ###
Case $SpellUp = 1
$SpellNum += 1
Select
Case $SpellNum = 3
Send ( $cast1 )
Case $SpellNum = 4
Send ( $cast2 )
Case $SpellNum = 5
Send ( $cast3 )
Case $SpellNum = 6
Send ( $cast4 )
Case $SpellNum = 7
Send ( $cast5 )
Case $SpellNum = 8
Send ( $cast6 )
Case $SpellNum = 9
Send ( $cast7 )
Case $SpellNum = 10
Send ( $cast8 )
Case $SpellNum = 11
Send ( $cast9 )
Case $SpellNum = 12
Send ( $cast10 )
Case $SpellNum = 13
Send ( $cast11 )
Case $SpellNum = 14
Send ( $cast12 )
EndSelect
$SpellNum -= 1
; ###
Case $SpellDown = 1
$SpellNum -= 1
Select
Case $SpellNum = 3
Send ( $cast1 )
Case $SpellNum = 4
Send ( $cast2 )
Case $SpellNum = 5
Send ( $cast3 )
Case $SpellNum = 6
Send ( $cast4 )
Case $SpellNum = 7
Send ( $cast5 )
Case $SpellNum = 8
Send ( $cast6 )
Case $SpellNum = 9
Send ( $cast7 )
Case $SpellNum = 10
Send ( $cast8 )
Case $SpellNum = 11
Send ( $cast9 )
Case $SpellNum = 12
Send ( $cast10 )
Case $SpellNum = 13
Send ( $cast11 )
Case $SpellNum = 14
Send ( $cast12 )
EndSelect
$SpellNum += 1
; ###
EndSelect
EndFunc
; ###############
; Nav Keys End
; ###############
; ###############
; Catagory GUI
; ###############
Func spellcast()
$SpellName1 = IniRead ( "WoWPad.ini", "category"&$Category, "spell1", "None" )
$SpellName2 = IniRead ( "WoWPad.ini", "category"&$Category, "spell2", "None" )
$SpellName3 = IniRead ( "WoWPad.ini", "category"&$Category, "spell3", "None" )
$SpellName4 = IniRead ( "WoWPad.ini", "category"&$Category, "spell4", "None" )
$SpellName5 = IniRead ( "WoWPad.ini", "category"&$Category, "spell5", "None" )
$SpellName6 = IniRead ( "WoWPad.ini", "category"&$Category, "spell6", "None" )
$SpellName7 = IniRead ( "WoWPad.ini", "category"&$Category, "spell7", "None" )
$SpellName8 = IniRead ( "WoWPad.ini", "category"&$Category, "spell8", "None" )
$SpellName9 = IniRead ( "WoWPad.ini", "category"&$Category, "spell9", "None" )
$SpellName10 = IniRead ( "WoWPad.ini", "category"&$Category, "spell10", "None" )
$SpellName11 = IniRead ( "WoWPad.ini", "category"&$Category, "spell11", "None" )
$SpellName12 = IniRead ( "WoWPad.ini", "category"&$Category, "spell12", "None" )
$GUI22 = GUICreate ( "Spell Cast", 200, 300 )
Opt ( "GUICoordMode",0 )
$Spell1 = GUICtrlCreateLabel ( $SpellName1, 0, 0, 200, 25, $SS_CENTER )
$Spell2 = GUICtrlCreateLabel ( $SpellName2, 0, 25, 200, 25, $SS_CENTER )
$Spell3 = GUICtrlCreateLabel ( $SpellName3, 0, 25, 200, 25, $SS_CENTER )
$Spell4 = GUICtrlCreateLabel ( $SpellName4, 0, 25, 200, 25, $SS_CENTER )
$Spell5 = GUICtrlCreateLabel ( $SpellName5, 0, 25, 200, 25, $SS_CENTER )
$Spell6 = GUICtrlCreateLabel ( $SpellName6, 0, 25, 200, 25, $SS_CENTER )
$Spell7 = GUICtrlCreateLabel ( $SpellName7, 0, 25, 200, 25, $SS_CENTER )
$Spell8 = GUICtrlCreateLabel ( $SpellName8, 0, 25, 200, 25, $SS_CENTER )
$Spell9 = GUICtrlCreateLabel ( $SpellName9, 0, 25, 200, 25, $SS_CENTER )
$Spell10 = GUICtrlCreateLabel ( $SpellName10, 0, 25, 200, 25, $SS_CENTER )
$Spell11 = GUICtrlCreateLabel ( $SpellName11, 0, 25, 200, 25, $SS_CENTER )
$Spell12 = GUICtrlCreateLabel ( $SpellName12, 0, 25, 200, 25, $SS_CENTER )
GUICtrlSetFont ( $Spell1, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell2, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell3, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell4, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell5, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell6, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell7, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell8, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell9, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell10, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell11, 16, 400, 0, $setfont )
GUICtrlSetFont ( $Spell12, 16, 400, 0, $setfont )
GUISetState ()
;WinSetOnTop ( "Spell Cast", "", 1 )
While 1
$GUI1 = GUIGetMsg()
Select
Case $GUI1 = $GUI_EVENT_CLOSE
Exit
Case $GUI1 = $Spell1
Send ( "1" )
Case $GUI1 = $Spell2
Send ( "2" )
Case $GUI1 = $Spell3
Send ( "3" )
Case $GUI1 = $Spell4
Send ( "4" )
Case $GUI1 = $Spell5
Send ( "5" )
Case $GUI1 = $Spell6
Send ( "6" )
Case $GUI1 = $Spell7
Send ( "7" )
Case $GUI1 = $Spell8
Send ( "8" )
Case $GUI1 = $Spell9
Send ( "9" )
Case $GUI1 = $Spell10
Send ( "0" )
Case $GUI1 = $Spell11
Send ( "-" )
Case $GUI1 = $Spell12
Send ( "=" )
EndSelect
HotKeySet ( $bindkeyup, "keyup1" )
HotKeySet ( $bindkeydown, "keydown1" )
HotKeySet ( $bindkeyleft, "keyleft1" )
HotKeySet ( $bindkeyright, "keyright1" )
HotKeySet ( $bindkeyloot, "loot" )
HotKeySet ( $bindkeyviewsel, "viewsel" )
HotKeySet ( $bindkeycatsel, "catsel2" )
WEnd
EndFunc
; ###############
; Catagory GUI End
; ###############