Jump to content

corgano

Active Members
  • Posts

    946
  • Joined

  • Last visited

  • Days Won

    2

corgano last won the day on November 14 2013

corgano had the most liked content!

Profile Information

  • Location
    Here
  • WWW
    http://corgano.co.cc
  • Interests
    Pie, autoit

Recent Profile Visitors

1,031 profile views

corgano's Achievements

  1. Ahh, but I would need to implement that in the exe, which is python, or redo the JSON verification in autoit instead. Do you know where I can find documentation on what _SendSciTE_Command does (how it interfaces with SciTE)? Or source for the _SendSciTE_Command udf?
  2. 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.
  3. This isn't strictly autoit related, but this seems to be the most active place with a knowledge base in SciTE configuration. I was using SciTE to edit .json files, and I made an EXE I have it run to validate the .json is valid. It works, it creates the red links in console, and if I click a red link it brings me to the line and places an inline error marker However, if I fix the error and run the validation again, it says everything is fine but the marker for the error is still there. Going to search -> clear bookmarks does clear them How do I configure my json.properties to clear the line error bookmarks every time I run the go command?
  4. Maybe not autoit related but kinda. I'm using the full SciTE for Au3 editor as a general text editor as well for autoit. I really like the way the console output is colored, however I cannot find a way to search through it. I can copy the console output to ex a new file, but then it has different coloring than it did in the console - which is quite disorienting. Is there an option to let me select that the text should be colored like console messages - similar to how you can select if it's perl, php, pythjon, xml, lua, etc? I'd like an entry for just... console output colouring. Feel free to move this if it's not the right section.
  5. MY application is I'm setting up a home media center / emulation setup. Instead of using a keyboard and mouse for controlling the setup, I got a ps4 controller and a wireless mini keyboard that clips into the controller for the user interface. DS4Window takes the controller touchpad and uses it as a mouse, and there I go - mouse, keyboard, controls, all in the palm of your hands. The issue I have is there is no ctrl, alt, tab, of F keys on the keyboard in question. What I WANT to do Is set up autoit hotkeys for the mini keyboard specifically, without effecting other devices / keyboards connected to the computer. For instance pressing F+1,2,3... on the mini keyboard to send {F1}, {F2}, etc on the computer. I'd also like to set up hitting 1 and 0 to do Alt+tab. I'm aware that this question has been asked several times before, but never really resolved. Right now I'm working through the example in this thread to try and set it up. However this thread was from three years ago, and most other threads are even older than that. HAs there been any developments since then that make this easier? Like a _Hotkeyset_ex() function or something?
  6. $FLTAR_FASTSORT gives me almost EXACTLY what I want - but it sorts it FILESA-Z then FOLDERSA-Z. Any way to make it have FOLDERS first?
  7. I have a list of files from _FileListToArrayRec. I then _ArraySort them and put them into a treeview so i can browse the structure of the folders. It works but it sorts the files too literally, giving me this: A file B file B subfolder A subfile B subfile C subfile C subfolder A subsubfile B subsubfile D subfile E subfile C file C subfolder A subfile A subfolder A subsubfile B subfile What I want is in each subfolder, It to list the FOLDERS in alphabetical folder, and then the FILES. B subfolder C subfolder A subsubfile B subsubfile A subfile B subfile C subfile D subfile E subfile C subfolder A subfolder A subsubfile A subfile B subfile A file B file C file Most threads I found when googling this say something along the lines of "Just get a list of folders and files separately, and then put the two arrays files after folders" but that only works for a single folder, it doesn't work for recursive folders. Has anyone found a way to get the desired result?
  8. Actually a good point. Why do we have separate functions for the two? Is there some kind of benefit to it?
  9. Ok a bit of a derp here - the folder contained only one single large file. When it moved the file i wrongly concluded it moved the entire FOLDER. If I made this mistake on a folder with multiple items in it I (hopefully) would have caught on to what was happening. Renaming the file worked and i was back on my way, thanks It'd still be cool to add either a note in the help file mentioning this behavior, or a check that the path is a file and not a directory. When you give DirMove a file, it does nothing, so giving FileMove a dir should also do nothing for consistency (as an anti-idiot measure)
  10. Ran into a very stupid mistake I made that was a pain in the ass to undo, and I'm wondering if this behavior is intended I was trying to rename a FOLDER, and I accidently did a FileMove( "path to a folder", "path to what you want to name it"). If I noticed my error, I would EXPECT it to throw an error, but what It did instead is happily accept the folder and write out a file with its contents... Which is a bit of a problem. Not only is this an easy mistake to make, but windows provides no way to change files to folders. There's windows functions to set file attributes... which specifically forbid setting the D (directory) attribute, which makes it difficult to change back. When used on a FILE (trying to do the opposite mistake to undo the first one) DirMove("path of folder renamed to file", "name of a folder") simply ignores the file. This presents an inconsistency, either: A: FileMove should be hard-coded to ignore directories, to prevent folder->file conversion B: FileMove should REMEMBER the D attribute of a file / folder it renames and ensure the output has the same flag (set or unset) to ensure it can't change the D attribute of files / folders C: DirMove should be modified to create the same behavior, so if you provide it a FILE it will write it as is as a FOLDER (set the D attribute to true) Then you'd be able to prevent the issue, or recover from it.
  11. I was hoping that there was a way to like, binary read the file, change the flag in there, and then binary write a directory - or just change it directly - instead of having to copy ALL the files. It took 40ms to change the folder to a file, there has to be a faster way to change it back How can fileMove even do that? Shouldn't it like.. check that it's moving files or something? EDIT: I tried using recuva, but it recovered the "file" and not the actual folder. Not sure where to go now.
  12. That was an example, the "file" has a bunch of my photos in it. I know the data is still there because it has the right size. It even left the old folder behind.. But functions like FileSetAttrib don't let you set the D flag to tell the filesystem it's a DIRECTORY, and when I FileMove'd it, it unset that flag..
  13. Ok so I did a stupid. I was trying to rename a folder but I used FileMove instead of DirMove, and it turned the folder into a "file" that windows doesn't know how to fix. Doing the opposite, turning the "file" back into a folder with DirMove, does not work... How do I recover the folder? FileMove("new folder", "new should be folder") How do I undo this... EDIT: SOLUTION If you FileMove with a DIRECTORY instead of a FILE as the first param, it will move the first file in that directory. I didn't notice because the folder had only one file to begin with... derp. Just rename the file to its original name and carry on.
  14. Damnit, I literally just got it $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args":["user-data-dir=userData"] } }}}' However using @scriptdir didn't work for me. simply having =userData worked though. What about hving a persistent window and just re-attaching to it? any ideas?
  15. IT looks like it should be _WD_Option('DriverParams', '--user-data-dir='&@ScriptDir&'\userdata\ --log-path=' & @ScriptDir & '\chrome.log') The chrome.log is created right, but the user data dir isn't created or used if it exists. Any ideas? Edit: This leads me to believe it's not a command line peram, but it's stated here: http://chromedriver.chromium.org/capabilities That it is possible. Where would I go to ask about it?
×
×
  • Create New...