共 211 篇文章 |
|
from bson.objectid import ObjectIdresult = collection.find_one({''''''''_id'''''''': ObjectId(''''''''593278c115c2602667ec6bae'''''''')})print(result)# 其查询结果依然是字典类型,运行结果:# {... 阅84 转1 评0 公众公开 19-04-26 22:02 |
CFUNCTYPE工厂函数使用普通的cdecl调用约定为回调函数创建类型,在Windows上,WINFUNCTYPE工厂函数使用stdcall调用约定为回调函数创建类型。外部函数的实例也是C兼容的数据类型; 它们代表C函数指针。函数原型类似于C中的函数原型; 它们描述了一个函数(返回类型,参数类型,调用约定)而没有定义实现。当外部函数的argtypes元组中存在类型时,... 阅3156 转4 评0 公众公开 19-04-17 02:42 |
阅899 转2 评0 公众公开 19-04-17 02:33 |
/usr/bin/env python # -*- coding: utf-8 -*- from win32com.client import Dispatch import win32com.client class easyExcel: """A utility to make it easier to get at Excel. Remembering to save the data is your problem, as is error handling. Operates on one workbook at a time.""... 阅7213 转12 评0 公众公开 19-04-17 02:32 |
import win32api,win32gui,win32con.win32gui.#点击窗口buttonw=win32ui.FindWindow(clsname,windowtitle)b=w.GetDlgItem(窗口id)b.postMessage(win32con.BM_CLICK)#关闭窗体import win32uiimport win32conwnd=win32ui.FindWindow(classname,None)wnd.SendMessage(win32con.WM_CLOSE) 成功!import win32uiw=win32ui.最小化窗体w=win32gui.Fin... 阅1462 转3 评0 公众公开 19-04-16 16:56 |
参数# CB_Handle为下选框句柄,PCB_handle下选框父窗口句柄if win32api.SendMessage(CB_handle, win32con.CB_SETCURSEL, 1, 0) == 1:# 下选框的父窗口命令# 参数:父窗口句柄;SendMessage(PCB_handle, win32con.参数IParambufSize = win32api.SendMessage(subHandle, win32con.WM_GETTEXTLENGTH, 0, 0) +1# 利用api生成BufferstrBuf = win32gu... 阅1578 转2 评0 公众公开 19-04-16 16:46 |
import win32guiimport win32conimport win32api.SendMessage(PCB_handle, win32con.# 鼠标单击事件#鼠标定位到(30,50)win32api.SetCursorPos([30,150])#执行左单键击,若需要双击则延时几毫秒再点击一次即可win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP | win32con.MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)#右键单击win32api.mouse_event(win... 阅474 转4 评0 公众公开 19-04-16 16:45 |
QQ截图时窗口自动识别的原理(WindowFromPoint, ChildWindowFromPoint, ChildWindowFromPointEx,RealChildWindowFromPoin CWP_ALLDoes not skip any child windowsCWP_SKIPINVISIBLESkips invisible child windowsCWP_SKIPDISABLEDSkips disabled child windowsCWP_SKIPTRANSPARENTSkips transparent child windows。另外我们可以在启动QQ截图后,通过Windows键激活任务栏,然后改变通过任务栏最小化或是关闭某个包含在截图内的窗口,再继续截图就会发现QQ没法识别了... 阅134 转0 评0 公众公开 19-04-16 16:23 |
==============================================================================Func _ControlGetHandleByPos($sTitle, $sText, $iX, $iY) Local $hWin, $hControl Local $iControls, $iLoop, $iUniqueControls Local $sClassList, $sClass, $sClassID Local $aiControlPos, $avUniqueControls[1][2]; 阅24 转0 评0 公众公开 19-04-16 02:51 |
Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]UIA_RangeValueIsReadOnlyPropertyId :=TrueUIA_RangeValueLargeChangePropertyId :=0UIA_RangeValueMaximumPropertyId :=0UIA_RangeValueMinimumPropertyId :=0UIA_RangeValueSmallChangePropertyId :=0UIA_RangeValueValuePropertyId :=0UIA_RuntimeIdPropertyId ... 阅313 转0 评0 公众公开 19-04-16 02:50 |