I need the generated exe to run as a single instance.
The following two functions are not working:
The functionality that exeThread_Test1 needs to implement: when the exe is run again, execute the subfunction (sub.osdTip).
The functionality that exeThread_Test2 needs to implement: when the exe is run again, restart the exe (first perform a soft close, then start it again).
Thanks in advance for any suggestions and help.
Function exeThread_Test1
Function exeThread_Test2
The following two functions are not working:
The functionality that exeThread_Test1 needs to implement: when the exe is run again, execute the subfunction (sub.osdTip).
The functionality that exeThread_Test2 needs to implement: when the exe is run again, restart the exe (first perform a soft close, then start it again).
Thanks in advance for any suggestions and help.
Function exeThread_Test1
;allow single instance
if(getopt(nthreads)>1)
,sub.osdTip
,ret
sub.osdTip
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 osdTip
OsdHide "o1"
OnScreenDisplay "TcpSocket_server is Running!" 0 0 0 "" 36 0x33331F 4|8|128 "o1" 0xFFFFFF
Function exeThread_Test2
;allow single instance
if(getopt(nthreads)>1)
,;shutdown -2 ;;not work
,shutdown -7
,run ExeFullPath
,ret
sub.osdTip
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 osdTip
OsdHide "o1"
OnScreenDisplay "TcpSocket_server is Running!" 0 0 0 "" 36 0x33331F 4|8|128 "o1" 0xFFFFFF