Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about new macro behavior
#9
Function threads don't change tray icon. You can use AddTrayIcon.

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 way
If 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"     Help - how to add the trigger to the macro
Code:
Copy      Help
;\
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}"
Function end_convert
Trigger CAe     Help - how to add the trigger to the macro
Code:
Copy      Help
;Ctrl+Alt+E

EndThread "M1:Convert"
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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)