This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set WMI = GetObject("WinMgmts:root\WMI") | |
| Set Objs = WMI.ExecQuery("SELECT * FROM MSStorageDriver_ATAPISmartData") | |
| For Each Obj In Objs | |
| a = Obj.VendorSpecific | |
| Next | |
| For i = 2 To UBound(a) | |
| If a(i) = 4 Then | |
| MsgBox "Start stop count " & (a(i+11)+a(i+10)+a(i+9)+a(i+8)+a(i+7)+a(i+6))*256+a(i+5) & " times" | |
| End If | |
| If a(i) = 9 Then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import psutil,time,os | |
| while True: | |
| a = psutil.net_io_counters(pernic=True)['WLAN'].bytes_recv / 1048576 | |
| time.sleep(1) | |
| b = psutil.net_io_counters(pernic=True)['WLAN'].bytes_recv / 1048576 | |
| print(b - a) | |
| if b - a < 0.8: | |
| os.system('netsh wlan connect name=Tsinghua-5G ssid=Tsinghua-5G') | |
| time.sleep(8) |