Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about new macro behavior
#18
This version correctly ends all threads.
Macro M1
Trigger $sm "Test convert"     Help - how to add the trigger to the macro
Code:
Copy      Help
;\
function $files
int+ g_convertEndingThreads
str f
foreach f files
,out f
,mac "sub.Convert" "" f
,if(!IsThreadRunning("M1:End")) mac "sub.End"


#sub Convert
function $f

lock
if(g_convertEndingThreads) ret
AddTrayIcon "$qm$\copy.ico" F"converting {f}"
mes F"converting {f}"


#sub End
rep
,wait 1 K C ;;Ctrl
,err
,,if(!IsThreadRunning("M1:Convert")) break
,,continue
,g_convertEndingThreads=1
,EndThread "M1:Convert" 0 8
,g_convertEndingThreads=0
,break


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)