Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Detect blocking of stream recording VLC
#4
Macro Get process network usage from resmon.exe
Code:
Copy      Help
str program="firefox.exe" ;;replace with vlc program name

;if Resource Monitor window not found, run "resmon.exe" and select Network tab. This part may be unreliable, maybe need to wait more.
int w=win("Resource Monitor" "WdcWindow")
if w=0
,run "resmon.exe"
,wait(15 WV win("Resource Monitor" "WdcWindow"))
,2
,w=win("Resource Monitor" "WdcWindow")
,1
,Acc aTab.Find(w "PAGETAB" "Network" "class=SysTabControl32[]id=30100" 0x1005)
,aTab.DoDefaultAction

;every 1 second find the program in the first list, and extract its Receive column
int c=child("" "SysListView32" w) ;;the first listview
rep
,1
,Acc a.Find(c "CHECKBUTTON" program "" 0x15)
,int bytes=0
,if !a.NotFound
,,str s=a.Description; err continue
,,;out s
,,if(findrx(s "\bReceive \(B/sec\): ([^,]+)" 0 0 s 1)<0) end "failed, probably need to edit the regular expression"
,,s.replacerx("\D")
,,;out s
,,bytes=val(s)
,out bytes


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)