02-19-2015, 02:14 PM
Function threads don't change tray icon. You can use AddTrayIcon.
Macro M1
Trigger $sm "Test convert"
Function end_convert
Trigger CAe
Or right click or Ctrl+click in Running items. Or use QM tray icon menu -> Threads.
Or Ctrl+click tray icon added by AddTrayIcon. But it does not work if the thread does not process messages.
Quote:do you use mac "sub.Convert" instead of sub.Convert to allow asynchro running?Yes, it executes #sub Convert in new thread.
Quote:If I want to stop process, what is the correct wayIf want to have a hotkey to end a thread, you can create new function that calls EndThread, and assign a hotkey trigger.
Macro M1
Trigger $sm "Test convert"

;\
function $files
str f
foreach f files
,out f
,mac "sub.Convert" "" f
#sub Convert
function $f
lock
AddTrayIcon "$qm$\copy.ico" F"converting {f}"
mes F"converting {f}"Trigger CAe

Or right click or Ctrl+click in Running items. Or use QM tray icon menu -> Threads.
Or Ctrl+click tray icon added by AddTrayIcon. But it does not work if the thread does not process messages.
