Skip to content

Instantly share code, notes, and snippets.

@TLMcode
TLMcode / DND.ahk
Created September 28, 2017 17:28
Add Drag And Drop functionality to AHK GUI's with UAC
Loop 2
DllCall( "ChangeWindowMessageFilter", uInt, "0x" (i:=!i?49:233), uint, 1)
@TLMcode
TLMcode / ExtractTableData.ahk
Created September 19, 2017 14:53
ExtractTableData()
ExtractTableData( FilePath, HeadingsArray, Delimiter, SaveDir )
{
static htmObj
if !IsObject( htmObj )
htmObj := ComObjCreate( "HTMLfile" )
else
htmObj.Close()
tablesArray := {}
@TLMcode
TLMcode / ExtractCWDStyles.ahk
Created July 10, 2017 15:47
Extract Selectors & MediaQuery from main Material Kit style sheets
MatKitOrgCssPath := "*\base_framework\theme\base_material_kit\assets\css\"
MatKitOrgCssFile := MatKitOrgCssPath . "material-kit.css"
CWDSiteCssFile := MatKitOrgCssPath . "cwd-site-css.css"
FileRead, MatKitOrgCss, % MatKitOrgCssFile
While p:=regexmatch( MatKitOrgCss, "is)(@media.*?\{.*?[`n}]{1,2}|[#\.\(\)a-z:-]+pln)(.*?[`n]})", mth_,(!p?(p!,s:=""):strlen(mth_)+p))
s.=mth_ "`n`n"
FileDelete % CWDSiteCssFile
@TLMcode
TLMcode / component-helper.js
Last active April 25, 2017 05:27
Bootstrap Component Helper
/* =========================================================
*
* Component Helper
*
* =========================================================
*
* @@@ @@@
* @@@@@@ @@@@@@
* @@@@@@@@ @@@@@@@@
* @@@ @@ @@ @@@
@TLMcode
TLMcode / CWD_Tech_Services.txt
Created April 11, 2017 20:37
ascii branding
* @@@ @@@
* @@@@@@ @@@@@@
* @@@@@@@@ @@@@@@@@
* @@@ @@ @@ @@@
* @@@ @@@
* @@@ @@ @@ @@@
* @@@ @@@@ @@@@ @@@
* @@@ @@@@ @@@ @@@@ @@@
* @@@ @@@@ @@@@@ @@@@ @@@
* @@@ @@@@@@@ @@@@@@@ @@@
@TLMcode
TLMcode / GetViewportDimensions.js
Created April 11, 2017 06:09
Private anon init function for returning a client view port dimensions array.
GetViewportDimension: function()
{
var ViewPortArr = [];
// Standards compliant client
if ( typeof window.innerWidth != 'undefined' )
{
ViewPortArr.Width = window.innerWidth
ViewPortArr.Height = window.innerHeight
@TLMcode
TLMcode / Server_File_Search.ahk
Created April 11, 2017 04:31
Server File Search
#NoTrayIcon
PrefFile := A_ScriptDir "\prefs.txt"
TCtrlW := 250
if FileExist( PrefFile )
{
FileRead, Prefs, % PrefFile
For Each, Pref in ( StrSplit( Prefs, "~" ), SectionObj := {} )
@TLMcode
TLMcode / VLCSongListPopulator.ahk
Created March 15, 2017 21:51
VLCSongListPopulator.ahk
SongFile = SongList.txt
SFPath := A_MyDocuments "\" SongFile
if !WinExist( "ahk_class QWidget" )
{
Msgbox, 0x10, Whoops!, Make sure VLC is running!
Return
}
if FileExist( SFPath )
@TLMcode
TLMcode / GetSourceURL().ahk
Last active March 3, 2017 18:47
Returns a source url from a html fragment ident
GetSourceURL( str )
{
FragIdent := RegExReplace( str, "i).*<b.*?>(.*?<!--s\w{11}t-->).*", "$1" )
For Each, Ident in StrSplit( FragIdent, " " )
if InStr( Ident, mStr := "SourceURL:" )
SourceURL := SubStr( Ident, StrLen( mStr )+1 )
Return SourceURL
}
@TLMcode
TLMcode / GetAllInputChars().ahk
Created March 3, 2017 17:55
Returns a string with input characters
GetAllInputChars()
{
Loop 256
ChrStr .= Chr( a_index ) " "
ChrStr .= "{down} {up} {right} {left} "
Return ChrStr
}