小编Pro*_*ica的帖子

如何在Outlook(2010)全局地址列表中搜索名称?

我有一个名单,其中一些是完整的,一些是截断的.我想在Outlook地址列表中搜索这些名称的匹配项.

我最接近的是这个来自ActiveState Code的 Python代码,但是它不搜索全局地址,只搜索我的(本地?)列表,其中有3个地址,这显然是不对的.应该有成千上万的记录.

任何提示欢迎.我用Google搜索并阅读了几十页,但没有结论.我宁愿不直接连接到LDAP,我认为这是我的组织中的政策违规,除此之外我不确定是否可能.如果可能,希望通过Outlook API执行此操作.

DEBUG=1

class MSOutlook:
    def __init__(self):
        self.outlookFound = 0
        try:
            self.oOutlookApp = \
                win32com.client.gencache.EnsureDispatch("Outlook.Application")
            self.outlookFound = 1
        except:
            print("MSOutlook: unable to load Outlook")

        self.records = []


    def loadContacts(self, keys=None):
        if not self.outlookFound:
            return

        # this should use more try/except blocks or nested blocks
        onMAPI = self.oOutlookApp.GetNamespace("MAPI")
        ofContacts = \
            onMAPI.GetDefaultFolder(win32com.client.constants.olFolderContacts)

        if DEBUG:
            print("number of contacts:", len(ofContacts.Items))

        for oc in range(len(ofContacts.Items)):
            contact = ofContacts.Items.Item(oc + 1)
            if contact.Class == win32com.client.constants.olContact:
                if keys is None:
                    # …
Run Code Online (Sandbox Code Playgroud)

python perl outlook vba outlook-2010

3
推荐指数
2
解决办法
3365
查看次数

如何使用C语言确定存储类型(SSD驱动器或HHD.机械驱动器)

如何从C程序中读取驱动器的硬件信息?(即确定驱动器是SSD还是机械磁盘.)

c linux windows solid-state-drive

2
推荐指数
1
解决办法
7598
查看次数

HTML 5真的可以Win 32call吗?

在本教程http://www.codeproject.com/KB/IP/ThinVnc.aspx中它说:

ThinVNC不是传统的VNC,因为它没有实现AT&T RFB协议.相反,它建立在当今的Web标准之上:AJAX,JSON和HTML5.

但是在查看代码时,对我来说似乎是Delphi,所以有人可以解释上面的句子真正意味着什么:HTML 5是否真的能够调用OS?

TWin = class(TObject)
private
  Wnd : Hwnd;
  Rect : TRect;
  Pid : Cardinal;
public
  constructor Create(AWnd:HWND;ARect:TRect;APid:Cardinal);
end;

function EnumWindowsProc(Wnd: HWnd; const obj:TList<TWin>): Bool; export; stdcall;
var ProcessId : Cardinal;
  R,R1 : TRect;
  Win : TWin;
begin
  Result:=True;
  GetWindowThreadProcessId(Wnd,ProcessId);
  if IsWindowVisible(Wnd) and not IsIconic(wnd)then begin
    GetWindowRect(Wnd,R);
    IntersectRect(R1,R,Screen.DesktopRect);
    if not IsRectEmpty(R1) then begin
      win := TWin.Create(Wnd,R,ProcessId);
      obj.Add(win);
    end;
  end;
end;

procedure GetProcessWindowList(WinList:TList<TWin>);
begin
  WinList.Clear;
  EnumWindows(@EnumWindowsProc, Longint(WinList));
end;
Run Code Online (Sandbox Code Playgroud)

c delphi winapi html5

2
推荐指数
1
解决办法
1288
查看次数

Python脚本不通过Cron工作?

我有一个运行另一个python脚本的python脚本."其他脚本"(正在运行的脚本)需要大约45 [min]才能完成.

当'执行'脚本从Ubuntu的shell运行时,它完全正常.

我在cron中添加了一个条目来运行'execution'python脚本.它似乎首先运行,但程序在几秒后终止:


