AHK problems since windows update?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
morkani
Posts: 1
Joined: 24 May 2018, 11:48

AHK problems since windows update?

24 May 2018, 13:58

are there any known issues after this windows patch?

a friend of mine suggested coming to the forums here and mentioned how great and helpfull you all are. thank you for taking the time to read this :)

I run an autohotkey script i found online that lets me have twitch chat prompt a gif change that obs can use to display different gif's instream, but since this windows update, it doesn't seem to stay running anymore (seems to stop working every hour or two although taskbar shows it still running), over the course of 16 hours I usually have to "re-run" the script to get it working again every few hours, it doesn't "stay" running, any suggestions?

I do not understand coding or scripting (up front), & I went to ask in ahk discord & an attempt was made to teach me how to code, but it didn't take :(, I have really no use for this knowledge beyond this script or the time necessary to learn/research it, would it be possible for someone to assist? (also please forgive me if during this post I inappropriately use the term "script" as i'm not certain where it applies, but i think i've used it properly in this post)

here's the lines my ankhbot(streamlabs chatbot) uses when a command is given
$savetofile("C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFTrigger.txt","lost")
$savetofile("C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFTrigger.txt","blank")

I have around 90+ different gif's and add to it from time to time. each has a different command like the one above, only difference is the "lost" is changed to the new .gif filename ("alien" for example or "lurk")

secondly, the AHK script i'm using has the following code within it, a lot of it I don't understand, but I know which lines to copy/paste & edit when i add a new gif to the feature. (I copy a gif into a folder it uses, create a command in ankhbot that does the above, and edit the following .ahk script):

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#SingleInstance force 

;GIF files variables initialization

gifBlank:="blank"
gif1:="lost"
gif2:="ricky"
gif3:="mech"
gif4:="toad"
gif5:="mork"
gif6:="explosionXPT"
gif7:="TrumpTruck"
gif8:="Halloween"
gif9:="Smoke"
gif10:="party"
gif11:="sheep"
gif12:="shark"
gif13:="fight"
gif14:="nyan"
gif15:="minion"
gif16:="giggity"
gif17:="happy"
gif18:="shadow"
gif19:="kind"
gif20:="lightning(x)"
gif21:="lazy"
gif22:="meeseeks"
gif23:="dong"
gif24:="butterfly"
gif25:="ganj"
gif26:="twerk"
gif27:="kong"
gif28:="starlit"
gif29:="sourcelala"
gif30:="rabbit"
gif31:="finger"
gif32:="princess"
gif33:="shake"
gif34:="alien"
gif35:="winky"
gif36:="moon"
gif37:="snoop"
gif38:="cage"
gif39:="tree"
gif40:="twirl"
gif41:="crazybaby"
gif42:="pbear"
gif43:="sanitarium"
gif44:="jethroe"
gif45:="catdance"
gif46:="nova"
gif47:="choppa"
gif48:="charizard"
gif49:="dory"
gif50:="3"
gif51:="hank"
gif52:="fireworks"
gif53:="booty"
gif54:="violin"
gif55:="Slimer"
gif56:="Pony"
gif57:="ruff"
gif58:="dragspin"
gif59:="spikey"
gif60:="wolfie"
gif61:="lisa"
gif62:="db"
gif63:="dolphin"
gif64:="spinner"
gif65:="beemo"
gif66:="huh"
gif67:="knife"
gif68:="dragstar"
gif69:="bb8"
gif70:="kenny"
gif71:="fly"
gif72:="jitter"
gif73:="jake"
gif74:="scardykids"
gif75:="sloth"
gif76:="swirl"
gif77:="swirle"
gif78:="wtf"
gif79:="freakyfountain"
gif80:="monster"
gif81:="hart"
gif82:="Aerodactyl"
gif83:="dragdance"
gif84:="sillycat"
gif85:="miley"
gif86:="happycat"
gif87:="whateva"
gif88:="dragflight"
gif89:="uodrag"
gif90:="happydance"
gif91:="beanspook"
gif92:="stickdance"
gif93:="beetle"
gif94:="stacy"
gif95:="lurk"

