Skip to content

Instantly share code, notes, and snippets.

tmplinshi

Block or report user

Report or block tmplinshi

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
View RestartNetwork.ahk
/*
Restart "Local area connection" without admin privileges
Example: RestartNetwork("Local area connection")
If ConnectionName is omited, the adapter name that contains "Realtek PCIe" will be selected.
*/
RestartNetwork(ConnectionName := "") {
oShell := ComObjCreate("Shell.Application")
View WinHttpRequest.ahk
; WinHttpRequest.ahk
;
; Usage is similar to HTTPRequest (by VxE),
; Please visit the HTTPRequest page (http://goo.gl/CcnNOY) for more details.
;
; Supported Options:
; NO_AUTO_REDIRECT
; Timeout: <Seconds>
; Proxy: <IP:Port>
; Codepage: <CPnnn> - e.g. "Codepage: 65001"
View Class_GuiBox.ahk
;=================================================================================================
; Class GuiBox
; AHK Version: 1.1.13.01
; Version: 1.00 / 2013-12-25 / tmplinshi
; dependency: Gdip.ahk 1.45 by tic (http://www.autohotkey.com/board/topic/29449-gdi-standard-library-145-by-tic/)
; Thanks: nimda, gregster ...
;=================================================================================================
; Methods:
; new GuiBox( GuiOptions [, Color = "808080", Thickness = 2, Style = 1, Text = "", TextFont = "", TextOptions = ""] )
; Modify( GuiOptions [, Color = "808080", Thickness = 2, Style = 1, Text = "", TextFont = "", TextOptions = ""] )
View AHKHID - example_3 修改版.ahk
; AHKHID - example_3 修改版.ahk
/*! TheGood
AHKHID - An AHK implementation of the HID functions.
AHKHID Example 3
Last updated: August 22nd, 2010
Monitors the mouse movements and button state changes.
This is a good example showing how to use the RI_MOUSE flags of the member II_MSE_BUTTONFLAGS.
___________________________________________________________
View 监测正在使用的键盘或鼠标.ahk
; 监测正在使用的键盘或鼠标.ahk
; https://autohotkey.com/board/topic/21283-native-hid-support/?p=139818
#NoEnv
; Disable this line if you're running from an editor that catches StdOut
; (like PSPad or SciTE.)
DllCall("AllocConsole")
OnMessage(0xFF, "WM_INPUT")
@tmplinshi
tmplinshi / b64.ahk
Last active Apr 10, 2019
Base64 Encode/Decode support UTF-16-LE encoding. Ported from VBS code https://stackoverflow.com/a/40118072/1631371.
View b64.ahk
b64_encode(p*) {
return b64.encode(p*)
}
b64_decode(p*) {
return b64.decode(p*)
}
class b64
{
View Class_Excel.ahk
/*
Functions:
CreateByArray(outputFile, arr)
CreateByHLV(outputFile, HLV, Obj_LV_Colors := "", IncludeLvHeader := false)
HLV - Listview hwnd
Obj_LV_Colors - Created by using 'New LV_Colors(HLV)'
ChangeLog:
v1.05 (2017-8-17) - Added "Column AutoFit"; Added .xls file support
v1.04 (2016-12-9) - 'IncludeLvHeader' option now doesn't need to change default listview
v1.03 (2016-12-9) - Added support for LV_Colors's AlternateRows/AlternateCols
View DOM_Sample.ahk
; DOM_Sample.ahk
; DOM Documentation:
; http://www.w3schools.com/jsref/dom_obj_all.asp
#NoEnv
#SingleInstance Force
SetBatchLines -1
ListLines Off
ComObjError(False)
View Class_WinRing0.ahk
/*
Change Log:
v1.12 (2017-01-18) - Fixed OnExit not exiting
v1.11 (2017-01-17) - Added an internal function Ensure_Admin_And_Compiled()
v1.10 (2015-10-22) - Added support for sending characters that needs to press {shift} key, such as "@" or "A".
v1.00 (2015-07-25)
Dependency files:
WinRing0_v1.3.1.19.zip -- https://drive.google.com/file/d/0B7yNOlCgfluzMTE2UFc2ZHp5Z1E/view?usp=sharing
View CreateFormData.ahk
/*
CreateFormData - Creates "multipart/form-data" for http post
https://www.autohotkey.com/boards/viewtopic.php?t=7647
Usage: CreateFormData(ByRef retData, ByRef retHeader, objParam)
retData - (out) Data used for HTTP POST.
retHeader - (out) Content-Type header used for HTTP POST.
objParam - (in) An object defines the form parameters.
You can’t perform that action at this time.