Jump to content

So I would like my sec keyboard switch my scenes in my obs so I'm trying to use his thing so I took from. Here is my code could someone tell me  what I'm doing wrong?

#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 ;only one instance of this script may run at a time!
#IfWinActive ahk_exe obs32.exe ;---EVERYTHING BELOW THIS LINE WILL ONLY WORK INSIDE OBS!


#IfWinNotActive ahk_exe obs32.exe  ;
numpad5::
FileRead, key, C:\Users\Daniel\Documents\keypressed.txt
If(key = T)
Send ^!+T
return

numpad1::
FileRead, key, C:\Users\Daniel\Documents\keypressed.txt
If(key = Z)
Send ^!+Z
return


numpad2::
FileRead, key, C:\Users\Daniel\Documents\keypressed.txt
If(key = X)
Send ^!+X
return


numpad3::
FileRead, key, C:\Users\Daniel\Documents\keypressed.txt
If(key = C)
Send ^!+C
return

numpad9::
FileRead, key, C:\Users\Daniel\Documents\keypressed.txt
If(key = S)
Send ^!S
return





 

 

Link to comment
https://linustechtips.com/topic/579268-ok-now-i-need-help/
Share on other sites

Link to post
Share on other sites

Well I haven't used AutoHotKey before but looking at that code I'm assuming the semicolon is for comments and if that is correct you have commented out a line which a comment says that it gives feedback on errors so my suggestion would be to uncomment that line and see what error messages you get and go from there :)

Link to comment
https://linustechtips.com/topic/579268-ok-now-i-need-help/#findComment-7602655
Share on other sites

Link to post
Share on other sites

Also another thing I noticed is:

numpad9::
FileRead, key, C:\Users\Daniel\Documents\keypressed.txt
If(key = S)
Send ^!S
return

The send there is different to the send on others which has a + in it so I don't know if that makes any difference but probs does.

Link to comment
https://linustechtips.com/topic/579268-ok-now-i-need-help/#findComment-7602663
Share on other sites

Link to post
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

×