Jump to content



Photo

[Resolved] accelerator keys and function call problem


  • Please log in to reply
1 reply to this topic

#1 xeroTechnologiesLLC

xeroTechnologiesLLC

    Prodigy

  • Active Members
  • PipPipPip
  • 158 posts

Posted 30 July 2012 - 04:47 PM

I'm probably missing something stupid easy, but not sure what.

Below is just 1 piece of my accelerator array:
"{NUMPAD1}", "_activate_tab_1"


...they press numpad 1 and it should call _activate_tab_1() function...correct?


so here is _activate_tab_1 function:
Func _activate_tab_1() _GUICtrlTab_SetCurFocus($tabHotkeys, 1) EndFunc


Which I know this code works well as I call 1 for tab 0 to make sure it's selected correctly when the program launchs.

But when I run the program, I hit numpad key 1, nothing.

Thoughts?
I checked the windows reserved keys and didn't see anything noting numpad1 being reserved.

Not sure why the function won't launch.

Edited by xeroTechnologiesLLC, 30 July 2012 - 05:19 PM.






#2 xeroTechnologiesLLC

xeroTechnologiesLLC

    Prodigy

  • Active Members
  • PipPipPip
  • 158 posts

Posted 30 July 2012 - 05:19 PM

Yup, stupid simple:
HotKeySet("{NUMPAD0}", "_activate_tab_0") HotKeySet("{NUMPAD1}", "_activate_tab_1") HotKeySet("{NUMPAD2}", "_activate_tab_2") HotKeySet("{NUMPAD3}", "_activate_tab_3") HotKeySet("{NUMPAD4}", "_activate_tab_4") HotKeySet("{NUMPAD5}", "_activate_tab_5")

...works.

:mad2:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users