Skip to content

Instantly share code, notes, and snippets.

TLM TLMcode

Block or report user

Report or block TLMcode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@TLMcode
TLMcode / launcher-placement.ahk
Created Mar 10, 2019
app launcher & screen placement script
View launcher-placement.ahk
if !( SndVolId := WinExist( "ahk_exe SndVol.exe" ) )
{
Run, SndVol.exe,,, SndVolPid
WinWait % "ahk_pid " SndVolPid
SndVolId := WinExist( "ahk_pid " SndVolPid )
}
WinSet AlwaysOnTop, On, % "ahk_id " SndVolId
WinMove, % "ahk_id " SndVolId,, % A_ScreenWidth, % A_ScreenHeight+100
WinGetPos, SndVolX,, SndVolW, SndVolH, % "ahk_id " SndVolId
View gist:87ca3a685d335b52f6b191c8e78740ac
CoordMode Mouse, Screen
PosArr := []
~LButton::
MouseGetPos, mPosX, mPosY, mPosWin, mPosControl
PosArr.Push( mPosX, mPosY )
return
F1::
for i in PosArr
View gist:973c71077b906cc0c871413232a18e43
xPosArr := [] ; mouse `X position` array
charArr := { right : "H", left : "K" } ; `send keys` array
left := false, right := false ; initializers
speed := 100 ; speed for accuracy
CoordMode, Mouse, Screen
Loop
{
; get mouse cursor position
View gist:70dc42c4f6219a57905bad43ae48a2c7
Stop := 0
While ( Stop = 0 ) ; 786, 33 1096, 70 ; << PARAMETER VALUES COMMENTED OUT!!
{
msgbox % "While Loop #1`nStop's value: " ( ( Stop ) ? "true" : "false" )
Stop = 1
; ^^ this evaluates the while expression true
}
msgbox % "After loop exit`nStop's value: " ( ( Stop ) ? "true" : "false" )
View gist:6897c0aae9ea9080a7674949d4f199ba
ComObjConnect( wSinkObj := ComObjCreate( "WbemScripting.SWbemSink" ), "EventHandler_" )
ComObjGet( "winmgmts:\\.\root\WMI" ).ExecNotificationQueryAsync( wSinkObj, "SELECT * FROM WmiMonitorBrightnessEvent" )
Return
EventHandler_OnObjectReady( eventObj )
{
tooltip display brightness changed!
}
View gist:305ea08e64d0c96d4f1c6bf8998125ca
DispBrtObj := new DispBrtClass()
Return
class DispBrtClass
{
__New()
{
ComObjConnect( this.wSinkObj := ComObjCreate( "WbemScripting.SWbemSink" ), this.EventHandler )
ComObjGet( "winmgmts:\\.\root\WMI" ).ExecNotificationQueryAsync( this.wSinkObj, "SELECT * FROM WmiMonitorBrightnessEvent")
}
@TLMcode
TLMcode / install.sh
Created May 26, 2018 — forked from ezimuel/install.sh
Verify and install composer from bash command line
View install.sh
#!/bin/bash
# Verify and install composer from https://getcomposer.org/installer
me=`basename "$0"`
if [[ $# -eq 0 ]] ; then
echo "Usage: $me <hash>"
echo 'where <hash> is the hash value of the installer to verify'
exit 1
fi
@TLMcode
TLMcode / install.sh
Created May 26, 2018 — forked from ezimuel/install.sh
Verify and install composer from bash command line
View install.sh
#!/bin/bash
# Verify and install composer from https://getcomposer.org/installer
me=`basename "$0"`
if [[ $# -eq 0 ]] ; then
echo "Usage: $me <hash>"
echo 'where <hash> is the hash value of the installer to verify'
exit 1
fi
@TLMcode
TLMcode / GoogleServices.php
Last active Mar 1, 2019
Google API Service Endpoints in PHP & cURL
View GoogleServices.php
<?php
class GoogleServices
{
public function __construct()
{
$this->SetVariables();
$this->VerifyToken();
}
@TLMcode
TLMcode / PHPObjectArrays.php
Created Feb 19, 2018
Pushing values into PHP Object Arrays
View PHPObjectArrays.php
$ObjectArr = (Object) [ "name" => (Object) [ "subarr" => [] ] ];
array_push( $ObjectArr->name->subarr, "value", "poo", "next" );
echo $ObjectArr->name->subarr[ 0 ];
/*
$ObjectArr
stdClass (1) ( public 'name' -> stdClass (1) ( public 'subarr' -> array (3) [ 0 => string (3) "foo" 1 => string (3) "bar" 2 => string (4) "next" ] ) )
You can’t perform that action at this time.