for some reason, not sure why the counter variable is not being reset when the toolbar closes
use this code instead
Function ToolbarSelfClose
use this code instead
Function ToolbarSelfClose
function# hWnd message wParam lParam
type MYTOOLBARVARS a
MYTOOLBARVARS* v=+GetProp(hWnd "v") ;;retrieve (required)
;OutWinMsg message wParam lParam ;;uncomment to see received messages
sel message
,case WM_INITDIALOG
,v._new; SetProp(hWnd "v" v) ;;create (required)
,v.a=1;
,SetTimer hWnd 1 1000 0
,case WM_TIMER
,sel wParam
,,case 1
,,out v.a
,,if v.a >=10;; close toolbar after 10 seconds(change number to how many seconds you want it to autoclose)
,,,KillTimer hWnd 1
,,,clo hWnd
,,v.a+1
,case WM_DESTROY
,v._delete; RemoveProp(hWnd "v") ;;destroy (required)