Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/18/2016 in all areas

  1. Here is the first new issue of the debugger for a long time! Error List: Variables: Tool Chest: Class Viewer: Features: Automatic updates.COM operation replaced with Windows messaging (script no longer closes when program finishes).Output window, showing Console output.Automatic program tracing.Toggle between Release and Debug AutoIt.Script editing using ScintillaNET editor (looks and feels the same as SciTE).Single step debug through your script and #include files.Debug script in compiled (exe) or script (au3) form.View and modify variable values while your program is running. Allows you to test all parts of you program.Breakpoints (toggled by clicking on the line number). Breakpoints are stored between sessions.Scripts can be debugged by right clicking on the au3 file, running the debugger from the Start>Programs menu, from UltraEdit/UEStudio by using AutoIt4UE, or from within SciTE with this mod.Portable version (just install and select 'Portable' instead of 'Full').Automatic Context Check option.Access to 3rd party tools (Context Check, Koda, open in SciTE, Run script, Compile script, Tidy, Code Wizard).Easy switch between Release and Beta AutoIt.Syntax highlighting in either SciTE, or Visual Studio style.Upcoming features (don't hold your breath though!): Detection of changes in the script and prompt to automatically reloadVariable breakpoints (stop if x>1, or @error=1)Variable value tooltips in the code windowSome method of jumping back in the script to an earlier line without restarting. Don't really know if this is possible without the GOTO command.Some sort of variable value popup window to allow long strings to be viewedRun to Cursor option in code windowHere is link to a web page for the program: Autoit Debugger
    1 point
  2. Hello everybody, many languages like Java have got a little helper tool in their IDE, which cares for the right import/include statements. The helper tool adds the necessary lines for including the needed libraries(or UDFs). This script organizes the includes for AutoIt and it can be added to SciTE4Autoit3 very easily. Getting started? 1) Extract the zip here (ProgramsDIR) ..AutoIt3SciTE 2) Open SciteUser.properties You'll find the file here : @DocumentsDirUSER or via SciTE menu --> [ Options --> Open User Option File ] Add these lines to add OrganizeIncludes to the SciTE menu. # 36 OrganizeIncludes #command.36.*.au3="$(autoit3dir)\beta\autoit3.exe" "$(SciteDefaultHome)\OrganizeIncludes\OI_1.0.0.50.au3" "$(FilePath)" command.36.*.au3="$(SciteDefaultHome)\..\autoit3.exe" "$(SciteDefaultHome)\OrganizeIncludes\OI_1.0.0.50.au3" "$(FilePath)" command.name.36.*.au3=OrganizeIncludes command.save.before.36.*.au3=1 command.is.filter.36.*.au3=1 command.shortcut.36.*.au3=Ctrl+Shift+Alt+I If the Autoit3 exe is not found then replace this variable $(autoit3dir) by the correct path. command.36.*.au3="$(autoit3dir)autoit3.exe" "$(SciteDefaultHome)OrganizeIncludesOI_1.0.0.50.au3" "$(FilePath)" command.36.*.au3="c:ProgrammeAutoit3autoit3.exe" "$(SciteDefaultHome)OrganizeIncludesOI_1.0.0.50.au3" "$(FilePath)" 3) DONE Starting the script by hitting CTRL+SHIFT+ALT+I in Scite, it shows you what include files you need and which you do not need. There is also a helpfile in the zip-file which shows all settings. Old version download ~ 3000!!! THANKS!!! Old versions thread Thanks for every comment/idea! Mega OrganizeIncludes.zip
    1 point
  3. AutoBert

    App With Timer Help

    You use Opt("GUIOnEventMode",1) but trying to get events with GuiGetMSG. Delete the line 21 and your script works. Read the GUIReference in the hlepfile and you will understand.
    1 point
  4. Try soaking your hard drive in salty water over night.
    1 point
  5. I like the colour change because it immediately tells me that the last letter/number I entered was wrong.
    1 point
  6. ; a few changes in the Func _ParseFile($sText) ; Change 1 ;Local $aKey_Value[1][2] = [[0]] Local $iArraySize = 70000 ; Manual ArraySize Local $aKey_Value[$iArraySize][2] = [[0]] ; Change 2 ; Increase array size $aKey_Value[0][0] += 1 ;ReDim $aKey_Value[$aKey_Value[0][0] + 1][2] The ReDim function is taking a lot of time.. The above code works faster.
    1 point
  7. mikell

    array and StringRegExp

    Suggestion... #Include <Array.au3> ;$array = StringRegExp(FileRead("array.txt"), '\|(\N*)', 3) ; _ArrayDisplay($array) ; <<< use your array as $array >>> $u = UBound($array) Local $res[$u][2], $n For $i = 0 to $u - 1 If StringInStr($array[$i], "<Name>") Then $res[$n][0] = StringRegExpReplace($array[$i], '.*<Name>(.*)', "$1") $n += 1 ElseIf StringInStr($array[$i], "<Value>") Then $res[$n][1] = StringRegExpReplace($array[$i], '.*<Value>(.*)', "$1") $n += 1 EndIf Next Redim $res[$n][2] _ArrayDisplay($res)
    1 point
  8. Nubie, Not too hard: #include <StringConstants.au3> #include <Array.au3> $sText = _ '"rarities"' & @CRLF & _ ' {' & @CRLF & _ ' "default"' & @CRLF & _ ' {' & @CRLF & _ ' "value" "0"' & @CRLF & _ ' "loc_key" "1"' & @CRLF & _ ' }' & @CRLF & _ ' "common"' & @CRLF & _ ' {' & @CRLF & _ ' "value" "2"' & @CRLF & _ ' "loc_key" "3"' & @CRLF & _ ' }' & @CRLF & _ ' }' ; ######################################################################################## ; Parse the file into an array $aKey_Value = _ParseFile($sText) _ArrayDisplay($aKey_Value, "Read", Default, 8) $aMatch = _GetChildren('"rarities"', $aKey_Value) _ArrayDisplay($aMatch, '"rarities"', Default, 8) $aMatch = _GetChildren('"rarities"\"default"', $aKey_Value) _ArrayDisplay($aMatch, '"rarities"\"default"', Default, 8) ; ######################################################################################## Func _GetChildren($sPath, $aKey_Value) ; Create array to hold children with counter Local $aMatch[UBound($aKey_Value)], $iCount = 0 ; Loop through the passed array For $i = 1 To $aKey_Value[0][0] ; If the path is found in the array, extract the next item (note the need to escape the "\" character) $aRet = StringRegExp($aKey_Value[$i][0], "(?U)" & StringReplace($sPath, "\", "\\") & "\\(.*)(?:\\|\z)", 3) If Not @error Then ; Check if item is already in match array _ArraySearch($aMatch, $aRet[0]) If @error Then ; and add if not $aMatch[$iCount] = $aRet[0] $iCount += 1 EndIf EndIf Next ; Remove blanks from match array ReDim $aMatch[$iCount] Return $aMatch EndFunc ;==>_GetChildren Func _ParseFile($sText) Local $aKey_Value[1][2] = [[0]] $aArray = StringSplit($sText, @CRLF, $STR_ENTIRESPLIT) $sParent = "" For $i = 0 To $aArray[0] $sLine = $aArray[$i] StringReplace($sLine, '"', "") Switch @extended Case 0 ; Up/down a level Switch StringStripWS($sLine, $STR_STRIPALL) Case "{" ; Up a level $sParent &= "\" Case "}" ; Down a level $sParent = StringRegExpReplace($sParent, "(^.*\\)(.*\\)", "$1") EndSwitch Case 2 ; Path element $sParent &= StringStripWS($sLine, $STR_STRIPALL) Case 4 ; Key/value pairing $aPairing = StringRegExp($sLine, '(?U)(".*")', 3) ; Increase array size $aKey_Value[0][0] += 1 ReDim $aKey_Value[$aKey_Value[0][0] + 1][2] ; Add data $aKey_Value[$aKey_Value[0][0]][0] = $sParent & $aPairing[0] $aKey_Value[$aKey_Value[0][0]][1] = $aPairing[1] EndSwitch Next Return $aKey_Value EndFunc ;==>_ParseFile As always, please ask if you have any questions. M23
    1 point
  9. Nubie, This might do the trick: #include <StringConstants.au3> #include <Array.au3> $sText = _ '"rarities"' & @CRLF & _ ' {' & @CRLF & _ ' "default"' & @CRLF & _ ' {' & @CRLF & _ ' "value" "0"' & @CRLF & _ ' "loc_key" "1"' & @CRLF & _ ' }' & @CRLF & _ ' "common"' & @CRLF & _ ' {' & @CRLF & _ ' "value" "2"' & @CRLF & _ ' "loc_key" "3"' & @CRLF & _ ' }' & @CRLF & _ ' }' ; ######################################################################################## ; Parse the file into an array $aKey_Value = _ParseFile($sText) ; Extract a value $sKey = '"rarities"\"default"\"loc_key"' $sRet = _ReturnValue($sKey) MsgBox($MB_SYSTEMMODAL, "Value", $sRet) ; ######################################################################################## Func _ParseFile($sText) Local $aKey_Value[1][2] = [[0]] $aArray = StringSplit($sText, @CRLF, $STR_ENTIRESPLIT) $sParent = "" For $i = 0 To $aArray[0] $sLine = $aArray[$i] StringReplace($sLine, '"', "") Switch @extended Case 0 ; Up/down a level Switch StringStripWS($sLine, $STR_STRIPALL) Case "{" ; Up a level $sParent &= "\" Case "}" ; Down a level $sParent = StringRegExpReplace($sParent, "(^.*\\)(.*\\)", "$1") EndSwitch Case 2 ; Path element $sParent &= StringStripWS($sLine, $STR_STRIPALL) Case 4 ; Key/value pairing $aPairing = StringRegExp($sLine, '(?U)(".*")', 3) ; Increase array size $aKey_Value[0][0] += 1 ReDim $aKey_Value[$aKey_Value[0][0] + 1][2] ; Add data $aKey_Value[$aKey_Value[0][0]][0] = $sParent & $aPairing[0] $aKey_Value[$aKey_Value[0][0]][1] = $aPairing[1] EndSwitch Next _ArrayDisplay($aKey_Value, "Final", Default, 8) Return $aKey_Value EndFunc Func _ReturnValue($sKey) $iIndex = _ArraySearch($aKey_Value, $sKey, 1) If Not @error Then Return $aKey_Value[$iIndex][1] Else Return "Error" EndIf EndFunc M23
    1 point
×
×
  • Create New...