Search the Community

Showing results for tags 'error'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Chat
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 73 results

  1. Hi all, I have a bit of code that works on my old Win10 PC, that fails on my new Win10 PC, and I think the only significant difference is the version of Autoit - old PC has 3.3.12, new has 3.3.14. I couldn't find anything mentioned in the change logs though, so perhaps I'm wrong. Anyway, the code to replicate my issue is: Test('username', 'DOMAIN') ; THIS ERRORS: ;Test('localun', 'DOMAIN') ; THIS ERRORS: ;Test(' ', ' ') ; THIS ERRORS: ;Test('', '') ; THIS ERRORS: ;Test('localun', '') ; THIS ERRORS: ;Test('', 'DOMAIN') Func Test($un, $dom) $compName = 'PCNAME' $FullName = '.' $Description = '.' ; get the WIM object $objWMIService = ObjGet("winmgmts:\\" & $compName & "\root\cimv2") ; get default user full name and description $objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'") If IsObj($objAccount) Then $FullName = $objAccount.FullName $Description = $objAccount.Description EndIf ConsoleWrite($FullName & @CRLF) ConsoleWrite($Description & @CRLF) Return EndFunc On my old PC this code will output just . and . for each of those line currently commented out. Which is fine. On my new PC any of those commented out lines of code cause an error, and the script won't even compile. $objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'") $objAccount = $objWMIService^ ERROR I'm very much a newb with the WMI stuff and objects, but it looks like the .Get property is failing when either $un or $dom aren't valid in v3.3.14, whereas in 3.3.12 the .Get would fail to return an object, which is then caught by the If statement. Am I on track with this? Is there some new/better way to code the example so that 3.3.14 will compile it?
  2. Function Reference _AutoItErrorTrap.au3 UDF to intercept the error window of AutoIt, showing more details about the error, including ability to save and send by email! (Detection and treatment of errors in the AutoIt scripts!) Sintax: ; Adding the directives below, will cause your program be compiled with the indexing of the original lines shown in SciTE: #AutoIt3Wrapper_Run_Before=ShowOriginalLine.exe %in% #AutoIt3Wrapper_Run_After=ShowOriginalLine.exe %in% ;Or you can use the program "ShowOriginalLine.exe" directly and choose the script you want to add support to show the original lines! #include "_AutoItErrorTrap.au3" ; _AutoItErrorTrap ([sTitle [, sText [, fUseCallBack]]]) _AutoItErrorTrap()Supports: ;Error detection in your AutoIt script and local #Includes! ;According to the AutoIt Help, the definition for "local Includes" is: ;------------------------------------------------------------------------------ ;If "..." is used, the filename is taken to be relative to the current script. ;------------------------------------------------------------------------------ ;This means that for you to have your UDF or other external module with support to show the original lines, one should use as follows: #include "[path] filename" ; See the AutoIt help for more details.Downloads: Version: 0.11 _AutoItErrorTrap_(RedirectLink).html Note: The error detection is performed in the same executable, does not requiring opening two .exes for this action! Works with CUI too. Usage example is included! (You need to compile first, but it also work with non compiled scripts using context menu [Run Script...]) Sample: More sample: Fixes: #ShowLine_Off $hForm = GUICreate("My GUI menu", 480, 360) $iFileMenu = GUICtrlCreateMenu("&File") $iFileItem = GUICtrlCreateMenuItem("Open", $iFileMenu) GUICtrlSetState(-1, $GUI_DEFBUTTON) $iHelpMenu = GUICtrlCreateMenu("?") GUICtrlCreateMenuItem("Save", $iFileMenu) GUICtrlSetState(-1, $GUI_DISABLE) #ShowLine_OnWithout them the rows above would be as follows: $__iLineNumber=1 & " - " & '$hForm = GUICreate("My GUI menu", 480, 360)...' $hForm = GUICreate("My GUI menu", 480, 360) $__iLineNumber=3 & " - " & '$iFileMenu = GUICtrlCreateMenu("&File")' $iFileMenu = GUICtrlCreateMenu("&File") $__iLineNumber=4 & " - " & '$iFileItem = GUICtrlCreateMenuItem("Ope...' $iFileItem = GUICtrlCreateMenuItem("Open", $iFileMenu) $__iLineNumber=5 & " - " & 'GUICtrlSetState(-1, $GUI_DEFBUTTON)' GUICtrlSetState(-1, $GUI_DEFBUTTON) $__iLineNumber=6 & " - " & '$iHelpMenu = GUICtrlCreateMenu("?")' $iHelpMenu = GUICtrlCreateMenu("?") $__iLineNumber=7 & " - " & 'GUICtrlCreateMenuItem("Save", $iFileMenu)' GUICtrlCreateMenuItem("Save", $iFileMenu) $__iLineNumber=8 & " - " & 'GUICtrlSetState(-1, $GUI_DISABLE)' GUICtrlSetState(-1, $GUI_DISABLE) And the directive #ShowOriginalLine_Param with the following options: /SV or /SkipAllVars ; Skip all Variables to show original line numbers. /SG or /SkipGlobalVars ; Skip Global Variables to show original line numbers. /SL or /SkipLocalVars ; Skip Local Variables to show original line numbers.29/10/2012 -> *Adding the directives below, will cause your program be compiled with the indexing of the original lines shown in SciTE: #AutoIt3Wrapper_Run_Before=ShowOriginalLine.exe %in% #AutoIt3Wrapper_Run_After=ShowOriginalLine.exe %in%*Or you can use the program ShowOriginalLine.exe directly and choose the script you want to add support to show the original lines!*It was added #region Translations with the variables available for translation! 0.10.2312.2600b 25/10/2012 -> Added support for viewing the last screen before the error! Now the window can expand and retract again...Change the hook CALLWNDRETPROC to CALLWNDPROC (better...). Added a help button [?] In the main window and minor changes in the code. 0.10.2312.2600b 23/10/2012 -> *Added support to display the original line numbers in the scripts compiled! Thanks to @FireFox for this tip! $hAET_GETERROR = StringRegExpReplace($hAET_GETERROR, "d+[0-9]", Eval("__iLineNumber") & @CRLF)*Additional information suggested by @ricky03, thank you!*Some bugs were fixed and the file ShowOriginalLineNumbers.au3 was added in zip file. 0.10.2112.2600b 21/10/2012 -> Bugs were fixed and a few functions have been rewritten!0.10.1912.2600b 19/10/2012 -> The UDF was almost completely rewritten, now no longer need to include _AdlibEnhance.au3.The detection of error is instant and does not consume more CPU. Interface compatibility with Windows XP 0.10.1812.2600b 18/10/2012 -> Improvements such as icons on the buttons and added a button to save the error information!0.10.1712.2600b 17/10/2012 -> First release!Regards, João Carlos.
  3. _AutoItErrorTrap.zip

    Version 0.0.0

    61 downloads

    UDF to intercept the error window of AutoIt, showing more details about the error, including ability to save and send by email!
  4. I get this error, Whenever I try to find a date. Does anyone have any idea why? I saw some post from 2015, However I would imagine this is fixed by now. @water >"J:\Temporary Files\XXXXXXXXX\AutoIt\AutoIt\AutoIt\SciTe\..\autoit3.exe" /ErrorStdOut "C:\Users\XXXXXX\Desktop\Call Report Automation.au3"     "J:\Temporary Files\XXXXXXXX\AutoIt\AutoIt\AutoIt\Include\Excel.au3" (656) : ==> The requested action with this object has failed.: $aResult[$iIndex][1] = $oMatch.Name.Name $aResult[$iIndex][1] = $oMatch^ ERROR >Exit code: 1    Time: 5.791 #include <Excel.au3> Global $sExcelFile1 = FileOpenDialog("Choose/Create Excel File", @ScriptDir, "(*.xlsm)") Global $sExcelFile2 = FileOpenDialog("Choose/Create Excel File", @ScriptDir, "Excel Sheet (*.xlsx;*.xls)|All (*.*)") If FileExists($sExcelFile2) Then Global $oExcel2 = _Excel_Open () $oExcel2 = _Excel_BookOpen($oExcel2,$sExcelFile2) EndIF If FileExists($sExcelFile1) Then Global $oExcel1 = _Excel_Open () $oExcel1 = _Excel_BookOpen($oExcel1,$sExcelFile1,Default,Default,"2007") EndIF $oRead = _Excel_RangeRead ($oExcel2,Default,"A2",3) _Excel_RangeWrite ($oExcel1,"Calls Handled",$oRead,"BY7") Sleep (1000) _Excel_RangeFind ($oExcel1,$oRead,"E4:FD92") MsgBox (0,"Test",$oRead) UPDATE: If I take out this line it works. By works I mean I don't get the error. :/ However, I need it. I am just confused. _Excel_RangeWrite ($oExcel1,"Calls Handled",$oRead,"BY7") UPDATE 2: I also get this error when trying to use the helpfile examples. I have version 3.3.14.2 \AutoIt\AutoIt\AutoIt\Include\Excel.au3" (670) : ==> The requested action with this object has failed.: $oSheet = $oWorkbook.Sheets($iIndexSheets) $oSheet = $oWorkbook^ ERROR >Exit code: 1 Time: 0.8931
  5. How would I go about writing a IF Then statement if the conrol send fails? Run ("Notepad.exe") WinWaitActive ("Untitled - Notepad") ControlSend("Untitled - Notepad", "", "Edit1", ("Provider Practice Record")) I have been running into lag alot. So my script has been missing input. I would like to be able to have it retry to put in "Provider Practice Record" if it misses. I am assuming a if then statement is what I need but I am not sure what ControlSend will return if it tries to send to Edit1 and it is not there. Or do I need to just add a timeout?
  6. Hello all, I'm trying to create a webscrape script using AutoIt. A non-profit I'm involved with is using GroupSpaces.com and there is no notification to the group when someone posts a new topic to the forum. I'm including IE.au3 #include <MsgBoxConstants.au3> #include <Array.au3> #include <String.au3> ; Open Groupspaces.com Global $oIE = _IECreate ("http://www.groupspaces.com") _IENavigate($oIE,"http://groupspaces.com/MyCrazyTest/forum/") ;Grab all the links on the Forum page Global $oLinksCategoryPage = _IELinkGetCollection($oIE) For $oLink In $oLinksCategoryPage Local $oLinkHRef = $oLink.href If StringInStr($oLinkHRef,"forum_id") Then ;This is a category. Click into it. _IENavigate($oIE,$oLinkHRef) Sleep(3) ;Back out to Category List _IEAction($oIE,"back") EndIf Next _IEQuit($oIE)
  7. This code causes an error: yacc stack overflow on line 249 Global $g_R2 = '1|0.1382|0.0031' & @CRLF & _ '2|0.1696|0.003' & @CRLF & _ '3|0.1994|0.003' & @CRLF & _ '4|0.2292|0.003' & @CRLF & _ '5|0.2592|0.0028' & @CRLF & _ '6|0.2876|0.0026' & @CRLF & _ '7|0.3131|0.0021' & @CRLF & _ '8|0.3337|0.0023' & @CRLF & _ '9|0.3563|0.0024' & @CRLF & _ '10|0.3803|0.0027' & @CRLF & _ '11|0.4071|0.0032' & @CRLF & _ '12|0.4387|0.0037' & @CRLF & _ '13|0.4758|0.0044' & @CRLF & _ '14|0.5197|0.005' & @CRLF & _ '15|0.5693|0.0051' & @CRLF & _ '16|0.6202|0.0055' & @CRLF & _ '17|0.6751|0.0057' & @CRLF & _ '18|0.7322|0.006' & @CRLF & _ '19|0.7923|0.0062' & @CRLF & _ '20|0.8545|0.0065' & @CRLF & _ '21|0.9197|0.0065' & @CRLF & _ '22|0.9846|0.0062' & @CRLF & _ '23|1.0462|0.0064' & @CRLF & _ '24|1.1106|0.0066' & @CRLF & _ '25|1.1767|0.0069' & @CRLF & _ '26|1.2452|0.007' & @CRLF & _ '27|1.3148|0.0071' & @CRLF & _ '28|1.3863|0.0074' & @CRLF & _ '29|1.4605|0.0073' & @CRLF & _ '30|1.5334|0.0074' & @CRLF & _ '31|1.6071|0.0078' & @CRLF & _ '32|1.6847|0.0078' & @CRLF & _ '33|1.7628|0.0079' & @CRLF & _ '34|1.8418|0.008' & @CRLF & _ '35|1.9222|0.0082' & @CRLF & _ '36|2.0045|0.0083' & @CRLF & _ '37|2.0874|0.0083' & @CRLF & _ '38|2.1708|0.0084' & @CRLF & _ '39|2.2553|0.0086' & @CRLF & _ '40|2.3411|0.0088' & @CRLF & _ '41|2.4293|0.0086' & @CRLF & _ '42|2.5157|0.0089' & @CRLF & _ '43|2.6045|0.009' & @CRLF & _ '44|2.6944|0.0092' & @CRLF & _ '45|2.786|0.0092' & @CRLF & _ '46|2.8776|0.0094' & @CRLF & _ '47|2.9716|0.0093' & @CRLF & _ '48|3.0642|0.0093' & @CRLF & _ '49|3.1574|0.0094' & @CRLF & _ '50|3.2512|0.0095' & @CRLF & _ '51|3.346|0.0096' & @CRLF & _ '52|3.4425|0.0099' & @CRLF & _ '53|3.5413|0.0097' & @CRLF & _ '54|3.6387|0.01' & @CRLF & _ '55|3.739|0.0099' & @CRLF & _ '56|3.8383|0.0098' & @CRLF & _ '57|3.9364|0.0101' & @CRLF & _ '58|4.0377|0.0101' & @CRLF & _ '59|4.1387|0.0101' & @CRLF & _ '60|4.2394|0.01' & @CRLF & _ '61|4.3394|0.0099' & @CRLF & _ '62|4.4384|0.0103' & @CRLF & _ '63|4.5411|0.0103' & @CRLF & _ '64|4.6443|0.0104' & @CRLF & _ '65|4.7481|0.0105' & @CRLF & _ '66|4.8528|0.0106' & @CRLF & _ '67|4.959|0.0108' & @CRLF & _ '68|5.0673|0.0106' & @CRLF & _ '69|5.1737|0.0109' & @CRLF & _ '70|5.2824|0.0107' & @CRLF & _ '71|5.3895|0.011' & @CRLF & _ '72|5.4991|0.0108' & @CRLF & _ '73|5.6075|0.0112' & @CRLF & _ '74|5.7193|0.0112' & @CRLF & _ '75|5.8308|0.0111' & @CRLF & _ '76|5.9422|0.0111' & @CRLF & _ '77|6.0531|0.011' & @CRLF & _ '78|6.1635|0.011' & @CRLF & _ '79|6.273|0.0113' & @CRLF & _ '80|6.3864|0.0114' & @CRLF & _ '81|6.5004|0.0115' & @CRLF & _ '82|6.6154|0.0117' & @CRLF & _ '83|6.732|0.0114' & @CRLF & _ '84|6.8457|0.0115' & @CRLF & _ '85|6.9602|0.0116' & @CRLF & _ '86|7.0759|0.0117' & @CRLF & _ '87|7.1933|0.0115' & @CRLF & _ '88|7.3085|0.0117' & @CRLF & _ '89|7.4251|0.0119' & @CRLF & _ '90|7.544|0.0117' & @CRLF & _ '91|7.6612|0.012' & @CRLF & _ '92|7.7811|0.0119' & @CRLF & _ '93|7.8998|0.0117' & @CRLF & _ '94|8.0168|0.0119' & @CRLF & _ '95|8.136|0.0118' & @CRLF & _ '96|8.2539|0.0121' & @CRLF & _ '97|8.3746|0.012' & @CRLF & _ '98|8.4946|0.0119' & @CRLF & _ '99|8.6135|0.0122' & @CRLF & _ '100|8.7358|0.0122' & @CRLF & _ '101|8.858|0.0122' & @CRLF & _ '102|8.9802|0.0122' & @CRLF & _ '103|9.1025|0.0122' & @CRLF & _ '104|9.2247|0.0122' & @CRLF & _ '105|9.347|0.0122' & @CRLF & _ '106|9.4693|0.0122' & @CRLF & _ '107|9.5917|0.0122' & @CRLF & _ '108|9.714|0.0122' & @CRLF & _ '109|9.8364|0.0123' & @CRLF & _ '110|9.959|0.0123' & @CRLF & _ '111|10.0816|0.0123' & @CRLF & _ '112|10.2045|0.0123' & @CRLF & _ '113|10.3278|0.0124' & @CRLF & _ '114|10.4514|0.0124' & @CRLF & _ '115|10.5758|0.0126' & @CRLF & _ '116|10.7013|0.0127' & @CRLF & _ '117|10.8284|0.0124' & @CRLF & _ '118|10.9529|0.0126' & @CRLF & _ '119|11.0785|0.0127' & @CRLF & _ '120|11.2059|0.0125' & @CRLF & _ '121|11.3305|0.0126' & @CRLF & _ '122|11.4564|0.0123' & @CRLF & _ '123|11.5791|0.0128' & @CRLF & _ '124|11.7071|0.0126' & @CRLF & _ '125|11.8329|0.0128' & @CRLF & _ '126|11.9605|0.0125' & @CRLF & _ '127|12.0856|0.0127' & @CRLF & _ '128|12.2121|0.0129' & @CRLF & _ '129|12.3408|0.0127' & @CRLF & _ '130|12.4676|0.0129' & @CRLF & _ '131|12.5966|0.0127' & @CRLF & _ '132|12.7241|0.013' & @CRLF & _ '133|12.8541|0.0129' & @CRLF & _ '134|12.9829|0.0127' & @CRLF & _ '135|13.1099|0.0129' & @CRLF & _ '136|13.2393|0.0128' & @CRLF & _ '137|13.3673|0.0126' & @CRLF & _ '138|13.4929|0.0127' & @CRLF & _ '139|13.6202|0.013' & @CRLF & _ '140|13.7501|0.0129' & @CRLF & _ '141|13.8786|0.0127' & @CRLF & _ '142|14.0053|0.0129' & @CRLF & _ '143|14.1343|0.0127' & @CRLF & _ '144|14.2615|0.013' & @CRLF & _ '145|14.3912|0.0128' & @CRLF & _ '146|14.5196|0.0126' & @CRLF & _ '147|14.6458|0.0128' & @CRLF & _ '148|14.774|0.0126' & @CRLF & _ '149|14.9002|0.0128' & @CRLF & _ '150|15.0284|0.0126' & @CRLF & _ '151|15.1544|0.0128' & @CRLF & _ '152|15.2823|0.0126' & @CRLF & _ '153|15.408|0.0127' & @CRLF & _ '154|15.5353|0.0125' & @CRLF & _ '155|15.6602|0.0126' & @CRLF & _ '156|15.7863|0.0128' & @CRLF & _ '157|15.9145|0.0131' & @CRLF & _ '158|16.0455|0.013' & @CRLF & _ '159|16.1759|0.0124' & @CRLF & _ '160|16.3|0.0125' & @CRLF & _ '161|16.4252|0.0127' & @CRLF & _ '162|16.5518|0.0124' & @CRLF & _ '163|16.6756|0.0124' & @CRLF & _ '164|16.8001|0.0121' & @CRLF & _ '165|16.9206|0.012' & @CRLF & _ '166|17.0403|0.0123' & @CRLF & _ '167|17.1637|0.0124' & @CRLF & _ '168|17.2878|0.0125' & @CRLF & _ '169|17.4128|0.0121' & @CRLF & _ '170|17.5341|0.0121' & @CRLF & _ '171|17.6549|0.012' & @CRLF & _ '172|17.7751|0.0124' & @CRLF & _ '173|17.8994|0.012' & @CRLF & _ '174|18.0196|0.0119' & @CRLF & _ '175|18.1387|0.0123' & @CRLF & _ '176|18.2613|0.0123' & @CRLF & _ '177|18.3841|0.0123' & @CRLF & _ '178|18.5073|0.0124' & @CRLF & _ '179|18.631|0.0119' & @CRLF & _ '180|18.7501|0.0118' & @CRLF & _ '181|18.8679|0.0121' & @CRLF & _ '182|18.9885|0.012' & @CRLF & _ '183|19.1083|0.0119' & @CRLF & _ '184|19.2268|0.0117' & @CRLF & _ '185|19.3435|0.0119' & @CRLF & _ '186|19.4624|0.0117' & @CRLF & _ '187|19.5798|0.0115' & @CRLF & _ '188|19.6947|0.0116' & @CRLF & _ '189|19.811|0.0118' & @CRLF & _ '190|19.9295|0.0117' & @CRLF & _ '191|20.046|0.0114' & @CRLF & _ '192|20.1598|0.0115' & @CRLF & _ '193|20.2744|0.0116' & @CRLF & _ '194|20.3903|0.0113' & @CRLF & _ '195|20.5029|0.0113' & @CRLF & _ '196|20.616|0.0114' & @CRLF & _ '197|20.7296|0.0114' & @CRLF & _ '198|20.8439|0.0115' & @CRLF & _ '199|20.9593|0.0112' & @CRLF & _ '200|21.0713|0.0112' & @CRLF & _ '201|21.1833|0.0112' & @CRLF & _ '202|21.2952|0.0112' & @CRLF & _ '203|21.407|0.0112' & @CRLF & _ '204|21.5189|0.0112' & @CRLF & _ '205|21.6306|0.0112' & @CRLF & _ '206|21.7422|0.0111' & @CRLF & _ '207|21.8535|0.0111' & @CRLF & _ '208|21.9644|0.011' & @CRLF & _ '209|22.0748|0.0104' & @CRLF & _ '210|22.1792|0.0106' & @CRLF & _ '211|22.285|0.0103' & @CRLF & _ '212|22.3875|0.0103' & @CRLF & _ '213|22.4904|0.0103' & @CRLF & _ '214|22.5938|0.0104' & @CRLF & _ '215|22.698|0.01' & @CRLF & _ '216|22.7982|0.01' & @CRLF & _ '217|22.8977|0.0103' & @CRLF & _ '218|23.0011|0.0099' & @CRLF & _ '219|23.1001|0.0098' & @CRLF & _ '220|23.1977|0.0101' & @CRLF & _ '221|23.2982|0.01' & @CRLF & _ '222|23.3982|0.0099' & @CRLF & _ '223|23.4972|0.0097' & @CRLF & _ '224|23.5947|0.0095' & @CRLF & _ '225|23.69|0.0097' & @CRLF & _ '226|23.7872|0.0095' & @CRLF & _ '227|23.882|0.0094' & @CRLF & _ '228|23.9759|0.0092' & @CRLF & _ '229|24.0684|0.0093' & @CRLF & _ '230|24.1612|0.0093' & @CRLF & _ '231|24.2546|0.0089' & @CRLF & _ '232|24.3438|0.009' & @CRLF & _ '233|24.4343|0.009' & @CRLF & _ '234|24.5241|0.0089' & @CRLF & _ '235|24.613|0.0087' & @CRLF & _ '236|24.6997|0.0088' & @CRLF & _ '237|24.7874|0.0086' & @CRLF & _ '238|24.8731|0.0085' & @CRLF & _ '239|24.9582|0.0084' & @CRLF & _ '240|25.0426|0.0081' & @CRLF & _ '241|25.1235|0.0081' & @CRLF & _ '242|25.2041|0.008' & @CRLF & _ '243|25.2841|0.0079' & @CRLF & _ '244|25.3636|0.0078' & @CRLF & _ '245|25.442|0.0077' & @CRLF & _ '246|25.5188|0.0077' & @CRLF & _ '247|25.5958|0.0077' & @CRLF & _ '248|25.6732|0.0071' & @CRLF & _ '249|25.7444|0.0071' & @CRLF & _ '250|25.8154|0.0071' & @CRLF & _ '251|25.8862|0.0069' & @CRLF & _ '252|25.9548|0.0069' & @CRLF & _ '253|26.0239|0.0068' & @CRLF & _ '254|26.092|0.0067' & @CRLF & _ '255|26.1585|0.0064' & @CRLF & _ '256|26.2225|0.0063' & @CRLF & _ '257|26.2855|0.0061' & @CRLF & _ '258|26.3468|0.0062' & @CRLF & _ '259|26.4083|0.0062' & @CRLF & _ '260|26.47|0.0059' & @CRLF & _ '261|26.5295|0.0056'
  8. Hello. I've been working with Imagesearch library lately and it did a good work, although I moved to a new PC and didn't copy the old files with me so I downloaded the Imagesearch from the following post hoping that it will work. It doesn't though. First time I when I use (run as subscript to my code) the Imagesearch.au3, Scite finds errors (missing spaces). Ctrl+T (scite tidy) fixes these missing spaces but the script returns the following error on every run after: _ImageSearch('search.bmp', 0, $x, $y, 0) outputs "C:\Users\Knuckles\Desktop\AutoIt\include\ImageSearch.au3" (44) : ==> Subscript used on non-accessible variable.: If $result[0] = "0" Then Return 0 If $result^ ERROR no matter if I put the searched bmp in the script folder or folder img in the script directory. Also, it doesn't matter if the searched image on screen or not, it returns the same. Can you provide me any help please? I remember having these problems 2 years ago when I first met the imagesearch library also (I fixed it somehow though in that time). Seems nothing changed. Using this version posted in the following post gives the same error: Also I run windows 10 64bit and I have no shell options for script editing, running as x86 or whatever as I used to have on windows xp/7. I went through some steps like deleting a key in registry and I even reinstalled autoit and scite but that only resulted to au3 as unrecognized file format and not in getting back the menus and the icon on au3 files. Any thoughts on this? Edit: Installing 64-bit AutoIt and using 64bit ImageSearch is no change. code.au3 FOUND WORKING: http://www.codebot.de/index.php/Thread/12713-Imagesearch-au3-funktioniert-nicht/ but why is this one working and the original aren't? :(
  9. Hello everyone, I have huge problem with "Recurison level has been exceeded - AutoIt will quit to prevent stack overflow" in my own Bot. I have no idea how rebuild my loops for eliminate this type of error. Here is my code #Region #AutoIt3Wrapper_Icon=C:\Users\barbosa\Desktop\autoIt\produkcja\angelica.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_Res_Fileversion=1.0 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Run_Obfuscator=y #EndRegion #Region ; GUI generated by GUIBuilderNxt Prototype 1.0 #include <Constants.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> ;#include <nomad.au3> HotKeySet("{end}","stop") ;end for app kill Local Const $sFont = "Open Sans" ;font variable Local $sFile = "angelica.ico" ;icon variable Global $MainStyle = BitOR($WS_OVERLAPPED, $WS_CAPTION, $WS_SYSMENU, $WS_VISIBLE, $WS_CLIPSIBLINGS, $WS_MINIMIZEBOX, $FW_SEMIBOLD = 600) Global $info_task = "[ Waiting for calibration ]",$info_battlelist = "None",$info_empty = "None",$info_hotkeys = "INACTIVE",$info_100 = "None",$info_mana = "None",$info_food = "None",$info_blank = "None",$info_drop = "None",$info_hand = "None" Global $hMain = GuiCreate("Auto_Angela_Beta_1.0", 330, 559, -1, -1, $MainStyle) GUISetIcon($sFile) $label_100 = GuiCtrlCreateLabel("[F4] Mana Point "&" "&$info_100, 20, 40, 170, 20,-1) $label_mana = GuiCtrlCreateLabel("[F5] Mana Bar "&" "&$info_mana, 20, 60, 170, 20,-1) $label_empty = GuiCtrlCreateLabel("[F6] Nothing "&" "&$info_empty, 20, 80, 170, 20,-1) $label_battlelist = GuiCtrlCreateLabel("[F7] Battle List "&" "&$info_battlelist, 20, 100, 170, 20,-1) $label_food = GuiCtrlCreateLabel("[F8] Food "&" "&$info_food, 20, 120, 170, 20,-1) $label_blank = GuiCtrlCreateLabel("[F9] Blank "&" "&$info_blank, 20, 140, 170, 20,-1) $label_drop = GuiCtrlCreateLabel("[F10] Drop "&" "&$info_drop, 20, 160, 170, 20,-1) $label_hand = GuiCtrlCreateLabel("[F11] Hand "&" "&$info_hand, 20, 180, 170, 20,-1) $Group_11 = GuiCtrlCreateGroup("Configuration", 10, 10, 190, 220,-1) $Group_12 = GuiCtrlCreateGroup("Setup", 210, 10, 110, 220,-1) $btn_setting = GuiCtrlCreateButton("Setup", 220, 40, 70, 30,-1) $btn_load = GuiCtrlCreateButton("Load", 220, 100, 70, 30,-1) $btn_save = GuiCtrlCreateButton("Save", 220, 140, 70, 30,-1) $label_hotkeys = GuiCtrlCreateLabel("Status: "&$info_hotkeys, 220, 190, 90, 20,-1) $input_spell = GuiCtrlCreateInput("Adura Vita", 20, 270, 120, 20,-1) $box_house_mode = GuiCtrlCreateCheckbox("House mode", 20, 300, 90, 20,-1) $box_pk_mode = GuiCtrlCreateCheckbox("Anty PK", 20, 330, 90, 20,-1) $Checkbox_20 = GuiCtrlCreateCheckbox("Alarms", 20, 360, 90, 20,-1) $Checkbox_21 = GuiCtrlCreateCheckbox("Anty Idle", 20, 390, 90, 20,-1) $btn_auto = GuiCtrlCreateButton("Start", 200, 360, 70, 30,-1) $btn_refiler = GuiCtrlCreateButton("Rune thrower", 200, 400, 70, 20,-1);$btn_manual = GuiCtrlCreateButton("Start", 200, 360, 70, 30,-1) $Input_22 = GuiCtrlCreateInput("down", 140, 300, 60, 20,-1) $Input_23 = GuiCtrlCreateInput("up", 210, 300, 60, 20,-1) $Group_24 = GuiCtrlCreateGroup("Mode", 10, 250, 310, 180,-1) GUISetFont(9, $FW_SEMIBOLD) ;white color and bigger font ;$label_task = GuiCtrlCreateLabel($info_task, 10, 450, 370, 24,-1) GUICtrlSetColor($label_task, 0xffffff) GUISetFont(9, $FW_MEDIUM) $Label_28 = GuiCtrlCreateLabel("Auto_Angela_Beta 1.1 @ Medivia 2016", 60, 530, 370, 20,-1) Global $way_one Global $way_one Global $food_pos_x,$food_pos_y Global $hand_pos_x,$hand_pos_y Global $drop_pos_x,$drop_pos_y Global $blank_pos_x, $blank_pos_y Global $RunOrNot Global $pid Global $hotkeys = 0 ;By default hotkeys are disabled Global $mana_color, $battle_color Global $mana_100_x,$mana_100_y Global $mana_pixel_x, $mana_pixel_y Global $empty_pixel_x = 000, $empty_pixel_y = 000 Global $battle_pixel_x, $battle_pixel_y Global $is_break ;Global $MapClickEscape_x, $MapClickEscape_y ;GUICtrlSetDefColor(0xFF0000) GUISetBkColor(0x788190) ; will change background color ;GUICtrlSetBkColor($label_hand, 0xF0F4F9) GuiSetState(@SW_SHOWNORMAL) Do Switch GuiGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $btn_setting _EnableDisable() ;function which make hotkeys enable/disable Case $btn_auto IF $info_food <> "None" OR $info_blank <> "None" OR $info_drop <> "None" OR $info_hand <> "None" OR $info_100 <> "None" OR $info_mana <> "None" Then ;simple validation data in possitions variables check_mana() ;Function is first in chain for making runes Else MsgBox(0, "Error", "You must setup coordinations") EndIf Case $btn_load load_from_file() ;load data from text file Case $btn_save save_to_file() ;dave data in text file Case $btn_refiler refiler() ;for fast refile EndSwitch Until False #EndRegion ;Func uher() ;x,y postaci = F10 DROP ;x,y uha w plecaku = F9 Blank ;kolor uha pobrany przy ustawieniu ;kolor plecaka = F6 BP Color ;odpowienio przygotowane staki plecakow ;co 400ms sprawdza czy jest dosc hp na uha ;jesli trzeba sie uchnac to sprawdza czy w miejscu na uha jest niebieska runa ;jesli nie ma to sprawdza czy jest yellow bp jesli nie ma to sygnal dzwiekowy bledu i kill uhera ;jesli jest to otwiera plecak i sprawdza czy jest niebieska runa jak nie ma to error i kill uhera ;jesli jest to ja przeciaga na postac bardzo szybko ;EndFunc Func refiler() local $i = 20 While $i > 0 MouseClickDrag($MOUSE_CLICK_LEFT, $blank_pos_x, $blank_pos_y, $drop_pos_x, $drop_pos_y, 1) $i = $i - 1 WEnd EndFunc Func save_to_file() $file = FileOpen("angela_memory.txt", 1) If $file = -1 Then MsgBox(0, "Error", "Unable to save data.") Else FileWrite($file, $mana_100_x & @CRLF) FileWrite($file, $mana_100_y & @CRLF) FileWrite($file, $mana_pixel_x & @CRLF) FileWrite($file, $mana_pixel_y & @CRLF) FileWrite($file, $empty_pixel_x & @CRLF) FileWrite($file, $empty_pixel_y & @CRLF) FileWrite($file, $battle_pixel_x & @CRLF) FileWrite($file, $battle_pixel_y & @CRLF) FileWrite($file, $food_pos_x & @CRLF) FileWrite($file, $food_pos_y & @CRLF) FileWrite($file, $blank_pos_x & @CRLF) FileWrite($file, $blank_pos_y & @CRLF) FileWrite($file, $drop_pos_x & @CRLF) FileWrite($file, $drop_pos_y & @CRLF) FileWrite($file, $hand_pos_x & @CRLF) FileWrite($file, $hand_pos_y & @CRLF) MsgBox(0, "Done", "Settings saved.") EndIf EndFunc Func load_from_file() $file = FileOpen("angela_memory.txt", $FO_READ) If $file = -1 Then MsgBox(0, "Error", "Unable to load data.") Else ;wczytywanie segmentow $mana_100_x = FileReadLine($file, 1) $mana_100_y = FileReadLine($file, 2) $info_100 = "X: "&$mana_100_x&" "&"Y: "&$mana_100_y GUICtrlSetData($label_100, "[F4] Mana point "&" "&$info_100) ;;;; $mana_pixel_x = FileReadLine($file, 3) $mana_pixel_y = FileReadLine($file, 4) $info_mana = "X: "&$mana_pixel_x&" "&"Y: "&$mana_pixel_y GUICtrlSetData($label_mana, "[F5] Mana Bar "&" "&$info_mana) ;;;; $empty_pixel_x = FileReadLine($file, 5) $empty_pixel_y = FileReadLine($file, 6) $info_empty = "X: "&$empty_pixel_x&" "&"Y: "&$empty_pixel_y GUICtrlSetData($label_empty, "[F6] Nothing "&" "&$info_empty) ;;;; $battle_pixel_x = FileReadLine($file, 7) $battle_pixel_y = FileReadLine($file, 8) $info_battlelist = "X: "&$battle_pixel_x&" "&"Y: "&$battle_pixel_y GUICtrlSetData($label_battlelist, "[F7] Battle List "&" "&$info_battlelist) ;;;; $food_pos_x = FileReadLine($file, 9) $food_pos_y = FileReadLine($file, 10) $info_food = "X: "&$food_pos_x&" "&"Y: "&$food_pos_y GUICtrlSetData($label_food, "[F8] Food "&" "&$info_food) ;;;; $blank_pos_x = FileReadLine($file, 11) $blank_pos_y = FileReadLine($file, 12) $info_blank = "X: "&$blank_pos_x&" "&"Y: "&$blank_pos_y GUICtrlSetData($label_blank, "[F9] Blank "&" "&$info_blank) ;;;; $drop_pos_x = FileReadLine($file, 13) $drop_pos_y = FileReadLine($file, 14) $info_drop = "X: "&$drop_pos_x&" "&"Y: "&$drop_pos_y GUICtrlSetData($label_drop, "[F10] Drop "&" "&$info_drop) ;;;; $hand_pos_x = FileReadLine($file, 15) $hand_pos_y = FileReadLine($file, 16) $info_hand = "X: "&$hand_pos_x&" "&"Y: "&$hand_pos_y GUICtrlSetData($label_hand, "[F11] Hand "&" "&$info_hand) ;;;; FileClose($file) MsgBox(0, "Done", "Settings loaded") EndIf EndFunc Func stop() Exit EndFunc Func kill() Exit 0 EndFunc ;functions checking if checkbox checked Func _IsChecked_pk_mode($box_pk_mode) Return BitAND(GUICtrlRead($box_pk_mode), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked Func _IsChecked_house_mode($box_house_mode) Return BitAND(GUICtrlRead($box_house_mode), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked Func floor_maker() ;GUICtrlSetData($label_task, "[ Burning rune.. ]") $spell_name = GUICtrlRead($input_spell) $way_one = GUICtrlRead($Input_22) $way_two = GUICtrlRead($Input_23) If _IsChecked_house_mode($box_house_mode) Then ControlSend("Medivia","","", "{" & $way_one & "}" ) EndIf Sleep(1000) MouseClickDrag($MOUSE_CLICK_LEFT, $blank_pos_x, $blank_pos_y, $hand_pos_x, $hand_pos_y, 2) ControlSend("Medivia","","",$spell_name) ControlSend("Medivia","","","{enter}") MouseClickDrag($MOUSE_CLICK_LEFT, $hand_pos_x, $hand_pos_y, $drop_pos_x, $drop_pos_y, 2) Sleep(300) MouseClick($MOUSE_CLICK_RIGHT, $food_pos_x, $food_pos_y, 4, 10) Sleep(400) MouseClick($MOUSE_CLICK_RIGHT, $food_pos_x, $food_pos_y, 4, 10) Sleep(300) If _IsChecked_house_mode($box_house_mode) Then ControlSend("Medivia","","", "{" & $way_two & "}" ) EndIf Beep(1000, 150) check_mana() EndFunc Func _EnableDisable() If $hotkeys = 0 Then HotKeySet("{F4}", "mana_100") HotKeySet("{F5}", "mana_get_color") ;HotKeySet("{F6}", "MapClickEscape") HotKeySet("{F7}", "battle_get_color");Pobiera kolor do zmiennej $battle_color HotKeySet("{F8}", "mouse_pos_food") HotKeySet("{F9}", "mouse_pos_blank") HotKeySet("{F10}", "mouse_pos_drop") HotKeySet("{F11}", "mouse_pos_hand") $hotkeys = 1 $info_hotkeys = "ACTIVE" GUICtrlSetData($label_hotkeys, "Status: "&" "&$info_hotkeys) GUICtrlSetData($label_task, "[ Calibration in progress ]") Else HotKeySet("{F4}") HotKeySet("{F5}") HotKeySet("{F6}") HotKeySet("{F7}") HotKeySet("{F8}") HotKeySet("{F9}") HotKeySet("{F10}") HotKeySet("{F11}") $hotkeys = 0 $info_hotkeys = "INACTIVE" GUICtrlSetData($label_hotkeys, "Status: "&" "&$info_hotkeys) GUICtrlSetData($label_task, "[ End of calibration ]") EndIf EndFunc Func check_mana() ;sleep(700) ;IsSafty() $current_color = PixelGetColor($mana_100_x,$mana_100_y) ;Taking current color from defined mana break point on maan bar $BattleListColor = PixelGetColor($battle_pixel_x, $battle_pixel_y) ;Taking current color from defined posiotion on battle list If _IsChecked_pk_mode($box_pk_mode) Then ;only if pk_mode checkbox is checked If $BattleListColor = $battle_color Then ;If collor on battle list point didnt change, means nothing (player/monster) enter on out screen $RunOrNot = True Else $RunOrNot = False EndIf EndIf If Not ($RunOrNot = False) Then ;If variable RunOrNot are not false it mean is true = is safe If $mana_color = $current_color Then ;If mana color flood mana bar break point floor_maker() ;rune making function Else ;GUICtrlSetData($label_task, "[ Waiting for mana.. ]") Sleep(1000) check_mana() ;Mana arnt ready so back to mana checking EndIf Else ;If not safty then run escape function runforestrun() EndIf EndFunc Func runforestrun() $way_one = GUICtrlRead($Input_22) $way_two = GUICtrlRead($Input_23) ControlSend("Medivia","","", "{" & $way_one & "}" ) Sleep(5000) Do ;GUICtrlSetData($label_task, "[ Not safty outside!! ]") Beep(700,300) Beep(200,500) Sleep(5000) ;IsSafty() $BattleListColor = PixelGetColor($battle_pixel_x, $battle_pixel_y) If $BattleListColor = $battle_color Then $RunOrNot = True Else $RunOrNot = False EndIf Until $RunOrNot = True MouseClick($MOUSE_CLICK_RIGHT, $food_pos_x, $food_pos_y, 4) Sleep(1000) ControlSend("Medivia","","", "{" & $way_two & "}" ) Sleep(2000) check_mana() EndFunc Func mana_100() $pos = MouseGetPos() $mana_100_x = $pos[0] $mana_100_y = $pos[1] $info_100 = "X: "&$mana_100_x&" "&"Y: "&$mana_100_y GUICtrlSetData($label_100, "[F4] Mana point "&" "&$info_100) EndFunc Func mana_get_color() $pos = MouseGetPos() $mana_pixel_x = $pos[0] $mana_pixel_y = $pos[1] $mana_color = PixelGetColor($mana_pixel_x, $mana_pixel_y) $info_mana = "X: "&$mana_pixel_x&" "&"Y: "&$mana_pixel_y GUICtrlSetData($label_mana, "[F5] Mana Bar "&" "&$info_mana) EndFunc Func battle_get_color() $pos = MouseGetPos() $battle_pixel_x = $pos[0] $battle_pixel_y = $pos[1] $battle_color = PixelGetColor($battle_pixel_x, $battle_pixel_y) $info_battlelist = "X: "&$battle_pixel_x&" "&"Y: "&$battle_pixel_y GUICtrlSetData($label_battlelist, "[F7] Battle List "&" "&$info_battlelist) EndFunc Func mouse_pos_food() $pos = MouseGetPos() $food_pos_x = $pos[0] $food_pos_y = $pos[1] $info_food = "X: "&$food_pos_x&" "&"Y: "&$food_pos_y GUICtrlSetData($label_food, "[F8] Food "&" "&$info_food) EndFunc Func mouse_pos_hand() $pos = MouseGetPos() $hand_pos_x = $pos[0] $hand_pos_y = $pos[1] $info_hand = "X: "&$hand_pos_x&" "&"Y: "&$hand_pos_y GUICtrlSetData($label_hand, "[F11] Hand "&" "&$info_hand) EndFunc Func mouse_pos_drop() $pos = MouseGetPos() $drop_pos_x = $pos[0] $drop_pos_y = $pos[1] $info_drop = "X: "&$drop_pos_x&" "&"Y: "&$drop_pos_y GUICtrlSetData($label_drop, "[F10] Drop "&" "&$info_drop) EndFunc Func mouse_pos_blank() $pos = MouseGetPos() $blank_pos_x = $pos[0] $blank_pos_y = $pos[1] $info_blank = "X: "&$blank_pos_x&" "&"Y: "&$blank_pos_y GUICtrlSetData($label_blank, "[F9] Blank "&" "&$info_blank) EndFunc Func afk() ControlSend("Medivia","","","{ctrldown}{down}{ctrlup}") Sleep(350) ControlSend("Medivia","","","{ctrldown}{up}{ctrlup}") EndFunc
  10. Hey I searched code on autoit forum and modify it according to my needs and try to translate text from Russian to English in return I'm getting error such as "Error 411 (Length Required)!!1" Both my autoit codes and error I got are given below, please help me to solve this issue, Thanks Autoit codes to translate text form Russian to English; #include <urlencode.au3> $File1 = @ScriptDir & "\russian_text.txt" $txt = FileRead($File1) ; Try to convert line breaks with .....so final URL looks simpler $txt = StringReplace($txt, @CRLF, '...........') $txt = StringReplace($txt, @LF, '.............') $txt = StringReplace($txt, @CR, '.............') FileWrite (@scriptdir & '\russian_text2.txt', $txt) $openfile = @ScriptDir & "\russian_text2.txt" $mytext = FileRead ($openfile) $encoding = urlencode ($mytext) FileWrite (@scriptdir & '\enooding.txt', $encoding) $from = "ru" $to = "en" $url = "https://translate.googleapis.com/translate_a/single?client=gtx" $url &= "&sl=" & $from & "&tl=" & $to & "&dt=t&q=" & $encoding $oHTTP = ObjCreate("Microsoft.XMLHTTP") $oHTTP.Open("POST", $url, False) $oHTTP.Send() $sData = $oHTTP.ResponseText $sData = StringRegExpReplace($sData, '.*?\["(.*?)(?<!\\)"[^\[]*', "$1" & @crlf) FileWrite (@scriptdir & '\errorcode.txt', $sData) Msgbox(0,"", $sData) In response of above codes, I'm getting below error; <!DOCTYPE html> <html lang=en> <meta charset=utf-8> <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"> <title>Error 411 (Length Required)!!1</title> <style> *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style> <a href=//www.google.com/><span id=logo aria-label=Google></span></a> <p><b>411.</b> <ins>That’s an error.</ins> <p>POST requests require a <code>Content-length</code> header. <ins>That’s all we know.</ins>
  11. Hi all, I'm facing a random error, whereby the ExcelRangeRead function is storing the first letter of a string as a lowercase rather than the uppercase it is stored in Excel. This happens about 10% of the times. And only with one of the ExcelRangeRead functions below, Global $RTERuleName = _Excel_RangeRead($oWorkbook, 'CHFT Pools & RTE Rules', 'I' & $Row) Func ExtractDCWData() Global $PoolName = _Excel_RangeRead($oWorkbook, 'CHFT Pools & RTE Rules', 'G' & $Row) Global $PoolDescription = _Excel_RangeRead($oWorkbook, 'CHFT Pools & RTE Rules', 'H' & $Row) Global $RTERuleName = _Excel_RangeRead($oWorkbook, 'CHFT Pools & RTE Rules', 'I' & $Row) Global $FirstName = _Excel_RangeRead($oWorkbook, 'CHFT Pools & RTE Rules', 'F' & $Row) Global $LastName = _Excel_RangeRead($oWorkbook, 'CHFT Pools & RTE Rules', 'E' & $Row) Global $Notes = _Excel_RangeRead($oWorkbook, 'CHFT Pools & RTE Rules', 'L' & $Row) Sleep(200) EndFunc ;==>ExtractDCWData The excel column looks like this. The script that writes the data out is as follows. Func AddRTERule() MouseClick('Primary', 69, 657, 1) ;Click Rules... Sleep(200) MouseClick('Primary', 363, 228, 1) ;Click Type Sleep(200) MouseClick('Primary', 363, 266, 1) ;Click RTE Sleep(200) MouseClick('Primary', 363, 545, 1) ;Click New Rule Sleep(200) Send($RTERuleName) ;Enter Mnemonic Sleep(200) Send('{TAB}') ;Enter Description Sleep(100) ;Theres more lines of code in this function... EndFunc ;==>AddRTERule Any ideas?
  12. Hello, I've been using autoit for about a year now and overall it's been great despite my limited understanding of all of its features. I have several scripts that run on virtual machines that have been running smoothly for several months without any issues. Recently, I had to create new virtual machines and migrate my scripts over and now I am getting errors that I can't seem to repeat, but seem to happen at least once a day with all of my executables that were flawless before. The error that I keep getting is: Autoit Error Line [this number varies per script] (File "[path to my executable]"); Error: variable must be of type object. I never received this error before until I moved everything to the new VMs, and when I rerun my scripts after clearing the error everything seems to work and run fine until hours later or sometimes the next day. I am assuming that that the root cause may be in some kind of settings on the VM itself since it is happening nearly across the board, but I have no idea where to even look. These are running on Windows 7, which is what they were running on before I had any errors. The only consistent include used in these scripts is IE.au3 Has anyone run into a similar problem or can maybe point me in the right direction. I am at the point of pulling hair out trying to resolve this. I have even rewritten and re-compiled the scripts to see if somehow the executables got corrupted, but that didn't help. Thank you.
  13. i have this code running but it just would not start the code: Local $rndSleep = Int (Random(180000,240000,1000)) MsgBox($MB_SYSTEMMODAL, "NaaaNuuu", "This message box will show the sleeptime after closing the tabs, you got " & $rndSleep & " seconds left.", $rndSleep) here is the error it shows me: "C:\Users\numan\Desktop\scipiie.au3" (23) : ==> Variable used without being declared.: MsgBox($MB_SYSTEMMODAL, "NaaaNuuu", "This message box will show the sleeptime after closing the tabs, you got " & $rndSleep & " seconds left.", $rndSleep) MsgBox(^ ERROR
  14. I am using autoit script for CLI. When I execute autoit script as execution file, I found error message such as below images. But line number is different with real line number of my script. Real line number is 28. How to get the right line number from Autoit error ? Thanks
  15. Okay guys, I have written a script which essentially runs once a week to copy files to a server. It also copies the files to a local directory. When I run in Autoit it works perfectly. When I compile and run I get the attached error. Any help would be appreciated. How should I debug this? I am not a programmer by the way but love Autoit as it has done so much for me.
  16. Func workSpaceSetup () ConsoleWrite ("workSpaceSetup" &@CRLF) $workSpace = WinGetHandle ("some site - Google Chrome") ConsoleWrite ($workSpace&@CRLF) $pos1 = WinGetPos ($workSpace) WinMove ($workSpace , "", $pos1[0] , $pos1[1] , 1366, 768, 0) EndFunc So the script is first, the error I get is second in the quote. This is one function of many for an app I am building but it is the first one that runs so I know there aren't other things at play here. The idea is to keep the window in the same space it is when the script runs but just resize it as this app is used across multiple computers with different screen resolutions. Could someone please elaborate upon what "Subscript used on non-accessible variable" means? Oh and the variable is declared as "Global $pos1 = 0" at the top outside of any functions with the other global variables. Any advice would be greatly appreciated! -Reiz
  17. I use _AD_Open() in a script and a strange thing happens. The first time I logon to a computer with an active directy user login the _AD_Open() function gives @error=4 with no description of the @extended error. It just says LDAP Provider generated the error. When I log off the workstation and than log on with the same user login name the function _AD_Open() works perfectly. It seems that if the workstation has a profile of the user on the local PC, _AD_Open() works correctly but if the profile of the login user does not yet exist it gives the error. Any suggestions? I would like to make it work the first time a user logs on on a not yet used workstation. Much thx in advance for your advice. P.S. I love the AD-extensions to Autoit; they work prefectly in the (mostly logon ) tools I've written for our domain workstations.
  18. Howdy! I am trying to do something a little whacky but here's the function that's kicking back an error. I am fairly sure I am overlooking a simple error but I am not seeing it. Func mouseSpot () Global $mouseSpot = MouseGetPos() ConsoleWrite ($mouseSpot[0] & ", " & $mouseSpot[1] & @CRLF) FileWriteLine ("mouseGrabs.txt" , "MouseClick ('"'primary'"' , $mouseSpot[0] , $mouseSpot[1], 1, 10)" ) EndFunc The error displays as this Any thoughts? Thanks! -Reiz
  19. i have a script that works but gives results and errors randomly #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <StaticConstants.au3> #include <File.au3> #include <Date.au3> Global $result1s[5]=["a", "b", "c", "d", "e"] Global $result2s[19]=["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9", "text10", "text11", "text12", "text13", "text14", "text15", "text16", "text17", "text18", "text19"] Global $result3s[19]=["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9", "text10", "text11", "text12", "text13", "text14", "text15", "text16", "text17", "text18", "text19"] Global $result4s[19]=["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9", "text10", "text11", "text12", "text13", "text14", "text15", "text16", "text17", "text18", "text19"] Global $result5s[19]=["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9", "text10", "text11", "text12", "text13", "text14", "text15", "text16", "text17", "text18", "text19"] _Main() Func _Main() Local $button1 Local $output, $die, $msg, $results1, $results2, $results3, $results4, $results5 Local $file = FileOpen("test.txt", 1) GUICreate("test", 600, 200, -1, -1) $button1 = GUICtrlCreateButton("Result", 460, 110, 50, 30) $output1 = GUICtrlCreateInput("", 60, 10, 450, 20, BitOR($ES_CENTER, $ES_READONLY)) GUICtrlCreateLabel("1", 5, 12) $output2 = GUICtrlCreateInput("", 60, 30, 450, 20, BitOR($ES_CENTER, $ES_READONLY)) GUICtrlCreateLabel("2", 5, 12) $output3 = GUICtrlCreateInput("", 60, 50, 450, 20, BitOR($ES_CENTER, $ES_READONLY)) GUICtrlCreateLabel("3", 5, 32) $output4 = GUICtrlCreateInput("", 60, 70, 450, 20, BitOR($ES_CENTER, $ES_READONLY)) GUICtrlCreateLabel("4", 5, 52) $output5 = GUICtrlCreateInput("", 60, 90, 450, 20, BitOR($ES_CENTER, $ES_READONLY)) GUICtrlCreateLabel("5", 5, 72) GUICtrlCreatePic("", 0, 0, 600, 200) GUICtrlCreateLabel("Sample Pic", 75, 1, 53, 15) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor(-1, 0xFFFFFF) $die = GUICtrlCreateLabel("", 700, 500, 700, 20, $SS_SUNKEN) GUICtrlSetFont($output, 8, 800, "", "Verdana") GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $button1 $results1 = Random(1, 5, 1) GUICtrlSetData($output1, $result1s[$results1]) $read1 = GUICtrlRead($output1) $results2 = Random(1, 19, 1) GUICtrlSetData($output2, $result2s[$results2]) $read2 = GUICtrlRead($output2) $results3 = Random(1, 19, 1) GUICtrlSetData($output3, $result3s[$results3]) $read3 = GUIctrlRead($output3) $results4 = Random(1, 19, 1) GUICtrlSetData($output4, $result4s[$results4]) $read4 = GUICtrlRead($output4) $results5 = Random(1, 19, 1) GUICtrlSetData($output5, $result5s[$results5]) $read5 = GUICtrlRead($output5) FileWriteLine($file, _NowDate()& " " & _nowTime() & " " &$read1) FileWriteLine($file, _NowDate()& " " & _nowTime() & " " &$read2) FileWriteLine($file, _NowDate()& " " & _nowTime() & " " &$read3) FileWriteLine($file, _NowDate()& " " & _nowTime() & " " &$read4) FileWriteLine($file, _NowDate()& " " & _nowTime() & " " &$read5) FileClose($file) EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd EndFunc ;==>_Main how to fix it?
  20. Hi, how to get full error reporting if FTP failed? tried _WinAPI_GetLastErrorMessage() func but That didn't help at all. the information was returned by _WinAPI_GetLastErrorMessage() can't help me! _FTP_Open, return Success: a handle, Failure: 0 and sets the @error flag to non-zero _FTP_Connect, return Success: an handle to connected session. Failure: 0 and sets the @error flag to non-zero. _FTP_DirCreate, return Success: 1. Failure: 0. _FTP_FilePut, return Success: 1. Failure: 0 and sets the @error flag to non-zero. Any help would be much appreciated
  21. I get the following error on compiling. All files defined in the resources to add exists. The exe file is created but when executing a pop-up window is shown with the message "File exists ?" >22:51:25 Performing the Program Resource Update steps: !>22:51:25 Error: Failed to get script data from end of target file. Skipping resource update.rc:2
  22. I get a database result back as sometimes as single array and sometimes multi array (I understand that is bad practice in general and I am trying to fix that, because there are some errors in my database) but how can I error handle the best way or determine when something is single or multi array without making my script to break? I am very poor at @error handling in such cases for example $ncatid = $array[7] (because it is the answer i got back from database is multi array, that is because the item is unfortunate stored double which i am trying to fix in proper manner) I get the error of, Array variable has incorrect number of subscripts or subscript dimension range exceeded
  23. I added to my project in c# referenced the dll's : AutoitX3.Assembly.dll and AutoitX3Lib.dll In my code i'm trying to simulate a combination of Ctrl + O So I did: AutoIt.AutoItX.ControlSend(processTitle, "", processFileName, "^^{r}"); When using a break point: In processTitle I see: Game In the processFileName I see: C:\Program Files (x86)\Game\Game\Game.exe For checking I looked into Task Manager and there I see in the tab details: Game.exe as name and in Description I see Game And if I will click manually on my own Ctrl + O it will work it will do what I need it will take effect. But when using the AutoIt it will not work will do nothing no effect at all. And I see it's getting and doing the line with the ControlSend but nothing happen. And it did work few hours ago. What is wrong ?
  24. I'm using csharp with the autoitx3. I added to my project referenced the autoit dll's. Everything was working find until I got exception say: "Unable to load DLL 'AutoItX3_x64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" And I downloaded and installed the autoit and added the dll files referenced them to my project also the file name: AutoitX3_x64.dll but for some reason I don't see this dll file in the project tried to add it as reference few times and in the References I see only two files of Autoit: AutoItX3.Assembly.dll and Interop.AutoItX3Lib.dll but for some reason it's not adding the AutoitX3_x64.dll as reference. How should I add then the AutoitX3_x64.dll to my project ? I keep getting the exception message that it's missing.
  25. Hello, I've an error and don't know why and hope somebody can help me.. I think maybe i din't include somethin for the "ByRef" function, but i could be wrong :S Anyway here is what i included ... #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <File.au3> ; for _FileCreate ed. #Include <GuiComboBoxEx.au3> ; for _GUICtrlComboBoxEx_ResetContent #include "EzMySql.au3" #include <Array.au3> This is what i do before the error starts ... (everything else is running properly) $query = "SELECT * FROM `users` ;" $hostname = Read_from_ini("app","server","ip","no_server_ip") $dbname = "blokkerreferencedata" $usrname = Read_from_ini("app","server","username","no_server_usr") $Pass = Read_from_ini("app","server","pass","no_server_pass") $SQLport = Read_from_ini("app","server","sql_port","no_server_port") $iresult_rows = "" $iresult_colums = "" $iresult = get_result($query,$hostname,$dbname,$usrname,$Pass,$SQLport,ByRef $iresult_rows,ByRef $iresult_colums) _ArrayDisplay($iresult,"result") Here is the error i get... ==> Error in expression.: $iresult = get_result($query,$hostname,$dbname,$usrname,$Pass,$SQLport,ByRef $iresult_rows,ByRef $iresult_colums) $iresult = get_result($query,$hostname,$dbname,$usrname,$Pass,$SQLport,^ ERROR does somebody see what i do wrong here??? thanks in advanced. ps. if it isn't a forgotten "include" --> how does somebody know whish include to use???