Posts: 1,769
Threads: 410
Joined: Feb 2003
It seems that if i haven't started the OnScreenDisplay function for a while, it is real slow to start up. so slow, that sometimes the process that it is supposed to tell me is about to begin has already completed.
is there a way to speed this up?
Posts: 12,140
Threads: 142
Joined: Dec 2002
On my slowest computer it always starts immediately. What is the code calling OnScreenDisplay?
Posts: 1,769
Threads: 410
Joined: Feb 2003
here's the one i'm having the most problem with; it is a function
Play(1 "C:\downloads\sounds\system\GT3_button_pin.wav")
str s ss
int i
int+ g_stop_ts_sound=0
s="ÚÛÜÝÞßÞÝÜÛÚ"
rep 3
,for i 0 s.len
,,OnScreenDisplay(ss.get(s i 1) 0.2 0 0 "Wingdings 2" 58 0x1101b2 0 "TS")
,,0.15
,,if(g_stop_ts_sound) ret
end
Posts: 12,140
Threads: 142
Joined: Dec 2002
Will it start quickly if Play is removed?
Tip:
Play uses Windows Media Player ActiveX control, which is an elephant in memory. To play wav files, use bee.
Posts: 1,769
Threads: 410
Joined: Feb 2003
hmmmm....i'll take it out and see.
the reason i was using it is that i have a prog that plays a little 'tic' sound when i hit a key (since my keyboard is zero-force and has no keys, i need the audio feedback since there isn't any tactical feedback) and if i use 'bee' the sound stops as soon as another sound plays (even if it isn't started from QM).
anyway to get around that that you know of?
Posts: 12,140
Threads: 142
Joined: Dec 2002
Try to place
opt waitmsg 1
before Play.
Does it help? If not, leave player running. QM closes unused player window (by default it is hidden) after maybe 10 minutes of inactivity. On my computer it loads quickly, but maybe on your computer it loads slowly. Play waits for it to pass the filename. Don't remember exactly but if player is visible (Play 1 "file" 1), it is not auto closed. You can use mov -1000 -1000 __hwndmp to hide it.
Posts: 1,769
Threads: 410
Joined: Feb 2003
i'll give that a try but it may take a day or two to test it.
thanks.
Posts: 1,769
Threads: 410
Joined: Feb 2003
i dropped this into my macro but it is still taking too long to get the OnScreenDisplay up.
opt waitmsg 1
Play(1 "C:\downloads\sounds\system\GT3_button_pin.wav" 0)
any other thoughts on how i can avoid that delay?
thanks
Posts: 12,140
Threads: 142
Joined: Dec 2002
Try to call Play from other function started using mac.