I hereby claim:
- I am TheDcoder on github.
- I am thedcoder (https://keybase.io/thedcoder) on keybase.
- I have a public key whose fingerprint is 2D32 0619 4C71 DFA8 AD1C 0C5E 1E1B 2C6F 24E8 B800
To claim this, I am signing this object:
; NOTE: Use the latest BETA version of AutoIt | |
#include <MsgBoxConstants.au3> | |
#include "Country Codes.au3" | |
Global $sInput ; This will store the input | |
While True ; Infinite Loop! | |
$sInput = InputBox("Country Code Directory", "Enter the country code and I will tell you the country :)") | |
If @error Then Exit ; If the user closes the InputBox... | |
If MapExists($mCountryCodes, $sInput) Then ; Check if the country code exists in the database | |
MsgBox($MB_ICONINFORMATION, "Country of the code", $sInput & " is used to call " & $mCountryCodes[$sInput]) |
; #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 ......: |
I hereby claim:
To claim this, I am signing this object:
; #FUNCTION# ==================================================================================================================== | |
; Name ..........: IniReadWrite | |
; Description ...: Write the default value to Ini if it does not exist | |
; Syntax ........: IniReadWrite($sFile, $sSection, $sKey, $sDefault) | |
; Parameters ....: $sFile - The path for the .ini file. | |
; $sSection - The section name in the .ini file. | |
; $sKey - The key name in the .ini file. | |
; $sDefault - The default value. | |
; Return values .: The value of the $sKey in the Ini file or $sDefault if the $sKey does not exists | |
; Author ........: Damon Harris (TheDcoder) |
; #FUNCTION# ==================================================================================================================== | |
; Name ..........: _IEWaitForTagText | |
; Description ...: Waits for a HTML tag to appear with the specified text | |
; Syntax ........: _IEWaitForTagText($oObject, $sTagName, $sTagText[, $iTimeout = 0[, $bNoError = True]]) | |
; Parameters ....: $oObject - Object related to IE (Any Window, Frame, IFrame or any DOM object). | |
; $sTagName - Name of the HTML tag (p, img, tr, etc). | |
; $sTagText - The (inner) text of the tag to wait for. | |
; $iTimeout - [optional] Timeout for the wait in milliseconds. Default is 0 (No timeout). | |
; $bNoError - [optional] Temporarily disable IE errors messages in the console. Default is True. | |
; Return values .: Success: The DOM element's object |
#include <Array.au3> | |
#include <SQLite.au3> | |
_SQLite_Startup() ; Load the DLL | |
If @error Then Exit MsgBox(0, "Error", "Unable to start SQLite, Please verify your DLL") | |
Local $sDatabase = @ScriptDir & '\SQLiteTestDatabase.db' | |
Local $hDatabase = _SQLite_Open($sDatabase) ; Create the database file and get the handle for the database | |
_SQLite_Exec($hDatabase, 'CREATE TABLE People (first_name, last_name);') ; CREATE a TABLE with the name "People" |
; #FUNCTION# ==================================================================================================================== | |
; Name ..........: ConvertTime12To24 | |
; Description ...: Converts 12 hour time to 24 hour time, made while keeping _DateDiff's format in mind :) | |
; Syntax ........: ConvertTime12To24($sTime, $sPeriod[, $sDelimiter = ':']) | |
; Parameters ....: $sTime - Timestamp. (Can be a single digit or a pattern like H:M:S) | |
; $sPeriod - AM or PM. | |
; $sDelimiter - [optional] Separator between units of time. Default is ':'. | |
; Return values .: $sTime in 24 hour format with 0 padding | |
; Author ........: Damon Harris (TheDcoder) | |
; Remarks .......: Ensures that the first 3 parts have 0 padding if the time unit is single digit (Example 09 instead of 9) |
@echo off | |
rem I do not claim authorship of this snippet, original source: https://serverfault.com/a/227375/414453 | |
rem Get the time from WMI - at least that's a format we can work with | |
set X= | |
for /f "skip=1 delims=" %%x in ('wmic os get localdatetime') do if not defined X set X=%%x | |
echo.%X% | |
rem dissect into parts | |
set DATE.YEAR=%X:~0,4% |
#include <WinAPISys.au3> | |
; #FUNCTION# ==================================================================================================================== | |
; Name ..........: IsWindowNotResponding | |
; Description ...: Checks if a Window is not responding | |
; Syntax ........: IsWindowNotResponding($hWindow[, $iTimeout = 5000]) | |
; Parameters ....: $hWindow - A window handle. | |
; $iTimeout - [optional] Shouldn't matter, Timeout in milliseconds. Default is 5000. | |
; Return values .: @error set by _WinAPI_SendMessageTimeout | |
; Author ........: Damon Harris (TheDcoder) |
; This snippet will show you a "hack" that you can use in GUI OnEvent mode in AutoIt | |
; With this hack you can create fake/pseudo events for a control in a OnEvent "handler" | |
; function which is registered with multiple controls. | |
; Usually you can get around this by using a unique function for every control | |
; but I like to use a single function that I use as a handler for a group of related | |
; controls. Looks neat and organized :) | |
; Let's get started! |