Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/03/2017 in all areas

  1. iamtheky

    Autoit support

    We had ranorex, and I still wrote AutoIt scripts for my job 100% of the time. Keep generating solutions and teach your peers to do the same, the speed with which you can complete scripts in AutoIt and their effectiveness will be the greatest influences in getting traction in-house for AutoIt. Even if they have no hope of going to prod, building replicas of solutions will highlight the flexibility of the language so that co-workers start asking 'can you do x in AutoIt?' , because that eventually changes to 'can you do x?' , which eventually changes to 'You better have x done by tomorrow.' I have dropped scripts on, and deployed several tactical US Army systems at multiple classification levels with AutoIt and the US Army Golden Master deployed applications with AutoIt for many years. It is not a question of capabilities, only of adoption and support as with every technical solution ever.
    2 points
  2. JLogan3o13

    Autoit support

    Agreed. There are many of us that use AutoIt and other languages in a corporate environment - when looking to implement a homegrown app written in Java or C#, you don't go looking for a vendor that does nothing but support Java and C#. You bring in people with the aptitude to learn the language and then provide them the training they need. This forum will provide you with all you need from that aspect. That said, if your company is adamant about wanting a consulting vendor, perhaps Jon is looking for new clients: https://www.autoitconsulting.com/site/
    2 points
  3. junkew

    Autoit support

    So what would be different if your company buys testcomplete ranorex hp leanft or other top commercial tools? AutoIt can do a lot but it first of all depends on which object technologies you want to test. Apple ios mobile is hard from autoit and will quickly depend on mobile webdriver solutions. If your company puts a message in the forum for a certain hourly rate you will find experts easily.
    1 point
  4. BrewManNH

    Error Logging Problem

    The ObjEvent only catches COM errors.
    1 point
  5. BrewManNH

    Error Logging Problem

    There is no try/catch or OnError in AutoIt, although there is a way to catch Object errors using ObjEvent and "AutoIt.Error". Here's how you can do it with the existing code you have. #Region Header #comments-start Title: Computer Information Automation UDF Library for AutoIt3 - EXAMPLES Filename: CompInfoExamples.au3 Description: Examples using the UDF's from CompInfo.au3 Author: Jarvis J. Stubblefield (JSThePatriot) http://www.vortexrevolutions.com/ Version: 00.03.08 Last Update: 11.09.06 Requirements: AutoIt v3.2 +, Developed/Tested on WindowsXP Pro Service Pack 2 Notes: Errors associated with incorrect objects will be common user errors. AutoIt beta 3.1.1.63 has added an ObjName() function that will be used to trap and report most of these errors. Special thanks to Firestorm (Testing, Use), Koala (Testing, Bug Fix), and everyone else that has helped in the creation of this Example File. #comments-end #EndRegion Header #Region Global Variables and Constants If Not (IsDeclared("$cI_CompName")) Then Global $cI_CompName = @ComputerName EndIf Global Const $cI_VersionInfo = "00.03.08" Global Const $cI_aName = 0, _ $cI_aDesc = 4 Global $wbemFlagReturnImmediately = 0x10, _ ;DO NOT CHANGE $wbemFlagForwardOnly = 0x20 ;DO NOT CHANGE Global $ERR_NO_INFO = "Array contains no information", _ $ERR_NOT_OBJ = "$colItems isnt an object" #EndRegion Global Variables and Constants #Region Boot Configuration Dim $BootConfig _ComputerGetBootConfig($BootConfig) If @error Then $error = @error $extended = @extended Switch $extended Case 1 _ErrorMsg($ERR_NO_INFO) Case 2 _ErrorMsg($ERR_NOT_OBJ) EndSwitch EndIf For $i = 1 To $BootConfig[0][0] Step 1 MsgBox(0, "Test _ComputerGetBootConfig", "Name: " & $BootConfig[$i][0] & @CRLF & _ "Boot Directory: " & $BootConfig[$i][1] & @CRLF & _ "Configuration Path: " & $BootConfig[$i][2] & @CRLF & _ "Last Drive: " & $BootConfig[$i][3] & @CRLF & _ "Description: " & $BootConfig[$i][4] & @CRLF & _ "Scratch Directory: " & $BootConfig[$i][5] & @CRLF & _ "Setting ID: " & $BootConfig[$i][6] & @CRLF & _ "Temp Directory: " & $BootConfig[$i][7]) Next #EndRegion Boot Configuration #Region ---- Internal Functions Func _ErrorMsg($message, $time = 0) MsgBox(48 + 262144, "Error!", $message, $time) ConsoleWrite("Error!" & $message & $time & @CRLF) EndFunc ;==>_ErrorMsg #EndRegion ---- Internal Functions Func _COMErrFunc() ; <<<<<<<<<<<<<<<<<<<<<<<< _ErrorMsg($ERR_NOT_OBJ) EndFunc ;==>_COMErrFunc Func _ComputerGetBootConfig(ByRef $aBootConfigInfo) Local $oError = ObjEvent("AutoIt.Error", "_COMErrFunc") ; <<<<<<<<<<<<<<<<<<< Local $colItems, $objWMIService, $objItem Dim $aBootConfigInfo[1][8], $i = 1 $objWMIService = ObjGet("winmgmts:\\" & $cI_CompName & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BootConfiguration", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems ReDim $aBootConfigInfo[UBound($aBootConfigInfo) + 1][8] $aBootConfigInfo[$i][0] = $objItem.Name $aBootConfigInfo[$i][1] = $objItem.BootDirectory $aBootConfigInfo[$i][2] = $objItem.ConfigurationPath $aBootConfigInfo[$i][3] = $objItem.LastDrive $aBootConfigInfo[$i][4] = $objItem.Description $aBootConfigInfo[$i][5] = $objItem.ScratchDirectory $aBootConfigInfo[$i][6] = $objItem.SettingID $aBootConfigInfo[$i][7] = $objItem.TempDirectory $i += 1 Next $aBootConfigInfo[0][0] = UBound($aBootConfigInfo) - 1 If $aBootConfigInfo[0][0] < 1 Then SetError(1, 1, 0) EndIf Else SetError(1, 2, 0) EndIf EndFunc ;==>_ComputerGetBootConfig Although, I'd write your code this way to check to see if the ObjGet worked first, before checking for WMI values. ; What you have $objWMIService = ObjGet("winmgmts:\\" & $cI_CompName & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BootConfiguration", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then ; another way of doing it. $objWMIService = ObjGet("winmgmts:\\" & $cI_CompName & "\root\CIMV2") If IsObj($objWMIService) Then ; <<<<<<<<<<<<<<<<< Note change of variable name $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BootConfiguration", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    1 point
  6. My apologies, I don't know what I was doing wrong but it's working Thanks @czardas @JLogan3o13
    1 point
  7. TheSaint

    KindEbook Wishlist

    F.Y.I. Finally found a use for the Dummy control, thanks to a comment by TheDcoder, when I explained my workable but not as good first Accelerator Keys attempt. I'd always wondered what Dummy controls could be useful for. Thanks bud. Initially I'd just added some controls as right-click menu items for the Info button, which was quite workable, and so not a problem, but I like the dummy control idea better ... even if just because I finally found an excellent use for them. P.S. I'd needed to create extra controls, because existing ones were part of the dynamic right-click menu that is only created when you right click a list entry, and so not available otherwise.
    1 point
  8. It's still not clear from the text file. Anyway, you might want to use FileReadToArray() - see help file. Once you have read the file to an array, perhaps you can do something like the following. As you can see, I'm not entirely sure if you are looking for the word numbers or actual numbers, so I give two examples. #include <Array.au3> Local $aArray = ["part","numbers","part","6.7","party","numbers","rand","part","more numbers"] _ArrayDisplay($aArray) ConsoleWrite("First Example:" & @CRLF) For $i = 0 To UBound($aArray) -2 ; only loop as far as the penultimate element - to avoid array bounds errors If StringInStr($aArray[$i], "part") And StringInStr($aArray[$i +1], "numbers") Then ConsoleWrite("verified at elements " & $i & " and " & ($i +1) & " - " & $aArray[$i] & " " & $aArray[$i +1] & @CRLF) EndIf Next ConsoleWrite(@CRLF & "Second Example:" & @CRLF) For $i = 0 To UBound($aArray) -2 If StringInStr($aArray[$i], "part") And (StringIsDigit($aArray[$i +1]) Or StringIsFloat($aArray[$i +1])) Then ConsoleWrite("verified at elements " & $i & " and " & ($i +1) & " - " & $aArray[$i] & " " & $aArray[$i +1] & @CRLF) EndIf Next Of course, you need to decide exactly what you need to verify and probably use stricter filtering: partial or exact match with, or without, whitespace etc... Hopefully the code will give you some clues. SEE EDITS
    1 point
  9. ju4711, Is this what you are trying to do...? ; *** Start added by AutoIt3Wrapper *** #include <GUIConstantsEx.au3> ; *** End added by AutoIt3Wrapper *** #include <WindowsConstants.au3> #AutoIt3Wrapper_Add_Constants=n #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("My MsgBox", 654, 221, 174, 117) $Exit = GUICtrlCreateMenu("&Exit") $Credits = GUICtrlCreateMenu("&Credits") $Help = GUICtrlCreateMenu("&Help") $Generate = GUICtrlCreateButton("Generate", 248, 128, 155, 49) $Error = GUICtrlCreateRadio("Error (Icon)", 32, 48, 115, 17) GUICtrlSetState(-1, $GUI_CHECKED) $Warning = GUICtrlCreateRadio("Warning (Icon)", 32, 96, 115, 17) $Information = GUICtrlCreateRadio("Information (Icon)", 32, 144, 115, 17) $Title = GUICtrlCreateInput("Type in your title here.", 248, 48, 153, 21) $Message = GUICtrlCreateInput("Type in your message here.", 248, 88, 153, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### #NoTrayIcon Local $finalicon While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Generate If GUICtrlRead($Error) = $GUI_CHECKED Then $finalicon = 16 If GUICtrlRead($Warning) = $GUI_CHECKED Then $finalicon = 48 If GUICtrlRead($Information) = $GUI_CHECKED Then $finalicon = 64 $FinalTitle = GUICtrlRead($Title) $FinalMessage = GUICtrlRead($Message) MsgBox($finalicon, $FinalTitle, $FinalMessage) EndSwitch WEnd kylomas
    1 point
×
×
  • Create New...