gifTime:=5000 ;default GIF visibility duration

lineIndex:=1

;Clearing the GIFTrigger.txt file

FileCopy, C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFs\GIFTrigger_blank.txt, C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFTrigger.txt,1

;Continous loop that check if text in the trigger file is the same as any of the gif images stored in the variables above.
;It will display blank.gif as default and a GIF image when the correct string is found.

Loop
{

trigger = blank ;default value for trigger variable

FileCopy, C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFs\blank_backup.png, C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFs\toDisplay\blank.gif,1 ;replaces the blank.gif with the original blank_backup.gif

FileReadLine, trigger, C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFTrigger.txt, %lineIndex% ;reads the text from the file where lineIndex is the line number

;If no text file change was triggered by a command, it will be blank by default for 1 second every time it loops.
;Line index is incremented twice because the Ankhbot command writes the name of the GIF file on one line and "blank" on the next line.

IfInString, trigger, %gifBlank%
{
varGIF := gifBlank
gifTime:=1000
}
IfInString, trigger, %gif1%
{
varGIF := gif1
gifTime:=6300
lineIndex++
lineIndex++
}
IfInString, trigger, %gif2%
{
varGIF := gif2
gifTime:=4300
lineIndex++
lineIndex++
}
IfInString, trigger, %gif3%
{
varGIF := gif3
gifTime:=4500
lineIndex++
lineIndex++
}
IfInString, trigger, %gif4%
{
varGIF := gif4
gifTime:=3500
lineIndex++
lineIndex++
}
IfInString, trigger, %gif5%
{
varGIF := gif5
gifTime:=2666
lineIndex++
lineIndex++
}
IfInString, trigger, %gif6%
{
varGIF := gif6
gifTime:=2000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif7%
{
varGIF := gif7
gifTime:=5000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif8%
{
varGIF := gif8
gifTime:=5000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif9%
{
varGIF := gif9
gifTime:=7000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif10%
{
varGIF := gif10
gifTime:=5000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif11%
{
varGIF := gif11
gifTime:=5000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif12%
{
varGIF := gif12
gifTime:=9000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif13%
{
varGIF := gif13
gifTime:=9000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif14%
{
varGIF := gif14
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif15%
{
varGIF := gif15
gifTime:=11000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif16%
{
varGIF := gif16
gifTime:=4500
lineIndex++
lineIndex++
}

IfInString, trigger, %gif17%
{
varGIF := gif17
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif18%
{
varGIF := gif18
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif19%
{
varGIF := gif19
gifTime:=7000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif20%
{
varGIF := gif20
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif21%
{
varGIF := gif21
gifTime:=9000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif22%
{
varGIF := gif22
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif23%
{
varGIF := gif23
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif24%
{
varGIF := gif24
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif25%
{
varGIF := gif25
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif26%
{
varGIF := gif26
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif27%
{
varGIF := gif27
gifTime:=8000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif28%
{
varGIF := gif28
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif29%
{
varGIF := gif29
gifTime:=12000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif30%
{
varGIF := gif30
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif31%
{
varGIF := gif31
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif32%
{
varGIF := gif32
gifTime:=7000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif33%
{
varGIF := gif33
gifTime:=10000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif34%
{
varGIF := gif34
gifTime:=7000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif35%
{
varGIF := gif35
gifTime:=5000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif36%
{
varGIF := gif36
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif37%
{
varGIF := gif37
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif38%
{
varGIF := gif38
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif39%
{
varGIF := gif39
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif40%
{
varGIF := gif40
gifTime:=5000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif41%
{
varGIF := gif41
gifTime:=5000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif42%
{
varGIF := gif42
gifTime:=8000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif43%
{
varGIF := gif43
gifTime:=10000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif44%
{
varGIF := gif44
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif45%
{
varGIF := gif45
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif46%
{
varGIF := gif46
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif47%
{
varGIF := gif47
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif48%
{
varGIF := gif48
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif49%
{
varGIF := gif49
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif50%
{
varGIF := gif50
gifTime:=180000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif51%
{
varGIF := gif51
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif52%
{
varGIF := gif52
gifTime:=15000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif53%
{
varGIF := gif53
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif54%
{
varGIF := gif54
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif55%
{
varGIF := gif55
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif56%
{
varGIF := gif56
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif57%
{
varGIF := gif57
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif58%
{
varGIF := gif58
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif59%
{
varGIF := gif59
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif60%
{
varGIF := gif60
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif61%
{
varGIF := gif61
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif62%
{
varGIF := gif62
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif63%
{
varGIF := gif63
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif64%
{
varGIF := gif64
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif65%
{
varGIF := gif65
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif66%
{
varGIF := gif66
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif67%
{
varGIF := gif67
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif68%
{
varGIF := gif68
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif69%
{
varGIF := gif69
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif70%
{
varGIF := gif70
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif71%
{
varGIF := gif71
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif72%
{
varGIF := gif72
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif73%
{
varGIF := gif73
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif74%
{
varGIF := gif74
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif75%
{
varGIF := gif75
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif76%
{
varGIF := gif76
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif77%
{
varGIF := gif77
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif78%
{
varGIF := gif78
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif79%
{
varGIF := gif79
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif80%
{
varGIF := gif80
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif81%
{
varGIF := gif81
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif82%
{
varGIF := gif82
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif83%
{
varGIF := gif83
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif84%
{
varGIF := gif84
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif85%
{
varGIF := gif85
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif86%
{
varGIF := gif86
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif87%
{
varGIF := gif87
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif88%
{
varGIF := gif88
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif89%
{
varGIF := gif89
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif90%
{
varGIF := gif90
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif91%
{
varGIF := gif91
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif92%
{
varGIF := gif92
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif93%
{
varGIF := gif93
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif94%
{
varGIF := gif94
gifTime:=6000
lineIndex++
lineIndex++
}
IfInString, trigger, %gif95%
{
varGIF := gif95
gifTime:=6000
lineIndex++
lineIndex++
}








;Using varGIF variable from above, the file path to the gif is built and it copies that image file to the image shown in OBS, overwriting it.

FileCopy, C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFs\%varGIF%.gif, C:\Users\User Name\Desktop\OBS\AutoHotKey\gifoverlay\GIFOverlay\GIFs\toDisplay\blank.gif,1

Sleep, gifTime ;the image will show for a specific time set for each image separately

;Next, the loops starts over by checking the last line. If no new command was used, it will find the trigger blank, meaning the image will be the transparent one.

}
please place your code in [code][/code] tags!



END OF SCRIPT*****************************

If i were to need a 96th gif I would
1. copy the gif desired into the folder used by the script
2. copy paste the following line into a new line
gif95:="lurk"
3. then i would change 95 to 96
4. then i would change the "lurk" to whatever the new filename is (example "newgif")
5. i would copy the following chunk of lines into a new chunk of lines

IfInString, trigger, %gif95%
{
varGIF := gif95
gifTime:=6000
lineIndex++
lineIndex++
}

6. I would modify these new lines by changing the %gif95% to %gif96%
7. I would change the line varGIF := gif96
8. I would occasionally adjust the gifTime:=6000 as needed to shorten, lengthen the time the gif is displayed

(reminder, I don't understand most of the code or how it works, and unfortunately I don't have the time to be able to learn coding 101 to adjust this script when i don't use coding or scripting for anything else)

this all used to work fine prior to the windows update, now randomly after an hour or so, people's gifs do not get displayed even though the script is still running, but i can fix it by re-running the .ahk file, the problem is mainly that people's gif occasionally won't display till i rerun the script...

I was thinking there might be 2 fixes, 1. if anyone knows of why the windows update could cause this to stop working and how to address it? or
2. if there was a way to automate re-running the .ahk file once an hour or so to prevent the problem?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: DiegoSouto, Sniperman and 387 guests