Jump to content

Search the Community

Showing results for tags 'bug'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 27 results

  1. What is Rollbar? Rollbar provides real-time error alerting & debugging tools for developers. Learn more about it at https://rollbar.com/product/ Demo: https://rollbar.com/demo/demo/ Screenshot: Instructions: (RollbarTest.au3) ; Include RollbarSDK #include "RollbarSDK.au3" ;Turns on ConsoleWrite debugging override. ;Global $Rollbar_Debug=False ; Initialize RollbarSDK with the project's API key. ; Parameters ....: $__Rollbar_sToken - [Required] Go to https://rollbar.com/<User>/<ProjectName>/settings/access_tokens/ for your project. Use the token for post_server_item. _Rollbar_Init("eaa8464a4082eeabd9454465b8f0c0af") ; Write code that causes an error you want to catch, then call ; _Rollbar_Send ; Parameters ....: $__Rollbar_sErrorLevel - [Required] Must be one of the following values: Debug, Info, Warning, Error, Critical. ; $__Rollbar_sMessage - [Required] The message to be sent. This should contain any useful debugging info that will help you debug. ; $__Rollbar_sMessageSummary - [Optional] A string that will be used as the title of the Item occurrences will be grouped into. Max length 255 characters. If omitted, Rollbar will determine this on the backend. _Rollbar_Send("Debug", "This is an debug message. If you received this, you were successful!", "Debug Message") _Rollbar_Send("Info", "This is a test message. If you received this, you were successful!", "Info Message") _Rollbar_Send("Warning", "This is an warning message. If you received this, you were successful!", "Warning Message") _Rollbar_Send("Error", "This is an error message. If you received this, you were successful!", "Error Message") _Rollbar_Send("Critical", "This is an critical message. If you received this, you were successful!", "Critical Message") _Rollbar_Send("Info", "This is a test message. If you received this, you were successful!") ;No Message ; Rollbar_Send's helper functions ; Parameters ....: $__Rollbar_sMessage - [Required] The message to be sent. This should contain any useful debugging info that will help you debug. ; $__Rollbar_sMessageSummary - [Optional] A string that will be used as the title of the Item occurrences will be grouped into. Max length 255 characters. If omitted, Rollbar will determine this on the backend. _Rollbar_SendDebug("This is an debug message. If you received this, you were successful!", "Debug Message") _Rollbar_SendInfo("This is a test message. If you received this, you were successful!", "Info Message") _Rollbar_SendWarning("This is an warning message. If you received this, you were successful!", "Warning Message") _Rollbar_SendError("This is an error message. If you received this, you were successful!", "Error Message") _Rollbar_SendCritical("This is an critical message. If you received this, you were successful!", "Critical Message") ; Usable Example Local $sImportantFile = "C:\NOTAREALFILE_1234554321.txt" Switch FileExists($sImportantFile) Case True MsgBox(0, "Example Script", "An important file was found. Continuing...") Case Else _Rollbar_SendCritical('An important file was missing. Halting... File: "' & $sImportantFile & '"', 'Important file "' & $sImportantFile & '" is missing.') EndSwitch Notes: Please comment your feedback, advice, & suggestions below. While this is only a proof of concept, I will expand its feature set for everyone to use. Right now, it is fully functional but not tested in production. Changelog: RollbarSDK.au3 RollbarTest.au3 v0.2 v0.1.1
  2. Im not sure if this is intended but normally Autoit variables are always passed as copies (except objects i think). But below i observed an unconsistency when copying maps with nested maps inside. Issue: If you create a nested map1 and copy it to a new map2, changing a nested value in map2 will also change the nested value in map1 Dim $player[] Dim $sub[] $player.test1 = 1 $player.test2 = $sub $player.test2.child1 = "org" $player.test2.childext = $sub $player.test2.childext.child1 = "org2" $playerold = $player ; make a copy of the whole map ConsoleWrite("player.test2.child1 : "& $player.test2.child1 & @CRLF); original nested value in $player $playerold.test2.child1 = "changed" ; edit a nested value in $playerold ConsoleWrite("player.test2.child1 : "& $player.test2.child1 & @CRLF) ; original nested value in $player changed ConsoleWrite("---------------------" & @CRLF) ConsoleWrite("player.test2.childext.child1 : "& $player.test2.childext.child1 & @CRLF); original level2 nested value in $player $playerold.test2.childext.child1 = "changed2" ; edit a level2 nested value in $playerold ConsoleWrite("player.test2.child1 : "& $player.test2.child1 & @CRLF); original level1 nested value in $player stayed the same ConsoleWrite("player.test2.childext.child1 : "& $player.test2.childext.child1 & @CRLF); original level2 nested value in $player changed
  3. As the title says, when a script that is stored on a Google Drive File Stream drive is ran or compiled, it fails to work at all. Basically, Google Drive File Stream creates a G:\ drive where you can access all your files. The difference between this and Google Backup and Sync is your files are downloaded as needed rather than they always be downloaded and taking up storage. How to Reproduce Bug 1. Download and Install Google Drive File Stream 2. Sign into Google Drive File Stream with a G Suite account. 3. Create a AutoIt Script and save it to Google Drive File Stream. (See attached file) 4. Attempt to run or compile this AutoIt Script. AutoIt appears to act like the script is (incorrectly) empty and ends immediately. (You can kind of tell based on file sizes from a successful and failed compile). I've also attached a Process Monitor log file. Hopefully someone can figure this out, because having to move the script out of the drive just to run or compile it is super annoying and I lose version revisioning Google Drive provides me. test.au3 Logfile.PML
  4. WinSetState ("[CLASS:OpusApp]", "", @SW_SHOWMAXIMIZED) and WinSetState ("[CLASS:OpusApp]", "", @SW_MAXIMIZE) don't maximize the window. Using WinSetState("[CLASS:OpusApp]","",@SW_RESTORE) allows me to maximize it about 15% of the time. I've tried using WinMove("[active]",0,0,@Desktopwidth,@Desktopheight), but that only makes it worse. I've also tried putting in a sleep and maximizing it again. Does anyone have a solution? Here's my code: The startup script is intentionally commented, because I'm not testing it right now. The other comment is just for debugging when I need it. UPDATE: When I run two instances of the program, it works almost all the time, but if I copy the code inside the else statement twice it doesn't work at all (despite the fact that it's running the same code just in one program vs two). I also noticed that when I run two instances of it, about 50% of the time when it opens both the windows, it also hits the windows button and types the letter d into the search box. Neither of these actions are in my code. I'm not really sure what's going on.
  5. _ArrayDisplay($aArray, "Window Title", "1:", 0, Default, "Column") ; Expected results are rows 1 to the end of the array, all columns. The result is rows 0-1, all columns. The API reference is here: https://www.autoitscript.com/autoit3/docs/libfunctions/_ArrayDisplay.htm Am I doing something wrong?
  6. Hello everyone, I discovered a bug yesterday and I posted it at the bug tracker: I also made a simple script which can be used to reproduce the bug: CreateVariable() ConsoleWrite($sGlobalVariable & @CRLF) Func CreateVariable() Global $sGlobalVariable = "Foobar" EndFunc The bug was closed by @BrewManNH: While I partially agree with the above statement, My code was not practical enough... so @mLipok advised me to create a thread on the forums with practical code (Thanks!). That is the point of this thread, I am going to provide the code where I experience this bug/problem . I discovered this bug when I was working on one of my projects called "ProxAllium". When the main script finishes execution, Au3Check throws a nasty warning about "variable possibly used before declaration": As you can see, the variable is indeed being used after calling the function in which the variable is declared... The warning won't appear if I declare the function ABOVE the variable. As @BrewManNH said, Au3Check reads line by line... I think this should be changed, Au3Check should not throw warnings if the interpreter is able to run the code, at least most of the time anyway! So what do you guys think? Is this a valid bug?... and I request those who participate in the discussion not to discuss the code being "poor", that is another thing/thread in itself P.S I had already written this once but the forum editor decided to mess up and when I undid (Ctrl + Z) something... This is a poorly written version of that article, I was very frustrated while writing this!
  7. Hello! I've found some not obvious behaivor of RegDelete() function. So If we already have created registry key 'HKEY_LOCAL_MACHINE\SYSTEM\Test' _without_ 'value' in it. RegDelete() will will raise an Error with code = 1 ( according to documentation 1 means - Unable to open requested key ), instead of code = -2 ( unable to delete requested key/value ). This code running under account without administrative right, will return @error = 1 even if 'HKEY_LOCAL_MACHINE\SYSTEM\Test' already existing key and no 'value' in it. $i_regdelete_result = RegDelete( 'HKEY_LOCAL_MACHINE\SYSTEM\Test' , 'value' ) ; = 2 MsgBox( 0 , 'ERROR' , @error ) ; = 1 Maybe this is due to RegDelete() tries to open target key with write access and gets denied. So I thought that this is not so obvious as it can be. And naturally $i_regdelete_result must have 0 in this scenario ( according to documenatation 0 means Special return value of RegDelete when key/value does not exist )
  8. Hi! I just playing around with _ArrayMin for my next project, but seems like it's not working. I think the code is OK, but I always get the value of $aArray[2][1], not col 2's lowest value (see attached image)
  9. Hi all. Because of me wondering if I could access the key/value pair arrays with the numbers as indexes, I have found out that the zeroth element for some reason doesn't return anything. Here's the example: local $r[2] $r["test1"]="hello" $r["test2"]="how are you" msgbox(64, $r[0], $r[1]) ; prints the ["test2"] but not ["test1"]. Is this even supposed to be a thing? BTW, I haven't seen Autoit get updated since 2015; is it abandened or something? Any help/clarification appreciated.
  10. Hi, I have update to the most recent Autoit version. I have a little problem with _ArrayUnique function. If I have one array with two rows. _ArrayUnique crashes. I haven't any problem if there are more than two rows. I know that seems useless use this function with two rows, but these rows are the result of a search (generally I have more than two rows). "C:\Program Files (x86)\AutoIt3\Include\Array.au3" (2290) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Local $vFirstElem = ( ($iDims = 1) ? ($aArray[$iBase]) : ($aArray[$iColumn][$iBase]) ) Local $vFirstElem = ( ($iDims = 1) ? ($aArray[$iBase]) : (^ ERROR #include <Array.au3> Dim $Test1[3][6]=[["11","12","13","14","15","16"],["21","22","23","24","25","26"],["21","22","23","24","25","26"]] Dim $Test[2][6]=[["11","12","13","14","15","16"],["21","22","23","24","25","26"]] Dim $result=0 _ArrayDisplay($Test1) _ArrayDisplay(_ArrayUnique($Test1, 2)) _ArrayDisplay($Test) _ArrayDisplay(_ArrayUnique($Test, 2)) I put a workaround that I don't use _ArrayUnique function if there are only two results
  11. Hi All, Could someone please PLEASE tell me what I'm doing wrong here? I feel like I'm close to figuring this out, I think I've identified what is causing the issue. Whenever I try to use the hotkey CTRL+SHIFT+T (or any other letter other than T for that matter) to paste the text to notepad, my CTRL and SHIFT keys are held down *IF* I release them *WHILE* the raw text is being written. It seems to be that if I release the CTRL+SHIFT keys: Before the Send Raw text starts to write to the screen: the CTRL and SHIFT keys ARE NOT held down, this is good During the Send Raw text being written to the screen: the CTRL and SHIFT keys ARE held down perpetually until I physically press them on the keyboard, this is bad After the Send Raw text has written all text to the screen: the CTRL and SHIFT keys ARE NOT held down, this is good This is also the case if I were to use the Windows Key as the hot key instead of the CTRL+SHIFT, I would need to tap the WIN key physically on my keyboard if I released it while the raw tet was being sent to the screen (eg, WIN+T). This issue also happens no matter which program I try to write the text to. Here's some example code: (I've put a bunch of "a's" in there to give enough time to test releasing the CTRL+SHIFT before/during/after the writing of them) HotKeySet("^+t", "WriteTxt") Func WriteTxt() WinWaitActive("Untitled - Notepad") $var = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" send($var, 1) EndFunc While 1 Sleep(500) WEnd Thanks guys!
  12. Hello, I found a bug in the statement "ContinueLoop". Run the following script: For $a = 1 To 3 MsgBox(0, "The value of $a is:", $a) For $i = 1 To 10 MsgBox(0, "The value of $i is:", $i) If $i = 5 Then ContinueLoop 2 Next ; command Next
  13. 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 ?
  14. Some of my users are having trouble that I confirmed happens "just for them". Specifically _IEFormElementRadioSelect returns $_IESTATUS_NoMatch for a radio button that clearly exists in the page. For me using WinXP / IE8 or Win8.1 / IE11 I see few if any symptoms, but when I put together a test on their Win 7 / IE8 platform sure enough it breaks. The unit test is just a bit of code that changes a radio box value, which triggers a postback, waits for the postback to complete, and repeats with a new value, triggering another postback, repeat 1000 times and call it success. After some debugging I determined that _IEFormElementGetObjByName was finding the radio button, but _IEFormElementRadioSelect was not, which lead to this bit of code from IE.au3: Local $oItems = Execute("$oObject.elements('" & $sName & "')")Which looks valid and works some (maybe even most) of the time on Win 7 / IE 8. So I modified it to use the similar construct from _IE_FormElementGetObjByName to be: Local $oItems = $oObject.elements.item($sName)Which works 100% for me. So the question now becomes, is this a beta issue, an IE.au3 issue, or an IE issue? The only real difference is where I place my code to workaround cases where Win 7 / IE8 / _IEFormElementRadioSelect don't do what was expected.
  15. Have the following code snippet: If not FileExists($ExchangeDir & $StockCSV) Then _FileWriteFromArray($ExchangeDir & $StockCSV, $YahooStockEntries) Else When trying to do a check against the non-existent file 'PRN.csv', FileExists is evaluating as True. This is not happening with other file names, directory structure is correct. Any ideas? Thanks Chip
  16. Global $i = 3;Assign 3 to variable $i ConsoleWrite("count is:"&$i&@CRLF);It says variable value is 3 If Not $i=45 Then;The bug is here ConsoleWrite("count is:"&$i&@CRLF);This should say count is:3 but it don't because of the bug EndIfThis is a very simplified example of the bug, anyone knows why this happen?
  17. Good day to the autoit community. I am having an issue with the _GUICtrlRichEdit on a pop-up gui box. I have cobbled a short script together that replicates the issue. Simply run the script and click the button for the pop-up gui with the richedit box. If you close the pop-up gui and re-click the button, the richedit box fails to load on subsequent pop-up gui launches. #include <GuiRichEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) $Form1_1 = GUICreate("hubconsole", 655, 697) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close") $gethubbutton = GUICtrlCreateButton("Get Info", 501, 129, 81, 25) GUICtrlSetOnEvent(-1, "Main") GUISetState(@SW_SHOW) Func Form1_1Close() exit EndFunc While 1 Sleep(100) WEnd Func Main() Local $hGui, $hRichEdit, $iMsg $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, 4) & ")", 320, 350, -1, -1) global $richgui = $hGui GUISetOnEvent($GUI_EVENT_CLOSE, "Form2_1Close") global $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) _GUICtrlRichEdit_AppendText($hRichEdit, @CR & "This is more text") GUISetState() EndFunc Func Form2_1Close() _GUICtrlRichEdit_Destroy($hRichEdit) ; needed unless script crashes GUIDelete($richgui) EndFunc Some further information from diagnostic: The first cycle around shows no @error's for the deconstructor Form2_1Close().. so the richedit destroy and guidelete both happen. When I click the button for the second launch, I see the pop-up gui has a new HWnd.. example: 1st click (0x00514B6) 2nd click (0x000614B6) on the line " global $hRichEdit = _GUICtrlRichEdit_Create($hGui... " I see value to @error of 1 which isn't detailed in the helpfile of the function, but if I dig into the include I see error 1 gets set when: If Not _WinAPI_IsClassName($hWnd, $_GRE_sRTFClassName) Then Return SetError(1, 0, 0) ; Invalid Window handle for _GUICtrlRichEdit_Create 1st parameter I'm stuck at this point as I can't figure why "_WinAPI_IsClassName($hWnd, $_GRE_sRTFClassName" comes back with a failure on subsequent launches of the popup.
  18. Hey guys... not a vital issue or anything, but I've setup the format of date and time in a user input field (code included below), but the output is off on the second field and I can't figure where it's getting it from.... the code displayed is the only place in the program that modifies these fields: $StartDate = GUICtrlCreateDate(@Year&"/"&@MON&"/"&@MDAY&" "&@HOUR&":00", 8, 112, 138, 21) ; to select a specific default format $DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW $style = "yyyy/MM/dd HH:mm" GUICtrlSendMsg($StartDate, $DTM_SETFORMAT_, 0, $style) $EndDate = GUICtrlCreateDate(@Year&"/"&@MON&"/"&@MDAY+1&" "&@HOUR&":00", 8, 152, 138, 21) $DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW $style = "yyyy/MM/dd HH:mm" GUICtrlSendMsg($EndDate, $DTM_SETFORMAT_, 0, $style) The outputs are: Startdate: 2014/04/04 17:00 (good so far) EndDate: 2014/04/05 07:25 (Where did 07:25 come from? FYI 25 is the current Minute time of the test, but the 07Hour is not. Current hour is 17:00) Both fields have almost exactly the same code and syntax with endDate being incrimented by 1. Nowhere else in my script am I making any modifications to either field, just read. Thanks for your help
  19. Small chance i'm too tired to think straight, but I do believe this is a bug. I was reading strings from a file which were 32 bytes in length. Padded with 00's So I thought i'd strip off the exess with StringStripWS. Which docs say can strip CHR(0) as whitespace. Not working, here's a modified from the Example that Duplicates the problem. All whitespace removed exept the Null Char. #include <StringConstants.au3> #include <MsgBoxConstants.au3> ; Strip leading and trailing whitespace as well as the double spaces (or more) in between the words. Local $sString = "Thisisasentencewithwhitespace." & CHR(0) ConsoleWrite(StringLen($sString) & @CRLF) $sString = StringStripWS($sString, $STR_STRIPTRAILING) ConsoleWrite(StringLen($sString) & @CRLF) Prints to console size of the string before and after as 31. No Changes.
  20. With older Autoit Versions my script was working fine and i don´t know how i should change my script to work again... Basically my problem section does nothing more then selecting some menus in SAP then pressing 2 buttons in following popup-windows and the 3rd popup is a file save dialog... My script always stops executing after the 2nd button press (it is pressed, but it won´t get any further....) Connection to SAP is initiated with _SAPSessAttach("") from the SAP UDF but the commands are sent directly via the COM interface to SAP. _SAPSessAttach("") ConsoleWrite("Setze $AnalyseBlatt ..." & @CRLF) $AnalyseBlatt = @ScriptDir & "\test.xls" ConsoleWrite("Lösche $AnalyseBlatt ..." & @CRLF) If FileExists($AnalyseBlatt) Then FileDelete($AnalyseBlatt) EndIf $SAP_Session.findById("wnd[0]/shellcont[0]/shell/shellcont[2]/shell" ).expandNode("1000") $SAP_Session.findById("wnd[0]/shellcont[0]/shell/shellcont[2]/shell" ).selectItem("4000", "COL01") $SAP_Session.findById("wnd[0]/shellcont[0]/shell/shellcont[2]/shell" ).ensureVisibleHorizontalItem("4000", "COL01") $SAP_Session.findById("wnd[0]/shellcont[0]/shell/shellcont[2]/shell" ).topNode = ("0001") $SAP_Session.findById("wnd[0]/shellcont[0]/shell/shellcont[2]/shell" ).doubleClickItem("4000", "COL01") ConsoleWrite("Btn0 Press..." & @CRLF) $SAP_Session.findById("wnd[1]/tbar[0]/btn[0]").press ConsoleWrite("Btn5 Press..." & @CRLF) $SAP_Session.findById("wnd[1]/tbar[0]/btn[5]").press ;--------- SCRIPT STOPS HERE, without any error, it just hangs.... ConsoleWrite("Warte auf Speichern unter Dialog..." & @CRLF) WinWait("Speichern unter") ConsoleWrite("Setze Edit auf Analyseblatt..." & @CRLF) ControlSetText("Speichern unter", "", "[CLASS:Edit; INSTANCE:1]", $AnalyseBlatt) Sleep(2000) ControlClick("Speichern unter", "", "[CLASS:Button; INSTANCE:2]")
  21. I discovered bug in AutoIt. I write here first and not directly on BugTrac to be sure. Here is simple test script: GUICreate("ToolTip bug", 400, 300) GUICtrlCreateLabel('Test1', 10,10,100,25) GUICtrlSetTip(-1,'tip 1') GUICtrlCreateLabel('Test2', 10,50,100,25) GUICtrlSetTip(-1,'tip 2') GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then ExitLoop WEnd When you place cursor on label1 and then immediatelly after tooltip appear on label2 and back to label1 all is OK (tooltip appears) but when you place cursor on label1 and don't move cursor until tooltip dissapear (approx 5 seconds depends on Windows setting) then after placing cursor on label2 tooltip appears but back on label1 tooltip don't appear anymore Note1: I tested it on "my latest AutoIt beta" 3.3.7.23 Note2: This bug isn't in AutoIt 3.2.12.1 so it was introduced in some new version So question is if this bug is also in latest AutoIt release/beta version. EDIT: Now I discovered that it can be unblocked by click on label, after that ToolTip shows correctly again This bug apply also for other controls not only labels, tested on buttons EDIT2: It seems bug is only on WinXP, i will do more tests ... EDIT3: YES it appears only on WinXP (also with latest release/beta 3.3.8.1/3.3.9.4). Bug ticket reopened http://www.autoitscript.com/trac/autoit/ticket/1275
  22. Hello, I just discovered bad thing. If I used _FileWriteToLine function in AutoIt3 beta since 3.3.9.20 and newer, after launching the file it's partially damaged itself. Older versions work correctly and there is no file damaging. Look at the example and test on different versions - older and newer. (Added): I think the problem is in IncludeFile.au3 v.3.3.9.20, line 677: Local $aArray = StringRegExp(@CRLF & $sFileRead & @CRLF, "(*BSR_ANYCRLF)([^\R]*)(?:\R)(?:\R$)?", 3) v.3.3.9.19, line 683: Local $aArray = StringRegExp(@CRLF & $sFileRead & @CRLF, "([^\r\n]*)(?:\r\n|\n|\r)(?:[\r\n]$)?", 3) Maybe the pipe "|" I used is the reason? #AutoIt3Wrapper_Res_Field=Release date|18.10.2013 partypooper, MrCreatoR? P.S. Excuse me for strange characters in line number 5. It's an online artifact, there is no such characters in my code. #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_Res_Comment=http://monter.FM #AutoIt3Wrapper_Res_Description=Example file showing beta bug since AutoIt3.3.9.20. #AutoIt3Wrapper_Res_Field=Release date|18.10.2013 #AutoIt3Wrapper_Res_LegalCopyright=monter.FM #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Date.au3> #include <File.au3> Global $msg, $flg, $sec $title = 'AutoIt3 - version ' & @AutoItVersion FileChangeDir(@ScriptDir) If StringReplace(@AutoItVersion, '.', '') > 33919 Then VerBug() Else VerOK() EndIf FileInfo() MsgBox($flg, $title, $msg, $sec) If $flg = 48 Then Run('notepad.exe ' & @ScriptName) Func VerBug() $msg = 'This version has just damaged this file.' & @CRLF & 'Fortunately I made the *.bak copy :)' & @CRLF & 'Look at this damaged script now.' $flg = 48 $sec = 6 FileCopy(@ScriptName, @ScriptName & '.bak') EndFunc ;==>VerBug Func VerOK() $msg = "This version works fine and shouldn't damage this file." $flg = 64 $sec = 3 EndFunc ;==>VerOK Func FileInfo() Opt('TrayIconDebug', 1) $strRes = '#AutoIt3Wrapper_' For $ln = 1 To 10 $srchRes = StringInStr(FileReadLine(@ScriptFullPath, $ln), $strRes) If $srchRes > 0 Then $lr = $ln ExitLoop EndIf Next $strRes = '#AutoIt3Wrapper_Res_Field=Release date|' For $ln = $lr To $lr + 16 $srchRes = StringInStr(FileReadLine(@ScriptFullPath, $ln), $strRes) If $srchRes > 0 Then $lnRes = $ln ExitLoop EndIf Next $rd = FileGetTime(@ScriptFullPath, 0, 0) _FileWriteToLine(@ScriptFullPath, $lnRes, '#AutoIt3Wrapper_Res_Field=Release date|' & $rd[2] & '.' & $rd[1] & '.' & $rd[0], 1) Global $dateRlse = $rd[2] & '.' & $rd[1] & '.' & $rd[0] FileSetTime(@ScriptFullPath, $rd[0] & $rd[1] & $rd[2] & $rd[3] & $rd[4] & $rd[5], 0) EndFunc ;==>FileInfo FileWriteToLine_bug_Au3.3.9.20+.au3
  23. DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1) $hTelnet = Run('c:\windows\system32\telnet.exe 127.0.0.1 10011', '', @SW_SHOW) DllCall("kernel32.dll", "int", "Wow64EnableWow64FsRedirection", "int", 1) Sleep(2000) ControlSend('Telnet 127.0.0.1', '', '', 'use port=9987' & @CRLF, 1) Sleep(2000) ControlSend('Telnet 127.0.0.1', '', '', 'clientupdate client_nickname="Tester' & Random(1, 1234567, 1) & '"' & @CRLF, 1) Sleep(2000) ControlSend('Telnet 127.0.0.1', '', '', 'whoami' & @CRLF, 1) Sleep(3000) ProcessClose($hTelnet) Exit Updated at the bottom to reflect my more rounded down issue. It isn't that telnet is not sending more than 1 command it is sending all commands but messing up case, which is why the first command was fine because everything was lowercase. Here is the background on what I am trying to do. If you download the free TeamSpeak 3 server and connect to it with a client you can make a bookmark to 127.0.0.1 and show query clients. Once connected via the bookmark you can then telnet to port 10011 and type commands. Once the initial telnet connection is established I set it to communicate with the correct virtualserver port which is 9987 by default. Then I try and do something simple such as change the name it appears as in the list when you are viewing query clients. The problem? Running the compiled exe via a scheduled task, for some reason it only types the initial command to connect to the virtual server port running on 9987 but it will not type any further commands, as you would see if you did this test the username is your own local IP address rather than the name of "Tester 902" The script works fine when executed manually yet only gets to perform 1 telnet command and then fails for all others? Anyone have any ideas on this? I need it to be hidden yet still type the needed commands. I do not get into way over the top complicated things like manually doing network connections, sending and receiving network commands via autoit or convoluted winAPI things yet I don't want a simple "keep it on the screen, block inputs while I click and type" because then you have to stop what you are doing when it happens. Ideally I would like to use a tweaked/fixed version of this script. While I am open to other possibilities to perform these actions I only use something if I fully understand what ever it is in it's entirety. I never use external user defined functions if I do not understand parts of it because if it were to ever break down with a new version of autoit and the UDF was unsupported I couldn't fix it myself. So I am just trying to automate telnet since telnet does all the connection things that I need and so should be able to just automate that to get the job done via a scheduled task, hidden off screen. I tried to use STDIN for a command line alternative to telnet called Plink but I can never actually even manually type into the box once it connects, let alone automate typing in the box. So it seems standard Telnet is my best bet. Additional information before submitting: I have done some testing and updated the script. The issue is it seems focus of other windows while it is sending direct to the correct control is leading it to be missing the {SHIFT} aspects of the string to be sent to the control. I say "Tester" and it says 2tester2 or Something_Here and it sends instead something-here Any ideas? I think this may be a legitimate bug since it is sending strings, it just many times due to lack of focus loses the uppercase characters and thus is sending lowercase whether letters or symbols. You know what I mean. Edit: I have tried compiling as both 86 and 64 format and it doesn't change the fact that running normally, manually and clicking off the window at varying levels of speed upon telnet loading causes the case to be lost, thus making incorrect symbols and text casing. Also the problem exists every time when running the compiled script as a scheduled task.
  24. My originaly script where I was noticing this issue was quite long, so I trimmed it down considerably (93 lines to 5) to show the example issue. From what I've noticed in related topics, it's never really been solved (at least from my searches), and it unfortunately seems to not show up on all machines. Description: It seems that when using GUICtrlCreatePic() alongside GuiSetBkColor() the embedded image will get transparent artifacts. It seems as though it's light colors only - as to what colors/shades, I cannot say. Other topics: March 2012: -- April 2010 -- July 2012 -- (not actually solved) March 2005 -- Hopefully this has been solved and my searching is just lacking... ; Window $kiosk = GUICreate("", @DesktopWidth, @DesktopHeight) GuiSetBkColor("0x000000") ; Background image GUICtrlCreatePic("image.jpg", 0, 0, 640, 480) ; --- Display the Coded Form --- ; GUISetState(@SW_SHOW) Sleep(2000) Example image file used is attached, as well as a screenshot of the window as rendered on my machine (Win7 Pro x64). To be fair I'm currently running v3.3.6.1. After I post this I'll upgrade and check the current version to see if it fixes the problem(s). The "transparent_pixelation.jpg" file shows a line through the example input image. Around the "white" circle of the image there are also areas of black pixels that don't exist in the original. I'm not too familiar with using image or form functions in AutoIt (I primarily use it to automate actions) so if anyone has any ideas I'm willing to give it a shot.
  25. Hey Every1!!!!!! I have made a Func to get all the files in the Directory Mentioned , The Func even checks the Sub-Directory for the Files.................... I am Having Windows 7 32 Bit........... I know that i can get if it is a Directory using @extended Macro But ANyways i tried my own way........... So If i declare the Variable $RealFile as Local , Everything Just Works Awesome just the value of the Variable Resets upon calling the Variable again Therefore I declared the Variable as Global ........ Here the Problem Izzzzzzz Whenever I declare the Var as GLobal .............and run it a message comes up saying 'Autoit v3 Script has stopped working' Thats It the Script Exits.............. I'm Just not getting It Why the Hell isnt it working......... Here is a image of the error i get 'IMAGE' The Code is just The Following #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=X.exe #AutoIt3Wrapper_Compression=4 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt('TrayIconDebug',1) Global $NumberOfFiles=1,$x=FileSelectFolder('Heya',''),$RealFile[$NumberOfFiles] Global $eXt='*.mp3' Global $glo=_ListFiles_SubDirectory($x,$eXt) For $i=1 To UBound($glo)-1 FileWriteLine('Abhishek.txt',$glo[$i]) Next Func _ListFiles_SubDirectory($folder,$Pattern='*.*',$SubFolder=1) Dim $Search _CheckSlash($folder) $Search=FileFindFirstFile($folder&'*.*') If @error Then ConsoleWrite($folder&" Doesn't Contain Any Files"&@CRLF) #cs Checking For All The Files So That It can Be Figured Out ,If Not Even A Single File Of The Mathcing Pattern Is Present #ce While $search<>-1 $RealFile[0]=FileFindNextFile($Search) If @error Then ExitLoop If IsDirectory($folder&$RealFile[0]) Then ReDim $RealFile[$NumberOfFiles+1] Local $z=$NumberOfFiles $RealFile[$NumberOfFiles]=_ListFiles_SubDirectory($folder&$RealFile[0],$Pattern) ConsoleWrite('Listed: '&$folder&$RealFile[$x]&@CRLF) $NumberOfFiles+=1 EndIf WEnd FileClose($search) #cs The Part Of The Func Which Does The Main Role Is Just The Following #ce If IsArray($Pattern) Then For $x In $Pattern $Search=FileFindFirstFile($folder&$x) While $search<>-1 ReDim $RealFile[$NumberOfFiles+1] $RealFile[$NumberOfFiles]=FileFindNextFile($Search) If @error Then ExitLoop EndIf ConsoleWrite('Found: '&$RealFile[$NumberOfFiles]&@CRLF) $NumberOfFiles+=1 WEnd Next Else $Search=FileFindFirstFile($folder&$Pattern) While $search<>-1 ReDim $RealFile[$NumberOfFiles+1] $RealFile[$NumberOfFiles]=FileFindNextFile($Search) If @error Then ExitLoop EndIf ConsoleWrite('Found: '&$folder&$RealFile[$NumberOfFiles]&@CRLF) $NumberOfFiles+=1 WEnd EndIf FileClose($search) Return $RealFile EndFunc Func IsDirectory($folder) If Not FileExists($folder) Then Return -1 Local $Directory=StringInStr(FileGetAttrib($folder),'D',2) If $Directory<>0 Then Return 1 Return 0 EndFunc Func _checkslash(ByRef $2check) If StringRight($2check,1)<>"" Then $2check&="" Return 1 EndFunc If any1 here knows the possible solution of the Problem Plz Reply to me Thnx In Advance Regards PhoenixXL
×
×
  • Create New...