07-02-2025, 10:34 AM
I want to create global hotkeys for a tray application, for example, as shown in the code below.
When I press the hotkey F12, the subroutine sub.hk_F12 will be executed.
When I press the hotkey Ctrl+F12, the subroutine sub.hk_Ctrl_F12 will be executed.
I haven't found any useful information on the forums.
Thanks in advance for any suggestions and help.
Function TcpServer2
When I press the hotkey F12, the subroutine sub.hk_F12 will be executed.
When I press the hotkey Ctrl+F12, the subroutine sub.hk_Ctrl_F12 will be executed.
I haven't found any useful information on the forums.
Thanks in advance for any suggestions and help.
Function TcpServer2
out
if(getopt(nthreads)>1) ret ;;allow single instance
AddTrayIcon "cut.ico" "test_TcpSocket_server[]Ctrl+click to end."
#compile "__TcpSocket"
TcpSocket x.ServerStart(5032 &sub.OnClientConnected)
#sub OnClientConnected
function TcpSocket&client $clientIp param !*reserved
client.Receive(_s 1000)
out F"SERVER: client request: {_s}"
client.Send("response 1")
#sub hk_F12
mes "hk_F12"
#sub hk_Ctrl_F12
mes "hk_Ctrl_F12"