Search the Community
Showing results for tags 'programming'.
-
Hi everyone! I'm using AutoIt for several years now and I really get the hang of it! I'm quite the curious OCD perfectionist kind of guy, so I can't help wondering.. what would be the best way to program stuff for the compiler / interpreter / scripting engine? We're talking about the inner workings of the AutoIt's core here, and how to give it as less friction as possible but also take care of the machine running the script. For example, Imagine a script where we would constantly have to assign a Boolean value to a variable: ; A: local $bool = false $bool = true $bool = true $bool = false ; B: local $bool = false check(true) check(true) check(false) func check($b) if $bool = $b then return $bool = $b endfunc In this case, would it be better to just overwrite (A) the variable or first check if we really need to (B)? What would be best for the computers memory if it had to do this for a year non stop? Another example, imagine you're writing a function with an if statement. If you would look under the hood of AutoIt, what would be the best way to give your computer as less work / code nesting stack filling as possible: ; A: func decide($b_Input) if $b_Input then ;do something else ;do something else endif endfunc ; B: func decide($b_Input) if $b_Input then ;do something return endif ;do something else endfunc Last one for now: ; A: while 1 ; do stuff wend ; B: while true ; do stuff wend Isn't AutoIt taking an extra step in converting 1 to a Boolean in example (A)? Or is it the other way around and does the (B) way make AutoIt first convert a keyword (true or false) to a numerical value (0 or 1). I think this kinda detail stuff is quite interesting, makes me wonder how AutoIt converts and runs our code. What are your opinions on this topic? Any coders who know more about the inner workings of AutoIt? Any people like me who ask themselves similar questions (with examples)? Let me know! 😉
- 41 replies
-
- programminglanguage
- programming
-
(and 1 more)
Tagged with:
-
Hi, i'v just uploaded my latest project: Simple Snippet Manager to the Downloads. area : The intended usage is to select a Snippet, and to copy it's contents into your favorite Editor. The Copy/Paste process happens over the (windows)Clipboard. The previous clipboard content is not restored. There is a time limit of 60 seconds, in which the pasting of the text is allowed (starting when the App window gets inactive). The Hotkey is reenabled, when the main Window is activated. This is a File/Folder based manager. The App is configured to hold 4000 files and 400 folders with searching depth of 5 sub-folders. The root folder is freely selectable, but it should be a Folder with writing permission. Please install the App in a folder with Writing permission, too. This App only uses an .ini file to save it's configuration, which has to be in the same folder as the App. First configuration: 1. Open the config Window. 2. Enter the Language name, create or seek a root folder, enter an extension. 3. Click on Set button. 4. Click on the Exit button. The Language configuration is done, adding files or folders are needed: 1. Select the language from the dropbox list, and click on Get Lang button. 2a. Right Click on the root folder, chose New folder to add categories. 2b. or chose New/Edit file to open the builtin text editor 3. Paste or Write a snippet-code, enter a filename and save it. (Repeat the 3. as needed) Usage: Select a language, then click on Get Lang button. Choose a file with the left mouse button. Check if the code was loaded in the Textarea at the bottom. Switch to your Sourcecode editor, and press the Hotkey (default= Ctrl/Strg b) to copy and paste the text. There is a time limit of 60 seconds, after the main window gets inactive, in which the copy&pasting is allowed. Changelog: V1.02 (24.06.2020) Addition: Undocumented ini setting: StartLoadLastUsedLanguage Setting this to 1 (default value) will now reload the Last used language at start. Last used language counts for the Language, selected with [Get Lang] button. The [Config] button will delete the last used language. LastUsedLanguageNr, LastUsedLanguageName ini settings are used internaly for the above function. Added version string to the main Window title. V1.01 (23.06.2020) Bugfix : Starting the App without the ini file now sets the correct starting Hotkey (Ctrl b) Addition: Clipboard is saved, before pasting, and restored after pasting. (May work with text data only. p.s. untested!)
-
Version 1.02
497 downloads
Simple Snippet Manager (AutoIt v3.3.14.5) The intended usage is to select a Snippet, and to copy it's contents into your favorite Editor. The Copy/Paste process happens over the (windows)Clipboard. The previous clipboard content is not restored. There is a time limit of 60 seconds, in which the pasting of the text is allowed (starting when the App window gets inactive). The Hotkey is reenabled, when the main Window is activated. This is a File/Folder based manager. The App is configured to hold 4000 files and 400 folders with searching depth of 5 sub-folders. The root folder is freely selectable, but it should be a Folder with writing permission. Please install the App in a folder with Writing permission, too. This App only uses an .ini file to save it's configuration, which has to be in the same folder as the App. First configuration: 1. Open the config Window. 2. Enter the Language name, create or seek a root folder, enter an extension. 3. Click on Set button. 4. Click on the Exit button. The Language configuration is done, adding files or folders are needed: 1. Select the language from the dropbox list, and click on Get Lang button. 2a. Right Click on the root folder, chose New folder to add categories. 2b. or chose New/Edit file to open the builtin text editor 3. Paste or Write a snippet-code, enter a filename and save it. (Repeat the 3. as needed) Usage: Select a language, then click on Get Lang button. Choose a file with the left mouse button. Check if the code was loaded in the Textarea at the bottom. Switch to your sourcecode editor, and press the Hotkey (default= Ctrl/Strg b) to copy and paste the text. There is a timelimit of 60 seconds, after the main window gets inactive, in which the copy&pasting is allowed. The Download includes: 32 + 64bit exe, sourcecode, icon, read me text and 2 Instructional Helpfiles in Html and PDF format. -
Version 2018.05.24
2,838 downloads
Dbug is graphical debugger for AutoIt. Project started by @Heron in 2009 and now supported by @asdf8 and @valdemar1977. Features Debug the complete script or just parts of it Display run status (line number of currently executed function) GUI default always-on-top in the upper right corner for comfortable debugging WM_NOTIFY and WM_COMMAND hook to prevent interference with possible message handlers Display scope, type and value of variables, expressions, macro's and constants (global AND function local) Execute commands in an immediate window. Can be expressions, functions and assignments Detailed display of array, struct and object variables Dynamic display of variable value in the source code (under cursor) Array table viewer with ability to view the sub-arrays, the correct handling of macro @Error, @Extended and other changes OEM and ANSI console output Conditional breakpoints Saving settings and debugging state and much more... How to use Extract from downloaded archive _Dbug.au3 to your Autoit include dir Add #include <_Dbug.au3> in to your code and run code Before compile or buid comment or remove #include <_Dbug.au3> from your code-
- debug
- programming
-
(and 3 more)
Tagged with:
-
Ok, hi guys. First, let me say that this is just a concept, an idea, I don't know enough programming to do that but I had this weird idea for a programming language. I don't know if this also exists. I was playing with AutoIt, and then the #region gave me a weird idea, what I call "Regional Programming". Imagine this, scripting with regions instead of variables and function, a mix of both. A region can contain values or orders, for example (I'm gonna use AutoIt-like scripting): Global #Region Data "Think of this as a big variable where you can put everything in everyline and it can have multiple kind of values, if you don't close this string you can still write on everyline" "Now this is another value, as concept, it might act like Arrays, but I'm not sure of this. Data[0], Data[1]" 141234234 "It can also contain other kind of values." "Yes, I like space-sensitive scripting" #EndRegion Data You can declare all region as global, or local, and you can declare regions in regions, maybe this can be a little hard to read... You can also put code in regions: Global #Region Code "Ok, this is a value, you can mix both, so if you call Code[0] you have this, and if you call Code[1] you have a function" MsgBox($MB_ICONINFORMATION, 'This is like a function', 'You can call it like a function') "This kind of script remains me someway to Lua" #EndRegion Code And, finally, local region. As I said before, this can be space-sensitive, so you can write a lot of lines of code, and when you put a space the code is over. The last example: Global #Region Code 'First region' Local #Region Subcode 'A region in a region. Regionception.' MsgBox($MB_ICONINFORMATION, 'I can access the Global region data', $Code[0]) MsgBox($MB_ICONINFORMATION, 'Yay', 'This is the same function, you call Subcode[1] and both MsgBox will show.') #EndRegion Subcode 'And now, In Code[2], we write a function that use the Subcode function' MsgBox($MB_ICONINFORMATION, Subcode[0] 'I can access the Local region data') Subcode[1] ; Remember, same function while not spaced. #Endregion Code Well, trying to write this was hard, and maybe a little hard to understand, but that was just an idea, and ideas are for being shared.
-
Im relative new to this awesome script language and every day Im mindblowed but what things I discover and didn't know about the au3 syntax but I have some questions : #1. What is ByRef and what it does/why to use it/where to use it #2. Is this really really true that the first character after the $ sign in the variable name means the type of the variable ??? :shocked: ( Like $iVar = int and $sVar = char types from C ? ) What about if I declare $Random instead ? If the above is true, then why all my created programs are working with random names without the correct specific type declared ? Like $pink = 5 + 5 does works despite the 'p' representing the pointer type ! #3. Why I need to unregister things or close any handles like DllClose after a DllOpen OR _GDIPlus_Shutdown() after my script exists ? #4. And last but not the least why this : #include <Misc.au3> ;Global declarations ;... Func () Func() ; the code Endfunc and not this instead : #include <Misc.au3> ;Global declarations ;... ; the code Will there be any problems whatsoever if the last variant ?
- 3 replies
-
- syntax
- programming
- (and 6 more)
-
Right now, this is only a concept, to see if it's worth doing it. The idea is: build a script to build a programming language, with a predefined syntax, but with a configurable list of commands. Please tell if you'd like/want/don't want it. EDIT: I posted it here because, if it's worth making it, I will post it in this thread.
- 7 replies
-
- programming
- language
-
(and 1 more)
Tagged with: