Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Final Edit Needed: Variable Check Help



  • Please log in to reply
1 reply to this topic
Ghibli
  • Members
  • 17 posts
  • Last active: Aug 29 2016 06:40 PM
  • Joined: 27 Jan 2014
WinGet, wowid, List, World of Warcraft 
ToggleChat := 1
 
~Enter::
ToggleChat := !ToggleChat
ResetTime = 13000
SetTimer, ChatOff, %ResetTime%
Return
 
ChatOff:
ToggleChat := 1
SetTimer, ChatOff, Off
Return
 
#IfWinActive, World of Warcraft
~1::
loop
{
GetKeyState, ScrollLockState, ScrollLock, T
if (ScrollLockState = "U") {
break
} else {
if (ToggleChat := 1) {
Send, 1
Sleep, 15
GetKeyState, State, 1, P
if state = U ;
break
}
}
}
return

 

Right now I have my ToggleChat variable changing from 0 to 1 after enter is pressed twice, and resetting to 1 after 13 seconds has passed if enter is only pressed once. The entire upper part is good.

 

My problem is with the (ToggleChat :=1) check which isn't stopping the loop correctly if it's not 1. See what I missed?

Thanks.

 



Xtra
  • Members
  • 954 posts
  • Last active: Jul 23 2016 09:04 PM
  • Joined: 29 Sep 2013
✓  Best Answer

You setting the var to 1 everytime with ToggleChat := 1

 

Use

 

If (ToggleChat = 1)

 

or

 

If (ToggleChat)