AutoHotKey आउटलुक 2010 के साथ काम नहीं कर रहा है


13

मैंने एक AutoHotKey स्क्रिप्ट बनाई और इसे एक exe में संकलित किया।

मैंने तब exe चलाया और आउटलुक 2010 चलाया।

जब मैं अपने हॉटकीज़ का उपयोग करने की कोशिश करता हूं, तो मैंने परिभाषित किया कि मुझे स्टेटस बार में यह कहते हुए एक त्रुटि मिलती है कि "यह संशोधन की अनुमति नहीं है क्योंकि चयन बंद है।"

मैंने कुछ रीसर्च की है और उस एरर सीम को एक ट्रेल एंडिंग के साथ जोड़ा जाना है। लेकिन मैं एक काम कंप्यूटर पर हूं और मैं एक परीक्षण नहीं चला रहा हूं।

क्या इसे ठीक करने का कोई तरीका है?

यहाँ मेरी ahk फ़ाइल है

SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

SendMode Input ; superior speed and reliability.

SetTitleMatchMode 2 ;allow partial match to window titles

;********************
;Hotkeys for Outlook 2010
;********************
;As best I can tell, the window text ‘NUIDocumentWindow’ is not present
;on any other items except the main window. Also, I look for the phrase
; ‘ – Microsoft Outlook’ in the title, which will not appear in the title (unless
;a user types this string into the subject of a message or task).
#IfWinActive – Microsoft Outlook ahk_class rctrl_renwnd32, NUIDocumentWindow

y::HandleOutlookKeys("!hy", "y") ;calls archive macro
f::HandleOutlookKeys("^f", "f") ;forwards message
r::HandleOutlookKeys("^r", "r") ;replies to message
a::HandleOutlookKeys("^+r", "a") ;reply all
v::HandleOutlookKeys("^+v", "v") ;Move message box
+u::HandleOutlookKeys("^u", "+u") ;marks messages as unread
+i::HandleOutlookKeys("^q", "+i") ;marks messages as read (^q is read/unread toggle)
j::HandleOutlookKeys("{Down}", "j") ;move down in list
+j::HandleOutlookKeys("{Down}{Enter}", "+j") ;move down and select next item
k::HandleOutlookKeys("{Up}", "k") ;move up
+k::HandleOutlookKeys("{Up}{Enter}", "+k") ;move up and select next item
o::HandleOutlookKeys("^o", "o") ;open message
s::HandleOutlookKeys("{Insert}", "s") ;toggle flag (star)
c::HandleOutlookKeys("^n", "c") ;new message
/::HandleOutlookKeys("^e", "/") ;focus search box
.::HandleOutlookKeys("+{F10}", ".") ;Display context menu

#IfWinActive
;Passes Outlook a special key combination for custom keystrokes or normal key value, depending on context
HandleOutlookKeys( specialKey, normalKey ) {
    ;Activates key only on main outlook window, not messages, tasks, contacts, etc.
    IfWinActive, – Microsoft Outlook ahk_class rctrl_renwnd32, NUIDocumentWindow, ,
    {
        ;Find out which control in Outlook has focus
        ControlGetFocus, currentCtrl
        ;MsgBox, Control with focus = %currentCtrl%
        ;set list of controls that should respond to specialKey. Controls are the list of emails and the main (and minor) controls of the reading pane, including controls when viewing certain attachments.
        ;Currently I handle archiving when viewing attachments of Word, Excel, Powerpoint, Text, jpgs, pdfs
        ;The control ‘RichEdit20WPT1' (email subject line) is used extensively for inline editing. Thus it had to be removed. If an email’s subject has focus, it won’t archive…
        ctrlList = Acrobat Preview Window1, AfxWndW5, AfxWndW6, EXCEL71, MsoCommandBar1, OlkPicturePreviewer1, paneClassDC1, RichEdit20WPT2, RichEdit20WPT4, RichEdit20WPT5, RICHEDIT50W1, SUPERGRID1, SUPERGRID2, _WwG1
        if currentCtrl in %ctrlList%
        {
            Send %specialKey%
            ;Allow typing normalKey somewhere else in the main Outlook window. (Like the search field or the folder pane.)
        } else {
            Send %normalKey%
        }
        ;Allow typing normalKey in another window type within Outlook, like a mail message, task, appointment, etc.
        } else {
            Send %normalKey%
    }
}

एक अन्य सुझाव यह है कि यह तब हो सकता है जब कोई दस्तावेज़ संरक्षित है। मुझे नहीं पता कि क्या यह प्रासंगिक है, लेकिन आपको जांच का रास्ता दे सकता है?
स्टुअर्ट मैकलॉघलिन

क्यों "SendMode इनपुट?" दो बार लाइन? क्या यह उद्देश्य है या यह केवल एक कॉपी और पेस्ट त्रुटि थी?
sbtkd85

क्या यह 2003 में माइक्रोसॉफ्ट द्वारा आउटलुक द्वारा पेश की गई बढ़ी हुई सुरक्षा से संबंधित नहीं है?

मैं यहां इस सवाल पर लड़खड़ाता रहता हूं, और एक बात है जो हर बार मेरे दिमाग में आती है: क्यों पृथ्वी पर आप ऑटोहॉट्की फोरम पर यह सवाल नहीं पूछते? इस तरह की समस्याओं के लिए वहां बहुत विशेषज्ञता है।
उपयोगकर्ता 99572

क्या आपने यह सुनिश्चित करने के लिए जाँच की है कि आउटलुक सक्रिय हो गया है? आप इसे File-> Help पर जाकर चेक कर सकते हैं।
cmorse

जवाबों:


1

मुझे आपकी त्रुटि नहीं मिली, लेकिन विफलता के एक संभावित बिंदु और दो अन्य चीजों की खोज की। शायद उन को सही करना या कम से कम मापदंडों के साथ खेलना।

प्रासंगिक नियंत्रण वाली चेकलिस्ट

ctrlList = Acrobat Preview Window1,AfxWndW5,AfxWndW6,EXCEL71,MsoCommandBar1,OlkPicturePreviewer1,paneClassDC1,RichEdit20WPT2,RichEdit20WPT4,RichEdit20WPT5,RICHEDIT50W1,SUPERGRID1,SUPERGRID2,_WwG1

मैंने सभी स्थानों को हटा दिया, जो संबंधित ऑटोहोटेक दस्तावेज़ से उद्धृत है:

स्ट्रिंग्स की अल्पविराम से अलग सूची, जिनमें से प्रत्येक की तुलना एक मैच के लिए वार की सामग्री से की जाएगी। परिसीमन अल्पविराम के आसपास कोई भी स्थान या टैब महत्वपूर्ण हैं, जिसका अर्थ है कि वे मैच स्ट्रिंग का हिस्सा हैं। उदाहरण के लिए, यदि माचिस को एबीसी, एक्सवाईजेड के लिए सेट किया गया है, तो वार में एबीसी या तो एबीसी के साथ एक अनुगामी स्थान या एक्सवाईजेड होना चाहिए जिसमें एक प्रमुख स्थान होता है।

विंडो डिटेक्शन

#IfWinActive - Microsoft Outlook ahk_class rctrl_renwnd32

"NUIDocumentWindow" चीज तब दिखाई नहीं देती जब मैं विंडो जासूस चला रहा होता हूं। उसी कुंजी-भेजने-समारोह के भीतर प्रासंगिक लाइन के लिए चला जाता है:

IfWinActive, - Microsoft Outlook ahk_class rctrl_renwnd32
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.