Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/24/2021 in all areas

  1. Then $x!! &= "abc" could change both.
    2 points
  2. What's really sad to me is that you haven't done a good job of describing the problem. Also, the code you posted isn't complete so that we can actually run it to observe the issue. 😞 FWIW, your code would make more sense to me if you did something like this -- $hActive = WinGetHandle("[Active]") ; Clear prior hotkeys here Switch $hActive Case $hWindow1 ; Set hotkeys here Case $hWindow2 ; Set hotkeys here Case $hWindow3 ; Set hotkeys here EndSwitch Also, it would be wise to save the last active window handle and compare it to the current one. If they are the same, then you can skip the whole process of clearing / setting the hotkeys.
    1 point
  3. Hello everyone! Cross-platform support imho is not too necessary. AutoIt was designed as a Windows-oriented tool from the very start… Multithreading? Easy to say but may take a long time and too much efforts to implement. Other features: Variables/constants must be pre-declared. Therefore no chances for a whole lot of nasty bugs caused by such undeclared ones. Basic set of preprocessor capabilities as #define/#undefine, #if/#elseif/#endif might be useful. At this moment, Local and Global declarations in main module are equivalent. I suggest Local declarations to be not accessible within functions, for example Global $a Local $b ; some code .... Func Test() ConsoleWrite($a) ; Ok ConsoleWrite($b) ; should cause compile-time error EndFunc Introduce Scope/EndScope block for temporary local variables/constants, and declare own local ones like here Local $a, $b, $c ; some code .... Scope Local $a ; not the same as $a declared above Local $x, $y ; accessible within this block only ; some code .... EndScope ConsoleWrite($x) ; ERROR! $x is not declared at this point While(True) Local $x ; same behavior as within scope/endsope block above ; some code .... WEnd For $i = 1 to 10 ; if $i is not declared yet, it's declared and visible within For/Next only Local $k ; same behavior as within scope/endsope block above ; some code .... Next ; and so on PS Sorry for my weak English
    1 point
  4. Keeping your original code and adding one line: #include <Constants.au3> #include <WinAPIDiag.au3> For $i = 1000 To 1 Step -1 If _WinAPI_IsInternetConnected() Then ConsoleWrite($i & @CRLF) Sleep(1000) ; The variable $i will decrease by 1 unit every second Else ConsoleWrite("Connection no exists" & @CRLF) $i+=1 Sleep(1000) EndIf Next
    1 point
  5. Bowmore

    Au3Check bug ?

    This is not a bug in au3check. The variable $rc in you function is initialised but never read/used, hence the warning. In your test function $rc is completely redundant. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 Func _test() Local $rc = 1 ? Beep() : "" EndFunc   ;==>_test _test()
    1 point
  6. Then look into the help file to checkout how to create a gradient background. 😉
    0 points
×
×
  • Create New...