Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Performance Tuning
#1
Shocked 
So I have this macro who's main job is to show me the date time and the number of unread messages in my Outlook window.  But, when it's running it forces both QM and Outlook to use 10% and 30% cpu respectively.  

What am I doing wrong here to make it so inefficient?   Any thoughts would be most appreciated.



Function OSD_clock
Code:
Copy      Help
;shows clock in middle of specified monitor
_monitor=0
out
int z hidn clpbd w
str s clpbds value
Acc a
rep
,s.time("%X   %d - %a")
,s.from("  " s " ")
,err-
,w=win("* - [email protected] - Outlook" "rctrl_renwnd32" "" 0x1)
,a.Find(w "OUTLINEITEM" "Inbox*" "class=NetUIHWND" 0x1005)
,value=a.Name
,err+
,,value="Outlook not connected"
,if len(value)>0
,,value.replacerx("[^\d]" "")
,s.from(s "   " value)
,hidn= hid(win("tim4924" "QM_OSD_Class_Rd" "qm"))
,err
,if hidn=0
,,OnScreenDisplay s -1 675 -2 "Copperplate Gothic Bold" 14 0x00ffff 25|0x8000 "tim4924" 0x343434
,0.1
An old blog on QM coding and automation.

The Macro Hook


Messages In This Thread
Performance Tuning - by ken gray - 10-25-2018, 05:10 PM
RE: Performance Tuning - by Gintaras - 10-25-2018, 05:55 PM
RE: Performance Tuning - by ken gray - 10-25-2018, 08:26 PM
RE: Performance Tuning - by ken gray - 10-26-2018, 12:49 PM
RE: Performance Tuning - by stupomer - 10-28-2018, 09:21 PM
RE: Performance Tuning - by BJ - 12-07-2018, 08:37 PM
RE: Performance Tuning - by stupomer - 12-10-2018, 03:27 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)