-
Posts
7,103 -
Joined
-
Days Won
88
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by TheDcoder
-
@Melba23 I feel the same way! I just can't put it in my words Thanks for the explanation
-
@water , I don't think 1 based arrays are not *that* bad... btw I know that element 0 has no special meaning but thinking it as special helps me a lot while coding !
-
I got an idea for a new FAQ my Arrays 101 topic, Thanks JohnOne!
-
I think element 0 as a special place... similar to period 0 in schools where you get to do the pledge .
-
In the mean while, I simplified my code to 1 line
-
Icon corruption when disabling a button
TheDcoder replied to TheDcoder's topic in AutoIt GUI Help and Support
@Zedna The icon looks messed up in the 2nd screenshot, I guess Aero is enabled in that screenshot? Added a GIF on main post, TD -
Icon corruption when disabling a button
TheDcoder replied to TheDcoder's topic in AutoIt GUI Help and Support
@BrewManNH Ooops, I deleted the download link while adding the code -
Icon corruption when disabling a button
TheDcoder replied to TheDcoder's topic in AutoIt GUI Help and Support
I wonder if it has anything to do with the colored button bug? -
Icon corruption when disabling a button
TheDcoder replied to TheDcoder's topic in AutoIt GUI Help and Support
I added the code -
Hello , #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 259, 91, 192, 124) $Button1 = GUICtrlCreateButton("Button1", 88, 32, 75, 25) GUICtrlSetImage($Button1, @ScriptDir & '\grass_arrow.ico') GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### AdlibRegister("DisableAndEnable", 4000) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func DisableAndEnable() GUICtrlSetState($Button1, $GUI_DISABLE) Sleep(2000) GUICtrlSetState($Button1, $GUI_ENABLE) EndFunc Did you see the icon getting messed up? Does anybody here know how to avoid it? Thanks in Advance, TD grass_arrow.ico
-
Finally another snippet! I use this little function to check if a number is present in a number (Magic numbers)... Magic numbers are powers of 2 (like 16, 32, 64 etc.) which can be added BitORed together to form a magic number... ; #FUNCTION# ==================================================================================================================== ; Name ..........: IsMgcNumPresent ; Description ...: Checks if a number is a present in a number (Magic numbers aka Powers of 2) ; Syntax ........: IsMgcNumPresent($iNumber, $iMagicNumber) ; Parameters ....: $iNumber - Number to check if it exists in $iMagicNumber. ; $iMagicNumber - The number which might contain $iNumber. ; Return values .: Success: True ; Failure: False ; Author ........: Damon Harris (TheDcoder) ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: http://bit.ly/IsMgcNumPresentForAutoIt ; Example .......: Yes, see below. ; =============================================================================================================================== Func IsMgcNumPresent($iNumber, $iMagicNumber) Return BitAND($iMagicNumber, $iNumber) = $iNumber EndFunc ; Example Global Const $NUMBER = 32 Global Const $MAGIC_NUMBER = BitOR(32, 64) ConsoleWrite(@CRLF) ConsoleWrite('+> Is ' & $NUMBER & ' present in ' & $MAGIC_NUMBER & '?... Its ' & IsMgcNumPresent($NUMBER, $MAGIC_NUMBER) & @CRLF) ConsoleWrite(@CRLF) UPDATE: I have moved this snippet to Gist, I will no longer maintain this version! please check for updates in the Gist itself! Enjoy, TD
-
@czardas I agree , but we can use @extended as a indicator... or I can make a function to check if the key exists
-
Hello , I was thinking of a situation where a key in a ini file can contain anything, If we were to know if the key does not exists using IniRead, Its not possible to do it without compromising a single possibility... I was thinking that if IniRead were to set @error when a key does not exist, it solves the problem which I mentioned before What do you think? Would you like this feature? TD
-
Hello, I am in a little confusion with Boolens , Here is my code: ConsoleWrite(("Something" = "Samething") & @CRLF) ; False ConsoleWrite((Not "Something" = "Samething") & @CRLF) ; True ConsoleWrite((Not False) & @CRLF) ; TrueI have commented the results which I expected, but the expression in the 2nd line is not working as expected , Can anyone explain to me? SciTE Output: Thanks in Advance, TD