Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OnScreenDisplay
#1
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?
An old blog on QM coding and automation.

The Macro Hook
#2
On my slowest computer it always starts immediately. What is the code calling OnScreenDisplay?
#3
here's the one i'm having the most problem with; it is a function

Code:
Copy      Help
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
An old blog on QM coding and automation.

The Macro Hook
#4
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.
#5
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?
An old blog on QM coding and automation.

The Macro Hook
#6
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.
#7
i'll give that a try but it may take a day or two to test it.

thanks.
An old blog on QM coding and automation.

The Macro Hook
#8
i dropped this into my macro but it is still taking too long to get the OnScreenDisplay up.

Code:
Copy      Help
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
An old blog on QM coding and automation.

The Macro Hook
#9
Try to call Play from other function started using mac.


Forum Jump:


Users browsing this thread: 1 Guest(s)