Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function Fails to End
#1
Here's a function that I have (or at least the guts of it) that when I try to stop it via the "QM-Threads", it fails to stop and the Threads dialog is locked out until the function ends on its own.

can you explain what I'm doing wrong here?

Function Coke_Timer_Visual2
Code:
Copy      Help
int hwnd hwnd1 hwnd2 hwnd3 hwnd4 hwnd5 hwnd6 hwnd7 hwnd8
int wid hei z
int x y pause trans incrs
x=5
y=31
wid=25
hei=10
pause=2
trans=120
incrs=25
hwnd=OnScreenDraw(x y wid hei &OSD_Proc_Bar_Red 0 trans)
hwnd1=OnScreenDraw(x y+(hei) wid hei &OSD_Proc_Bar_Red 0 55)
hwnd2=OnScreenDraw(x y+(hei*2) wid hei &OSD_Proc_Bar_Red 0 55)
hwnd3=OnScreenDraw(x y+(hei*3) wid hei &OSD_Proc_Bar_Lt_Blue 0 55)
hwnd4=OnScreenDraw(x y+(hei*4) wid hei &OSD_Proc_Bar_Lt_Blue 0 55)
hwnd5=OnScreenDraw(x y+(hei*5) wid hei &OSD_Proc_Bar_Lt_Blue 0 55)
hwnd6=OnScreenDraw(x y+(hei*6) wid hei &OSD_Proc_Bar_Lt_Blue 0 55)
hwnd7=OnScreenDraw(x y+(hei*7) wid hei &OSD_Proc_Bar_Blue 0 55)
wait pause
trans+incrs
Transparent(hwnd1 150)
2
Transparent(hwnd2 150)
2
Transparent(hwnd3 150)
2
Transparent(hwnd4 150)
2
Transparent(hwnd5 150)
2
Transparent(hwnd6 150)
2
Transparent(hwnd7 150)
2
end
An old blog on QM coding and automation.

The Macro Hook
#2
There are 8 windows. QM waits some time for each but they don't want to be closed.

Insert in the end of OSD_Dialog:
Function OSD_Dialog
Code:
Copy      Help
,
,case WM_COMMAND ret 1
#3
works perfect...as usual!
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)