user@internet:~/REMOTE_CONTROL$ ps aux | grep python
user      1603  0.0  1.4  31504 15184 ?        S    22:50   0:00 python /usr/share/system-config-printer/applet.py

root      1714  0.0  0.7  13672  8012 ?        S    22:51   0:00 /usr/bin/python /usr/lib/system-service/system-service-d

**user      7956  109  1.0  14380 10692 ?        R    23:48   0:01 python /media/READ_ONLY/DEVELOPER/COMPOSITE/CURRENT/DataLoader.py**

user      8029  0.0  0.0   3320   788 pts/1    S+   23:48   0:00 grep --color=auto python
user@internet:~/REMOTE_CONTROL$ ps aux | grep python

user      1603  0.0  1.4  31504 15184 ?        S    22:50   0:00 python /usr/share/system-config-printer/applet.py

root      1714  0.0 …
Run Code Online (Sandbox Code Playgroud)

python linux ubuntu cron

2
推荐指数
1
解决办法
1379
查看次数

黑莓手机中的弹出窗口

单击按钮时如何创建弹出窗口?

blackberry java-me

2
推荐指数
1
解决办法
3499
查看次数

堆栈上的整数推送错误

我试图理解为什么是指令:

 pushl  0x4013ea
Run Code Online (Sandbox Code Playgroud)

没有推动预期的价值,而是我把它放在堆栈上:

(gdb) x/wx $esp
0x22ff18:       0xc3899090
Run Code Online (Sandbox Code Playgroud)

我在Windows上使用gdb,如果这可以帮助

谢谢

assembly gdb push

2
推荐指数
1
解决办法
278
查看次数

如何在BlackBerry中修复垂直和纵向屏幕的对齐方式?

我想做即使屏幕改为纵向或横向也不会改变UI的应用程序.怎么做?

blackberry

2
推荐指数
1
解决办法
942
查看次数

为什么NSFileManager无法打开文件?

NSFileManager* fileManager = [NSFileManager defaultManager];
NSURL* url = [[fileManager URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] lastObject];
NSLog(@"%@",url);
NSString* directory = [url absoluteString];
NSLog(@"%@",directory);
if (![fileManager fileExistsAtPath:directory]) NSLog(@"error!!!");
Run Code Online (Sandbox Code Playgroud)

这是上面代码生成的日志:

2012-04-03 15:45:02.298 TopPlaces[805:13303] file://localhost/Users/yzyoyosir/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/2D6EC144-CF85-4994-8904-8FF5F8407FED/Library/Caches/
2012-04-03 15:45:02.300 TopPlaces[805:13303] file://localhost/Users/yzyoyosir/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/2D6EC144-CF85-4994-8904-8FF5F8407FED/Library/Caches/
2012-04-03 15:45:02.301 TopPlaces[805:13303] error!!!
Run Code Online (Sandbox Code Playgroud)

为什么我在这里收到错误.我的意思是为什么目录不存在?

iphone objective-c nsfilemanager ios

2
推荐指数
1
解决办法
1085
查看次数

用于创建Android程序的替代语言或工具链

是否有某种替代工具链或Android语言,可以生成独立的APK文件?

理想情况下,应该依赖于庞大的,不断变化,不断升级官方Android SDK.

尽管微软一直在发布新的Visual Studios,但我正在寻找一个与PowerBASICMingw如何针对普通Windows完全正常的粗略对等.

如果此语言或工具链本身是Android程序,则奖励积分......

ide android dalvik toolchain apk

2
推荐指数
1
解决办法
733
查看次数

无法在我的mac上使用brew安装软件?

我正在使用brew安装一些软件,当我尝试安装软件时,我得到了这个:

localhost:~ timger$ brew install autoconf
Error: No available formula for autoconf
localhost:~ timger$ brew install automake
Error: No available formula for automake
localhost:~ timger$ brew install libtool
Error: No available formula for libtool
localhost:~ timger$ brew install pkg-con
Run Code Online (Sandbox Code Playgroud)

macos homebrew cpython libtool

2
推荐指数
1
解决办法
2115
查看次数