1. SetError(), SetExtended(). AutoIt3 has two "variables" @error and @extended. These are just two memory cells, which in the program will be invisible in terms of memory consumption, but provide powerful functionality. This is similar to the GetLastError() function. The use of this data is documented in the function calls, in some it has no value, in others it is reset to zero, and upon completion it contains function execution statistics, for example 1="Failed to open file" (does not exist), 2="could not write to file ". You can set these values yourself using SetError() on your own functions, set the value to 0 at the beginning, and then you can set other values as you go. Before taking the results of the function, you need to check the value of @error. In this case, @extended can contain additional values, for example, when executing ReplaceString(), you can get the number of replacements performed.
2. Continue [Level]
3. ContinueCase
4. Default. PeekS(*mem, Default, #PB_UTF8). You don't need to know the default value (-1) to skip the parameter.
5. #cs, #ce (#comments-start, #comments-end) - the beginning and end of a multiline comment.
6. TextGadget(#Gadget, -1, 50, Width, Height, Text$) - the value "-1" means that the coordinate is taken from the previous element. You just need to change the value of the first top element so that the subsequent ones move by the same amount.
GadgetToolTip(-1, Text$) - uses previous element id (for all Get/Set functions).
7. ProgressOn, ProgressOff, ProgressSet, SplashImageOn, SplashOff, SplashTextOn - independent windows like InputRequester, but allow you to show progress and a splash screen when starting programs.
8. OnAutoItExitRegister - registers the function that is executed when the program terminates, no matter where it happens. For example, you need to free Windows resources that the program does not know about and cannot free, since they are not resources of the program itself.
9. Using "_" as a line continuation
Code: Select all
If MessageRequester("Overwrite?", "Overwrite?", #PB_MessageRequester_YesNo) = #PB_MessageRequester_Yes _
And MessageRequester("Confident?", "Confident?", #PB_MessageRequester_YesNo) = #PB_MessageRequester_Yes
Debug "Yes"
EndIf
If MessageRequester("Overwrite?", "Overwrite?", #PB_MessageRequester_YesNo) = #PB_MessageRequester_Yes And _
MessageRequester("Confident?", "Confident?", #PB_MessageRequester_YesNo) = #PB_MessageRequester_Yes
Debug "Yes"
EndIf