Trying to switch out my function keys when using a program but for some reason it isn't working,
Someone mind helping me out
#If ProcessExist("FL64.exe")
1:: F1
2:: F2
#If
ProcessExist(Name)
{
Process,Exist,%Name%
return Errorlevel
}
Script help Topic is solved
Script help
Last edited by cainxabel on 07 Dec 2019, 15:40, edited 1 time in total.
Re: Script help
You need to make it the directive #If to apply to hotkeys, not If.
Re: Script help
Oh sorry i do have the # symbol .boiler wrote: You need to make it the directive #If to apply to hotkeys, not If.
Re: Script help
Not sure what you mean by saying you want to switch out your function keys. The way you have it set up, you've mapped such that when you press 1, it's like you pressed F1. Same with 2 and F2, respectively. If you want to press F1 and it will act like you pressed 1 (and same with the other pair), you need to reverse them.
Re: Script help
yeah i want to switch the number keys with the function keys for that program but i cant get it to workboiler wrote: ↑07 Dec 2019, 18:39Not sure what you mean by saying you want to switch out your function keys. The way you have it set up, you've mapped such that when you press 1, it's like you pressed F1. Same with 2 and F2, respectively. If you want to press F1 and it will act like you pressed 1 (and same with the other pair), you need to reverse them.
Re: Script help
Well for one thing, what you have implemented won't just switch them for that program because you've made it so the remap is active if the process exists whether it's the active window or not. So as long as that program is running in the background, the remap will be active even when you're working in another program.
It's still not clear what you mean by switching them. If you want to switch them so 1 acts like F1 and F1 acts like 1 (as well as the other pair, then you need both):
If it's still not doing what you want, please describe in detail what you mean when you say that. Is it that it's always working (not just in that program)? Is it that it's doing nothing at all when you press certain keys? Which keys?
It's still not clear what you mean by switching them. If you want to switch them so 1 acts like F1 and F1 acts like 1 (as well as the other pair, then you need both):
Code: Select all
#If ProcessExist("FL64.exe")
1::F1
2::F2
F1::1
F2::2
#If
ProcessExist(Name)
{
Process,Exist,%Name%
return Errorlevel
}
Re: Script help
yea the key swaps just arent working like if the script isn't runningboiler wrote: ↑07 Dec 2019, 18:58Well for one thing, what you have implemented won't just switch them for that program because you've made it so the remap is active if the process exists whether it's the active window or not. So as long as that program is running in the background, the remap will be active even when you're working in another program.
It's still not clear what you mean by switching them. If you want to switch them so 1 acts like F1 and F1 acts like 1 (as well as the other pair, then you need both):
If it's still not doing what you want, please describe in detail what you mean when you say that. Is it that it's always working (not just in that program)? Is it that it's doing nothing at all when you press certain keys? Which keys?Code: Select all
#If ProcessExist("FL64.exe") 1::F1 2::F2 F1::1 F2::2 #If ProcessExist(Name) { Process,Exist,%Name% return Errorlevel }
i tried running it and get an error saying
"#If ProcessExist("FL64.exe")"
this line does not contain a recognized action
Re: Script help Topic is solved
Are you using a very old version of AHK? What does it show when you run the following?
Code: Select all
MsgBox % A_AhkVersion
Re: Script help
is it possible to make the key changes program specific only and not universal? ie only for fl.exe and not chromeboiler wrote: ↑07 Dec 2019, 19:54Are you using a very old version of AHK? What does it show when you run the following?Code: Select all
MsgBox % A_AhkVersion
Re: Script help
This would make the remappings active only when a window of the FL64.exe program is the active window:
Code: Select all
#If WinActive("ahk_exe FL64.exe")
1::F1
2::F2
F1::1
F2::2
#If
Who is online
Users browsing this forum: mikeyww and 381 guests