Leaderboard
Popular Content
Showing content with the highest reputation on 05/25/2020 in all areas
-
OnDebugMsgBox ( for the dreaded "AutoIt Error" msgbox )
Danyfirex reacted to argumentum for a topic
This is a UDF to handle the AutoIt Error msgbox when our awesome code goes I've been using trancexx's code for the longest time and since I iron some wrinkles in my ( personal use ) UDF, decided to organize it in a dignifying way and post it. The ZIP with the code is in the downloads area. I'm posting this because most other handlers use /ErrorStdOut to catch errors and they are not that common, for us great coders So makes little sense to me to run 2 EXEs for something unlikely to happen. No one made a UDF of this, so, I did. oh, ..there are things where this will be of no use, say, infinite recursion or what not, so, if the the AutoIt Error msgbox was to popup then this UDF should do it. ...let me know if you liked it, or post your views to better it. Cheers There is also an EventViewer_GetMyEntries() down this post that may come in handy.1 point -
now i dont have in this pc thunderbird and sqlite dll ,i will test tomorrow for print you cant also print https://www.autoitscript.com/autoit3/docs/libfunctions/_FilePrint.htm this is a coommand for transform in pdf by sumatra "%ProgramFiles(x86)%\SumatraPDF\SumatraPDF.exe" -print-to-default "Full Path and Name of a PDF file" echo Exit code of SumatraPDF is: %ERRORLEVEL% pause1 point
-
Ok... Now I understand what you are doing and what happens: The /RM function renames the function so doesn't match the original ignore errors name. I will have a look at this tomorrow whether that's easily fixable..... I knew this was going to be another "can of worms" ... Jos1 point
-
27 November 2019: Uploaded a new SciTE4AutoIt3.exe v19.1127.1402.0 installer.
argumentum reacted to Jos for a topic
I've uploaded a new Beta version of au3stripper that supports this directive: #Au3Stripper_Ignore_Errors=__DebugMsgBox_* and the output now is: >Running Au3Stripper (19.1127.1402.4) from:C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper cmdline: - 2.38 Iteration 1 Strip Functions result: Output 3800 lines, stripped 11057 Func lines and 12080 Commentlines - ignored 1 error(s) in UDF's defined in #Au3Stripper_Ignore_Errors. - 4.75 Iteration 2 Strip Variables result: Output 388 lines and stripped 3412 lines - 4.91 Iteration 3 Strip Variables result: Output 254 lines and stripped 134 lines - 5.00 Iteration 4 Strip Variables result: Output 249 lines and stripped 5 lines - 5.09 Iteration 5 Strip Variables result: Output 249 lines and stripped 0 lines +> Source 27490 lines 1284597 Characters. +> Stripped 14608 Func/Var lines and 12080 comment lines, Total 1270797 Characters. +> Saved 97% lines 98% Characters. An extra line will show the number of Errors ignored due to this new directive when there are any. Jos1 point -
@Exit Yep, that would work too, until MS changes the page to add another feature...1 point
-
27 November 2019: Uploaded a new SciTE4AutoIt3.exe v19.1127.1402.0 installer.
argumentum reacted to Jos for a topic
Skipping the function i assume you mean skipping reporting any issues in that function? I also see you put this line at the top: #Au3Stripper_Ignore_Errors=__DebugMsgBox_* So you would like to simply ignore any error in any of the UDF's with that mask? Jos1 point -
Alright then, UIAutomation is another way to achieve it under win 10 #include <Constants.au3> #include <Array.au3> #include "Includes\CUIAutomation2.au3" Opt("MustDeclareVars", 1) Run("control.exe desk.cpl,Settings,@Settings") GetMonitor() Func GetMonitor() Local $hWnd = WinWait("[CLASS:ApplicationFrameWindow]") ConsoleWrite($hWnd & @CRLF) Local $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation) If Not IsObj($oUIAutomation) Then Return ConsoleWrite("$oUIAutomation ERR" & @CRLF) ConsoleWrite("$oUIAutomation OK" & @CRLF) ; Get Desktop element Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement($pDesktop) $oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oDesktop) Then Return ConsoleWrite("$oDesktop ERR" & @CRLF) ConsoleWrite("$oDesktop OK" & @CRLF) ;Get application window Local $pCondition, $pElement, $oElement $oUIAutomation.CreatePropertyCondition($UIA_ClassNamePropertyId, "ApplicationFrameWindow", $pCondition) If Not $pCondition Then Return ConsoleWrite("$pCondition ERR" & @CRLF) ConsoleWrite("$pCondition OK" & @CRLF) Sleep (2000) $oDesktop.FindFirst($TreeScope_Descendants, $pCondition, $pElement) $oElement = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oElement) Then Return ConsoleWrite("$oElement ERR" & @CRLF) ConsoleWrite("Frame Window OK" & @CRLF) ; Get core window $oUIAutomation.CreatePropertyCondition($UIA_ClassNamePropertyId, "Windows.UI.Core.CoreWindow", $pCondition) If Not $pCondition Then Return ConsoleWrite("$pCondition ERR" & @CRLF) ConsoleWrite("$pCondition OK" & @CRLF) $oElement.FindFirst($TreeScope_Descendants, $pCondition, $pElement) $oElement = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oElement) Then Return ConsoleWrite("$oElement ERR" & @CRLF) ConsoleWrite("Core window OK" & @CRLF) ; Get scroll Viewer $oUIAutomation.CreatePropertyCondition($UIA_ClassNamePropertyId, "ScrollViewer", $pCondition) If Not $pCondition Then Return ConsoleWrite("$pCondition ERR" & @CRLF) ConsoleWrite("$pCondition OK" & @CRLF) $oElement.FindFirst($TreeScope_Descendants, $pCondition, $pElement) $oElement = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oElement) Then Return ConsoleWrite("$oElement ERR" & @CRLF) ConsoleWrite("Scroll Viewer OK" & @CRLF) ; Get condition (ControlType = $UIA_GroupControlTypeId) Local $oCondition $oUIAutomation.CreatePropertyCondition($UIA_ControlTypePropertyId, $UIA_GroupControlTypeId, $pCondition) $oCondition = ObjCreateInterface($pCondition, $sIID_IUIAutomationPropertyCondition, $dtagIUIAutomationPropertyCondition) If Not IsObj($oCondition) Then Return ConsoleWrite("$oCondition ERR" & @CRLF) ConsoleWrite("$oCondition OK" & @CRLF) ; Find all groups Local $pElementArray, $oElementArray, $iElements $oElement.FindAll($TreeScope_Children, $oCondition, $pElementArray) $oElementArray = ObjCreateInterface($pElementArray, $sIID_IUIAutomationElementArray, $dtagIUIAutomationElementArray) $oElementArray.Length($iElements) If Not IsObj($oElementArray) Then Return ConsoleWrite("$oElementArray ERR" & @CRLF) ConsoleWrite("$oElementArray OK" & @CRLF) ; Get array of Groups Local $aElements[$iElements] For $i = 0 To $iElements - 1 $oElementArray.GetElement($i, $pElement) $aElements[$i] = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) Next ; Get name for each group Local $vValue, $oGroup For $i = 0 To UBound($aElements) - 1 $aElements[$i].GetCurrentPropertyValue($UIA_NamePropertyId, $vValue) ConsoleWrite("Name:" & $vValue & @CRLF) If $vValue = "Plusieurs écrans" Then $oGroup = $aElements[$i] ExitLoop EndIf Next If Not IsObj($oGroup) Then Return ConsoleWrite("$oGroup ERR" & @CRLF) ConsoleWrite("$oGroup OK" & @CRLF) ; Get detect button $oUIAutomation.CreatePropertyCondition($UIA_ClassNamePropertyId, "Button", $pCondition) If Not $pCondition Then Return ConsoleWrite("$pCondition ERR" & @CRLF) ConsoleWrite("$pCondition OK" & @CRLF) $oElement.FindFirst($TreeScope_Descendants, $pCondition, $pElement) $oElement = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oElement) Then Return ConsoleWrite("$oElement ERR" & @CRLF) ConsoleWrite("Button OK" & @CRLF) $oElement.GetCurrentPropertyValue($UIA_IsOffscreenPropertyId, $vValue) If $vValue Then Send("{PGDN}") Sleep(1500) EndIf Local $tPoint = DllStructCreate("long X;long Y"), $bBool $oElement.GetClickablePoint($tPoint, $bBool) MouseClick("left", $tPoint.X, $tPoint.Y, 1, 1) EndFunc ;==>GetMonitor :1 point
-
i think thunderbird use sqlite , you can find sqlite db attach with autoit and extrapolate what you want1 point
-
IDispatch Object in Assembly
argumentum reacted to Beege for a topic
Sounds good. Definitely compare the two because the compiled example and iDispatchasm.au3 are the same thing, just one has all the source assembly code and gets compiled on the fly every time you run it with fasmg and the other has all the assembly code replaced with precompile machine code. So the example one would not need the fasmg and include folder to run where the iDispatchasm.au3 does.1 point -
As about PNG support in GUICtrlCreatePic(), there is ResourceEx UDF for this, so you can do it simply by 4 lines of code: 1) embed PNG to resources - #AutoIt3Wrapper_Res_File_Add=png_1.png, RT_RCDATA, PNG_1, 0 2) include UDF - #include 'ResourcesEx.au3' 3) create empty Pic control - $iPic_1 = GUICtrlCreatePic('', 0, 0, 100, 100) 4) set PNG image from resources to Pic control - _Resource_SetToCtrlID($iPic_1, 'PNG_1')1 point
-
[last] does indeed store the handle of the last window. All the Win... functions setup the search the same way so can't see why this wouldn't be working.1 point
-
Hi everyone, Some good news for you among all the gloom of these virus-ridden times: Nine, Subz and Danyfirex have accepted the invitation to become MVPs. Please join me in congratulating them on their new status in our community. Keep safe out there, M231 point
-
1 point
-
Works fine now for my three Monitors. Thanks!1 point
-
Behold the messiah. He cometh bearing great hope. He came to the land and is now weary, and seeketh his disciples. Assureth us the messiah that his works are great and bold. And the messiah striketh down the evil trance of xx... The messiah assureth us of his wisdom and great works. And he bringeth us the law. Even more, he punisheth the sinners and condemns them. And now the messiah rebukes the words of the great satan. Behold, the messiah proclaims the future and promises redemption! Yay he is teh messiah and I r teh prophet.1 point