einzele Posted December 12, 2017 Share Posted December 12, 2017 hi i have a problem with cue remap function that i want to ask u guys. i assign each of the side buttons from "1" to "=" as macros to repeat constantly while pressed then i remap dpi and profile switcher as a CTRL modifier the idea is i want to just hold the side buttons 1 to keep repeating that action, and whenever i press dpi/profile switcher button, it will directly input "Ctrl + 1", while still holding the side button 1. its simple, but somehow cue doesnt allow it because when i press the dpi/profile switcher button it automatically stops the input from the side button 1 that ive been holding. so i have to re-press the side button 1 after every time i press the dpi/profile switcher. but it works if i press the Ctrl directly from keyboard, so the problem seems coming from the dpi/profile anyone knows how to bypass this limitation? or is there anything not clear with my intention? cheers Link to comment Share on other sites More sharing options...
hastegag Posted December 12, 2017 Share Posted December 12, 2017 its simple, but somehow cue doesnt allow it because when i press the dpi/profile switcher button it automatically stops the input you are not alone, others have asked for this, but it does not appear to be a possibility from within cue alone. You can remap the side buttons to effect something that is visible to Autohotkey or a similar application and have it do what you need. You will need each scimitar side button to be remapped to a keystroke like F13 - F24 or something else that you are not using and then AHK can recognize those hotkeys like F13:: ;stuff return and you should be good to go. let us know how you make out. Link to comment Share on other sites More sharing options...
einzele Posted December 13, 2017 Author Share Posted December 13, 2017 you are not alone, others have asked for this, but it does not appear to be a possibility from within cue alone. You can remap the side buttons to effect something that is visible to Autohotkey or a similar application and have it do what you need. You will need each scimitar side button to be remapped to a keystroke like F13 - F24 or something else that you are not using and then AHK can recognize those hotkeys like F13:: ;stuff return and you should be good to go. let us know how you make out. hi, thx for the reply. that sort of works, but i have found another problem this is the script of one button that im using: F13::1 $F13:: While GetKeyState("F13", "P") { Send, 1 Sleep, 25 ; every 50 miliseconds i assign side button 1 as F13, then the ahk changes it into 1, which is used in game, and it repeats on hold just fine. it also repeats when i press any modifier key (ctrl, alt, shift) after holding the button 1, though somehow it also press the non modifier 1 as well. but it wont repeat the keystroke if i press the modifier key before holding down. so its like this: - holding 1 = repeat 1 - holding 1 then press Ctrl = repeat Ctrl + 1, and repeat 1 at the same time - press Ctrl then holding 1 + only register Ctrl + 1 once so can u tell me if there is anything wrong with the script? Link to comment Share on other sites More sharing options...
hastegag Posted December 13, 2017 Share Posted December 13, 2017 hi, thx for the reply. that sort of works, but i have found another problem this is the script of one button that im using: F13::1 $F13:: While GetKeyState("F13", "P") { Send, 1 Sleep, 25 ; every 50 miliseconds i assign side button 1 as F13, then the ahk changes it into 1, which is used in game, and it repeats on hold just fine. it also repeats when i press any modifier key (ctrl, alt, shift) after holding the button 1, though somehow it also press the non modifier 1 as well. but it wont repeat the keystroke if i press the modifier key before holding down. so its like this: - holding 1 = repeat 1 - holding 1 then press Ctrl = repeat Ctrl + 1, and repeat 1 at the same time - press Ctrl then holding 1 + only register Ctrl + 1 once so can u tell me if there is anything wrong with the script? I am at work and didn't read the above but i will try and look at this later tonight or sometime soon, it may have to do with running it in parallel (maxthreads directive if i recall). You may want a single hotkey to run the evaluation on whether a modifier is pressed, i'll have to play with it. Link to comment Share on other sites More sharing options...
hastegag Posted December 14, 2017 Share Posted December 14, 2017 #MaxThreadsPerHotkey 2 Toggle = 0 $F13:: Toggle := !Toggle While Toggle{ Send 1 sleep 25 } return $^F13:: KeyWait LCtrl, T0.1 ; Wait for user to release "F13" key If ErrorLevel ; Still held down While GetKeyState("LCtrl","p"){ ; While it is held down Send ) Send 1 Sleep 25 toggle:=!Toggle } Else {; They let go case } return Is that what you were looking to do? Also, this thread may help: https://autohotkey.com/board/topic/64576-the-definitive-autofire-thread/ Also above, i am sending ) because i didnt know what other key you were looking to fire... Link to comment Share on other sites More sharing options...
einzele Posted December 14, 2017 Author Share Posted December 14, 2017 #MaxThreadsPerHotkey 2 Toggle = 0 $F13:: Toggle := !Toggle While Toggle{ Send 1 sleep 25 } return $^F13:: KeyWait LCtrl, T0.1 ; Wait for user to release "F13" key If ErrorLevel ; Still held down While GetKeyState("LCtrl","p"){ ; While it is held down Send ) Send 1 Sleep 25 toggle:=!Toggle } Else {; They let go case } return Is that what you were looking to do? Also, this thread may help: https://autohotkey.com/board/topic/64576-the-definitive-autofire-thread/ Also above, i am sending ) because i didnt know what other key you were looking to fire... your script somehow didnt work, i got error when i click run script. but after reading through the link u post, i managed to get what i need. basically i just make another script for each modifier, so it looks like this: $F13:: While GetKeyState("F13", "P") { Send, 1 Sleep, 20 } $^F13:: While GetKeyState("Ctrl", "P") { Send, ^1 Sleep, 20 } $+F13:: While GetKeyState("Shift", "P") { Send, +1 Sleep, 20 } $!F13:: While GetKeyState("Alt", "P") { Send, !1 Sleep, 20 } that makes the script really long, because i also have those for the rest 11 side buttons. i just hope it wont crash in the long run. is there any way to simplify it? maybe 1 script for all 3 modifier (yes, i use all 3 in game)? Link to comment Share on other sites More sharing options...
hastegag Posted December 14, 2017 Share Posted December 14, 2017 your script somehow didnt work, i got error when i click run script. but after reading through the link u post, i managed to get what i need. basically i just make another script for each modifier, so it looks like this: $F13:: While GetKeyState("F13", "P") { Send, 1 Sleep, 20 } $^F13:: While GetKeyState("Ctrl", "P") { Send, ^1 Sleep, 20 } $+F13:: While GetKeyState("Shift", "P") { Send, +1 Sleep, 20 } $!F13:: While GetKeyState("Alt", "P") { Send, !1 Sleep, 20 } that makes the script really long, because i also have those for the rest 11 side buttons. i just hope it wont crash in the long run. is there any way to simplify it? maybe 1 script for all 3 modifier (yes, i use all 3 in game)? Your script looks good to me with one exception, you need to add Return closing out each hotkey as far as i know, like after the closing brace and before your next passthru, modifier, and hotkey. I don't tend to have problems with AHK once you get any bugs worked out - i use it every day and it is quite reliable. My scripts are diverse and thousands of lines, so i wouldn't sweat it. Worst thing that could happen is a crash or hang.:cool: Link to comment Share on other sites More sharing options...
einzele Posted December 15, 2017 Author Share Posted December 15, 2017 Your script looks good to me with one exception, you need to add Return closing out each hotkey as far as i know, like after the closing brace and before your next passthru, modifier, and hotkey. I don't tend to have problems with AHK once you get any bugs worked out - i use it every day and it is quite reliable. My scripts are diverse and thousands of lines, so i wouldn't sweat it. Worst thing that could happen is a crash or hang.:cool: something like this? $F13:: While GetKeyState("F13", "P") { Send, 1 Sleep, 20 } Return $^F13:: While GetKeyState("Ctrl", "P") { Send, ^1 Sleep, 20 } Return $+F13:: While GetKeyState("Shift", "P") { Send, +1 Sleep, 20 } Return $!F13:: While GetKeyState("Alt", "P") { Send, !1 Sleep, 20 } Return i didnt notice any difference when i tried it before and after adding return during in game test tho, can u tell me what it is used for? lol i just hope i wont get that crash during raid :D Link to comment Share on other sites More sharing options...
hastegag Posted December 15, 2017 Share Posted December 15, 2017 i didnt notice any difference when i tried it before and after adding return during in game test tho, can u tell me what it is used for? lol i just hope i wont get that crash during raid :D Yeah definitely i get it, return means the code knows to stop executing what is below it, or to return to the calling function or in this case hotkey (sub). It is good practice and will likely make your code more stable if you add to it. Link to comment Share on other sites More sharing options...
einzele Posted December 17, 2017 Author Share Posted December 17, 2017 Yeah definitely i get it, return means the code knows to stop executing what is below it, or to return to the calling function or in this case hotkey (sub). It is good practice and will likely make your code more stable if you add to it. i see. ok seems my issue is resolved, many thanks to you for guiding me through it. cheers :sunglasse Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.