Leaderboard
Popular Content
Showing content with the highest reputation on 04/13/2017 in all areas
-
Version 1.7.0.1
10,054 downloads
Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate items (folders, mails, contacts ...) in the background. Can be seen like an API. There are other UDFs available to automate Outlook: OutlookEX_GUI: This UDF holds the functions to automate the Outlook GUI. OutlookTools: Allows to import/export contacts and events to VCF/ICS files and much more. Threads: Development - General Help & Support - Example Scripts - Wiki BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2020-02-09) None1 point -
Hi all, Hope you all have not abandoned the project yet Giving a long weekend ahead of us and bad weather, give us all lot's of free time. Lets recapitulate where we are : Most of the things are working, EXCEPT we are not able yet to get access to the native .NET Classes - Methods / Properties / Events etc, Using the _CRL_CreateObject(), not even with the multi parameter version that was created by Larsj ... Information so far : Apart from the security issues that might be in the middle see post 121. Which I am not convinced that this is the mean reason why it is not working. I found this article showing a working version in VBA : Start reading as of http://stackoverflow.com/questions/37074533/how-to-call-net-methods-from-excel-vba See this example code : If you look at this you can definitely access native .Net Classes. in an unmanaged Host. Keep in mind that in this code they CorBindToRuntimeEX function, which is obsolete on the meantime. And replaced by the CreateInstance function is CLR. Review : A. This code made me go back to the drawing board and think why does it not work when we instantiate the Object. And AFTERWARD try to access the methods ? B. So we need to take 1 step back and have a look in which functions are available in the CLR APDDOMAIN function has to offer ? And what we see is that in the MSCORLIB -> Appdomain there it is where it is ALL HAPPENING : Global Const $sIID_IAppDomain = "{05F696DC-2B29-3663-AD8B-C4389CF2A713}" Global Const $sTag_IAppDomain = _ ... "remove_AssemblyResolve hresult();" & _ "add_UnhandledException hresult();" & _ "remove_UnhandledException hresult();" & _ "DefineDynamicAssembly hresult();" & _ "DefineDynamicAssembly_2 hresult();" & _ "DefineDynamicAssembly_3 hresult();" & _ "DefineDynamicAssembly_4 hresult();" & _ "DefineDynamicAssembly_5 hresult();" & _ "DefineDynamicAssembly_6 hresult();" & _ "DefineDynamicAssembly_7 hresult();" & _ "DefineDynamicAssembly_8 hresult();" & _ "DefineDynamicAssembly_9 hresult();" & _ "CreateInstance hresult(bstr;bstr;object*);" & _ "CreateInstanceFrom hresult();" & _ "CreateInstance_2 hresult();" & _ "CreateInstanceFrom_2 hresult();" & _ "CreateInstance_3 hresult();" & _ "CreateInstanceFrom_3 hresult();" & _ "Load hresult();" & _ "Load_2 hresult();" & _ "Load_3 hresult();" & _ ... Meaning that the we need to access the methods as is demontrated in the VBA example. Starting off from the Appdomain using the unique Assembly referance like for example ; mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 and not after the the creation of the CRL_CREATEOBJECT ? If you take a look using ILSpy in the MSCORLIB you will see that the majority .NET framework is relying on this single Assembly/ We are not far of from getting it done ... believe me MSCORLIB is where the gold is ... I will try to post some trial and errors later today, to see how far I get ... I hope you guys are not giving up this close to the finish line ?1 point
-
[Solved]: Insert superscript numbers in word document before delimiters: Need Help!
KickStarter15 reacted to Subz for a topic
Sorry got a lot on at the moment, can you try: #include <Array.au3> #include <Word.au3> Local $oWord = _Word_Create() Local $sDocument = @ScriptDir & "\WordFile.docx" Local $oDoc = _Word_DocOpen($oWord, $sDocument, Default, Default, True) Local $oFindRange, $oLastRange, $oNextRange, $i = 0 $oWord.Selection.HomeKey($wdStory) Local $aHeadings[0] For $j = 1 To $oDoc.Paragraphs.Count If StringInStr($oDoc.Paragraphs($j).Range.text, ", ") And $oDoc.Paragraphs($j).Range.Bold = True Then $i += 1 If $i = 1 Then $oNextRange = $oDoc.Paragraphs($j + 1).Range $oLastRange = $oDoc.Paragraphs($i).Range ElseIf $i > 1 Then $oNextRange = $oDoc.Paragraphs($j + 1).Range $oDoc.Paragraphs($j).Range.Cut $oRange = $oDoc.Range($oLastRange.End, $oLastRange.End) $oRange.Paste $oLastRange = $oDoc.Paragraphs($i).Range EndIf $oDoc.Paragraphs($i).Range.InsertBefore($i) $oDoc.Range($oDoc.Paragraphs($i).Range.Start, $oDoc.Paragraphs($i).Range.Start + 1).Font.Superscript = True $oFindRange = _Word_DocFind($oDoc, ", ", -1, $oDoc.Paragraphs($j).Range) If Not @error Then $oRange = _Word_DocRangeSet($oDoc, $oFindRange, Default, Default, $wdCharacter, 0) $oRange.Delete $oRange.InsertBreak($wdLineBreak) EndIf EndIf If IsObj($oNextRange) And StringInStr($oNextRange.text, "; ") Then $oFindRange = $oNextRange $oFindRange.Find.ClearFormatting $oFindRange.Find.text = "; " $iEndRange = $oFindRange.End Do $oFindRange.Find.Execute If $oFindRange.Find.Found Then $oFindRange.Text = $i & $oFindRange.Text $oFindRange.Start = $oFindRange.Start $oFindRange.End = $oFindRange.Start + 1 $oFindRange.Font.Superscript = True $oFindRange.Start += 2 $oFindRange.End = $iEndRange EndIf Until $oFindRange.Find.Found = False $oDoc.Range($oDoc.Paragraphs($i + $i).Range.Start, $oDoc.Paragraphs($i + $i).Range.End - 1).InsertAfter($i) $oDoc.Range($oDoc.Paragraphs($i + $i).Range.End - 2, $oDoc.Paragraphs($i + $i).Range.End - 1).Font.Superscript = True EndIf Next1 point -
_IsPressed('20') dont work well (SPACEBAR)
232showtime reacted to Melba23 for a topic
Verssuss, Pressing the Spacebar actions the default control - this is a Windows default, nothing to do with AutoIt. I suggest creating a dummy control to which you can give focus so that the main button does not get actioned: #include <Misc.au3> #include <MsgBoxConstants.au3> #include <GUIConstantsEx.au3> $GUI = GUICreate("set hotkeys") GUISetState() $button_hotkey = (GUICtrlCreateButton("", 80, 30, 150, 25)) $cDummy = GUICtrlCreateButton("Dummy", 80, 100, 150, 25) ; Here is your dummy control <<<<<<<<<<<<< Local $hDLL = DllOpen("user32.dll") $start = False While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE DllClose($hDLL) ; If you open it then you must close it <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Exit Case $button_hotkey $start = True GUICtrlSetData($button_hotkey, "Press Hot Key") GUICtrlSetState($cDummy, $GUI_FOCUS) ; Give focus to the dummy <<<<<<<<<<<<<<<<<<<<<<<<< EndSwitch If $start = True And _IsPressed('20', $hDLL) Then $start = False $klawisz1 = "SPACEBAR" GUICtrlSetData($button_hotkey, $klawisz1) $start = False ;~ Beep(500) EndIf If $start = True And _IsPressed('31', $hDLL) Then $klawisz1 = "1" GUICtrlSetData($button_hotkey, $klawisz1) $start = False EndIf If $start = True And _IsPressed('41', $hDLL) Then $klawisz1 = "a" GUICtrlSetData($button_hotkey, $klawisz1) $start = False EndIf If $start = True And _IsPressed('70', $hDLL) Then $klawisz1 = "F1" GUICtrlSetData($button_hotkey, $klawisz1) $start = False EndIf WEnd M231 point -
1 point
-
Word - Insert a row in table
abdulrahmanok reacted to water for a topic
It works this way: #include <Word.au3> $oWord = _Word_Create() $oDoc = _Word_DocOpen($oWord, "C:\temp\test.docx") $oRow = $oDoc.Tables(1).Rows(1).Select $oWord.Selection.InsertRowsBelow(1)1 point -
Check Internet Connection
ahmeddzcom reacted to rasim for a topic
DCCD Another way: $connect = _GetNetworkConnect() If $connect Then MsgBox(64, "Connections", $connect) Else MsgBox(48, "Warning", "There is no connection") EndIf Func _GetNetworkConnect() Local Const $NETWORK_ALIVE_LAN = 0x1 ;net card connection Local Const $NETWORK_ALIVE_WAN = 0x2 ;RAS (internet) connection Local Const $NETWORK_ALIVE_AOL = 0x4 ;AOL Local $aRet, $iResult $aRet = DllCall("sensapi.dll", "int", "IsNetworkAlive", "int*", 0) If BitAND($aRet[1], $NETWORK_ALIVE_LAN) Then $iResult &= "LAN connected" & @LF If BitAND($aRet[1], $NETWORK_ALIVE_WAN) Then $iResult &= "WAN connected" & @LF If BitAND($aRet[1], $NETWORK_ALIVE_AOL) Then $iResult &= "AOL connected" & @LF Return $iResult EndFunc1 point