This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ComObjConnect( wSinkObj := ComObjCreate( "WbemScripting.SWbemSink" ), "EventHandler_" ) | |
ComObjGet( "winmgmts:\\.\root\WMI" ).ExecNotificationQueryAsync( wSinkObj, "SELECT * FROM WmiMonitorBrightnessEvent" ) | |
Return | |
EventHandler_OnObjectReady( eventObj ) | |
{ | |
tooltip display brightness changed! | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class GoogleServices | |
{ | |
public function __construct() | |
{ | |
$this->SetVariables(); | |
$this->VerifyToken(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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" ] ) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ## invoice id en/decode | |
function inv_id_code( $id, $act ) | |
{ | |
$str = null; | |
if ( ( $act == 0 || $act == false ) && ( $id != "" ) && preg_match( "/^\w{16}$/i", $id ) == true ) | |
{ | |
foreach( str_split( strrev( $id ), 4 ) as $i => $seg ) | |
{ | |
$str .= "-" . strtoupper( strrev( $seg ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SDDir = C:\some_directory ; some example directory | |
FilePropObj := { name : [], size : [], file : [ { name : "", size : "" } ] } | |
FileObj := [ { name : "", size : "" } ] | |
Loop, Files, % SDDir "\*", R | |
{ | |
FileObj[ a_index , "name" ] := A_LoopFileName | |
FileObj[ a_index , "size" ] := A_LoopFileSize |