Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/28/2025 in all areas

  1. Sleep(500) Local $hTrayWnd = WinGetHandle("[CLASS:Shell_TrayWnd]") Local $hTlb = ControlGetHandle($hTrayWnd, "", "ToolbarWindow324") If @error Then $hTlb = ControlGetHandle($hTrayWnd, "", "ReBarWindow321") Local $aWPos = WinGetPos($hTrayWnd) Local $aTPos = ControlGetPos($hTrayWnd, "", $hTlb) If @error Or UBound($aTPos) <> 4 Then Dim $aTPos[5] $aTPos[4] = @error ; or whatever you decide to do EndIf ConsoleWrite($aWPos[0] + $aTPos[0] & "," & $aWPos[1] + $aTPos[1] & "," & $aWPos[0] + $aTPos[0] + $aTPos[2] & "," & $aWPos[1] + $aTPos[1] + $aTPos[3] & @CRLF) ; Find a blue pixel from the autoit icon Local $aCoord = PixelSearch($aWPos[0] + $aTPos[0], $aWPos[1] + $aTPos[1], $aWPos[0] + $aTPos[0] + $aTPos[2], $aWPos[1] + $aTPos[1] + $aTPos[3], 0x5D83AC) Local $aCoord = PixelSearch(@DesktopWidth - (@DesktopWidth / 3), @DesktopHeight - 70, @DesktopWidth, @DesktopHeight, 0x5D83AC) ; testing If Not @error Then ConsoleWrite("X and Y are: " & $aCoord[0] & "," & $aCoord[1]) MouseMove($aCoord[0], $aCoord[1], 100) ; * <-- for debugging purposes only Sleep(1000) EndIf ..when coding, check for @error(s).
    1 point
  2. I understand what you mean. I remember doing a lot of that when I was a teenage. The main goal was to lower all of the system resources being used and squeeze as much performance out of the hardware. Especially for gamers but also performance in general. But what I meant was trying to find a way to handle that error better with the Powershell module. Also, I am trying to see if maybe there is a better command to achieve the same thing that is supported on a Windows editions. I am still researching that at the moment.
    1 point
  3. @jaberwacky You are right. Doc is mistaken. Also there is a bug in the example of _GUICtrlEdit_SetTabStops. The icon on the status bar is not showing. After debugging, the call to DestroyIcon is the culprit, need to make a tracker...
    1 point
  4. No, it's actually python. I have attached it for those who are curious import sys import json import os def main(): if len(sys.argv) < 2: print("No file specified.") sys.exit(1) json_file = sys.argv[1] if not os.path.isfile(json_file): print(f"File not found: {json_file}") sys.exit(1) try: with open(json_file, 'r', encoding='utf-8') as f: json.load(f) print(f"Valid JSON: {json_file}") except json.JSONDecodeError as e: # Format error output the way SciTE likes: print(f'File "{json_file}", line {e.lineno}, column {e.colno}') print(f"Error: {e.msg}") sys.exit(1) if __name__ == "__main__": main() I made a script that has errors in python, looked at it's output, and made my error output be formatted as simularly as I can. it doesn't _initially_ create any inline error markers - they only appear if you doubble click the red lin in the console, which goes to the relevant line of the .json _and_ makes the error marker. Come to think of it, this might be something au3wrapper does? How exactly does that work? The json.properties are as follows: # Define SciTE settings for JSON files. file.patterns.json=*.json;*.eslintrc;*.jshintrc;*.jsonld *source.patterns.json=$(file.patterns.json); filter.json=JSON (json eshintrc jshintrc)|$(file.patterns.json)| *filter.json=$(filter.json) lexer.$(file.patterns.json)=json *language.json=JSON|json|| lexer.json.allow.comments=1 lexer.json.escape.sequence=1 clear.before.execute=1 # JSON keywords keywords.$(file.patterns.json)=false true null # JSON-LD keywords keywords2.$(file.patterns.json)=@id @context @type @value @language @container \ @list @set @reverse @index @base @vocab @graph # Default style.json.0=fore:FFFFFF # Number style.json.1=fore:#007F7F # String style.json.2=fore:#7F0000 # Unclosed string style.json.3=fore:#FFFFFF,back:#FF0000,eolfilled # Property name style.json.4=fore:#880AE8 # Escape sequence style.json.5=fore:#0B982E # Line comment style.json.6=fore:#05BBAE,italics # Block comment style.json.7=$(style.json.6) # Operator style.json.8=fore:#18644A # URL/IRI style.json.9=fore:#0000FF # JSON-LD compact IRI style.json.10=fore:#D137C1 # JSON keyword style.json.11=fore:#0BCEA7,bold # JSON-LD keyword style.json.12=fore:#EC2806 # Parsing error style.json.13=fore:#FFFFFF,back:#FF0000 command.go.*.json="$(SciteDefaultHome)\validate_json.exe" "$(FilePath)" command.go.subsystem.*.json=1 command.go.clearoutput.*.json=1 This was installed over the scite 4 au3 installation that autoit uses. I still use autoit now and then, but SciTE has become my general purpose text editor for quite some time now.
    1 point
  5. It sure is, 13 lines will remain 13 lines, no matter the number of policies. One line could even be shorter (the Case Else line) Global $aWords[1][11] = [["", "Error:", "Error " & $policycorrect & " &" & " Error " & $policycount]]
    1 point
  6. Nine

    GIF Animation (cached)

    Solve possible crash after deletion. New version available
    1 point
×
×
  • Create New...