Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. @Jos That does make sense, thanks. Your lexer sounds good. I know that it is very selfish of me to ask this, but if this request is not too much of a bother for you, can you list the names of the files which contain this lexer and other keyword data in SciTE? I wish you a lot of time!... and the same for me too
  2. Great to hear that, I would love to see your existing work... even if it is not complete or fully suitable for the task. I wish you luck!
  3. @argumentum Looks like a good read, but it does not describe how to actually write the grammer of a language. Still it might come in handy, thanks. I am already familiar with the lingo of formal format specification documents, as I have read several IETF RFCs... primarily those related to IRC
  4. @jchd Oh wouldn't I love to get my hands on a formal grammer definition. But alas, the chances for such a thing to exist are bleek... let alone the chances for me to get it Hopefully my effort will improve the situation in this regard.
  5. You are right. I could have used better words. What I wanted to say is was that I will make a complete technical reference for the whole language syntax, maybe even including some BNF notation! There are two purposes of me wanting to do this: I want to understand the syntax better as a whole and break it into parts It will serve as a good reference for both me and other people who want to work with my project or with the AutoIt syntax in their own project So everyone please send me anything they have which can help me in this matter! Maybe the AutoIt Dev team has some informal text about this lying somewhere? I bet there is a "test script" which was in use when AutoIt v3 was in development, however it might be buried deep after all these years. I would love to get my hands on them
  6. That is a good suggestion, I did not think of it, thanks. However my guess is that it does not fully comprehend or account for all the possible syntax variations, just the basics like identifying operators, variables, function etc. ...And potentially all that might work on basis of RegEx, god forbid if that is the case Maybe @Jos can shed some light on this?
  7. Does anyone know of or have a "reference script" which showcases all possible AutoIt syntax? I am planning to write a document which describes the syntax of the language, split it into parts and make it easier to digest. This will help me understand the syntax more so that I can come up with a proof-of-concept program which does some basic task like parsing a script and and producing an "Abstract Syntax Tree", which in simple terms means an array or structure which programatically holds all the units of the script so that it is easier to process later.
  8. @joboy2k This issue seems to be solved in the latest update of VirtualBox. There was an issue with shared folders which was effecting Windows guests which surfaced in the previous update which caused Windows to crash whenever opening a shared folder with executables, this has been fixed in the latest update. Seems like this issue maybe related and also got fixed in the update as the result of improving the code related to folder sharing. Please update to the latest version of VirtualBox (currently 6.0.12) and make sure you update the guest additions on Windows too! This is a bug in the guest additions as far I know. Here is the ticket for the bug I mentioned: #18766 (6.0.10 r132072 crashes Windows VM when Shared Folders are used)
  9. If the file that you want to read is in binary, make sure you use the $FO_BINARY flag in FileOpen. Also, reading byte by byte is not really efficient... I recommend reading in reasonably large chucks (maybe 4 kilobytes) which would still be small compared to the whole file.
  10. @joboy2k Interesting findings, thanks for testing and tracking down this issue more, I will try to reproduce the outcome with latest VirtualBox.
  11. FileInstall is a complex function, no way standard C++ would have support for something like it. The most portable way that I can think of is to use a small preprocessor tool/script which generates a C/C++ source file which contains your file (which needs to be embedded) in binary form in an array maybe... then you can manually use that array directly in your program to use it, or "extract" it by using one of the standard file writing functions
  12. The wiki is more of a community effort as I see it. In any case, the documentation (help file) is the official support resource which comes packed in the installer. Use the help file for any solid references and the wiki for everything else.
  13. Aside from the ghost in the machine or gremlins, there is only one logical explanation... somewhere in that function, is a statement which updates the "critical data", it doesn't have to be the variable directly, sometimes other factors may influence it in ways that may have been forgotten. I suggest you do a full review of the code, especially the function which gives you the warning message. You will certainly find the culprit sooner or later.
  14. C and all other C-like languages do not use whitespace for terminating statements, so you have to use the semi-colon to indicate the end of a statement. While I do see the benefits of having a simple syntax where each line is a command, there are several neat things you can do without taking up a bunch of lines where whitespace doesn't matter... Like a single line for loop It all comes down to preference obviously, those are more well versed with C-like programming and have good enough experience may prefer to have a more flexible syntax over a simple but restrictive one. Anyone using JavaScript is already probably taking advantage of the "whitespace-agnostic" syntax unknowingly... whitespace based statement structure in these languages is also not really pretty in some cases, so if you can't make it pretty, make it short (while keeping it readable).
  15. I am afriad it isn't directly possible to monitor a specific variable for changes from within the script itself. Seeing how AutoIt lacks a native debugger, it may also not be possible for the several 3rd party debuggers to accomplish this task, however I recommend trying out some of them, see if they are of help. Good luck
  16. Interesting algorithm which I should check out... but I have one pedantic detail that you can improve, use StringIsDigit instead of a regex for only checking if the string has digits
  17. I agree, _IsPressed might make it easier for them to understand it... however a simple example can go a long way: HotKeySet("^b", StopLoop) Global $bLoopActive = True While True ; This is your loop that you want to exit Sleep(10) ; I am using the Sleep function as an example for the work that you want to do in a loop ; At the end of the loop, you can check if the loop has been stopped by the hotkey If Not $bLoopActive Then ExitLoop WEnd Func StopLoop() $bLoopActive = False EndFunc I wrote the above code in my browser and I did not test it, so please forgive any mistakes that I made in the example and correct them
  18. Agreed... still, having native support in the language would be a great feature to have
  19. The latest update is that the Map datatype is as good as dead, according to @jchd it is deprecated and here is something Jon mentioned in the private MVP forum: So he won't be including it as it is, but it did stay in Beta for the moment. Don't hold your breath though to get this fixed and included. Source:
  20. @Jos Such a shame... oh well, AutoIt is already good enough with the current data types Definitely adding this to the ToDo list of my implementation of AutoIt for sure though.
  21. I agree @Inpho You may wrap scripting.dictionary like BrewManNH has suggested, you can use these functions as inspiration: _Map_DictObjectToMap _Map_MapToDictObject
  22. What!? When? Why? Was there any official annoucement?
  23. @Inpho You might be interested in the _Map_IniToMap and _Map_MapToIni functions from the Map UDF
  24. I don't agree that it is better... much better if you use a global variable which can act as an indicator which you can check in every iteration of the loop. Use a function with HotKeySet and when pressed, activate the indicator by changing the global variable's value (can be a simple boolean like True) and the loop will exit the next time it checks the variable... much efficient than calling _IsPressed everytime.
  25. @TekWeis Use the AutoIt interperter (AutoIt3.exe) to execute your plain text .au3 scripts or compile them to the .a3x format. This way most AV would not falsely flag your scripts as no executable would be associated with them.
×
×
  • Create New...