Skip to content

Instantly share code, notes, and snippets.

@TLMcode
TLMcode / GetPlayerList()
Last active August 29, 2015 13:57
GetPlayerList() function for Ex0r in #ahk
#SingleInstance force
File := A_ScriptDir "/PlayerList.txt"
Gui, Add, Text,, Players
Gui, Add, Edit, R30 w200 +ReadOnly vPlayerList
Gui, Add, Text,, Page Amount
Gui, Add, Edit, w200 +Number vcnt
@TLMcode
TLMcode / AccLibInterace.ahk
Created March 24, 2014 00:26
halfblake's acc com interface
#Include Acc.ahk
/*
This function accepts all or part of a tab's name and returns the relevant actionable object.
You can then use accDoDefaultAction(0) to activate the tab in Firefox.
Note that using accDoDefaultAction will disrupt any previously defined tab objects.
Attempting to act on a previously defined tab after running accDoDefaultAction
will result in an AHK error. You will therefore need to define a tab, activate it,
and only after that can you establish a second tab on which to act.
@TLMcode
TLMcode / UriDecode()
Created December 10, 2014 08:21
UriDecode() for AHk using jScript
uri := "file:///D:/03%20Schreiben/01_Texte/15%20%E2%80%93%20Encyclop%C3%A4dien/Encyclopedia%20of%20Sociology.pdf"
msgbox % UriDecode( uri )
UriDecode( u )
{
( obj := ComObjCreate( "ScriptControl" ) ).Language := "JScript"
return obj.Eval( "decodeURI(`""" u `""");" )
}
@TLMcode
TLMcode / UriDecode() 64bit
Created December 20, 2014 02:28
UriDecode() for AHk64 bit using htmlfile object
uri := "file:///D:/03%20Schreiben/01_Texte/15%20%E2%80%93%20Encyclop%C3%A4dien/Encyclopedia%20of%20Sociology.pdf"
msgbox % decodeURI( uri )
decodeURI( u )
{
( obj:=ComObjCreate("HTMLfile") ).write("<p>/</p><script>document.getElementsByTagName(""p"")[0].innerHTML=decodeURI(`""" u `""");</script>")
return obj.getElementsByTagName("p")[0].innerHTML
}
@TLMcode
TLMcode / GetCharacterDescription.ahk
Last active August 29, 2015 14:21
Get Character Description
cSharp =
(
using System;
using System.Text;
using System.Runtime.InteropServices;
public class Win32ResourceReader : IDisposable
{
private IntPtr _hModule;
#SingleInstance, Off
#NoEnv
SetBatchLines, -1
FilePath = C:\Windows\ShellNew\Template.ahk
DefaultName = %A_UserName%
DefaultDesc =
Indent := "`t"
Title = CodeQuickTester
@TLMcode
TLMcode / anon_test.js
Last active August 29, 2015 14:26
anon view test
(function()
{
var view =
{
init: function()
{
this.cacheDom();
this.render();
},
cacheDom: function()
@TLMcode
TLMcode / ComExcelConnect.ahk
Created August 4, 2015 18:34
ComExcelConnect() creates a COM connection to a open workbook
xlObj := ComExcelConnect( "ahk_class XLMAIN" ).Application
msgbox % xlObj.Range("A1").value
ExitApp
ComExcelConnect( WinTitle )
{
objID := "-16", objID &= 0xFFFFFFFF
refID := -VarSetCapacity( iid, 16 )
iid_type := NumPut( 0x46000000000000C0
@TLMcode
TLMcode / EnumClipFormats.ahk
Created September 30, 2015 20:18
EnumClipFormats(). Retrieves a list of formats in the clipboard
msgbox % EnumClipFormats()
EnumClipFormats()
{
DllCall("OpenClipboard"), VarSetCapacity( buf, 256 )
Loop % DllCall("CountClipboardFormats")
{
fmt := DllCall("EnumClipboardFormats", uint, a_index=1?0:fmt )
DllCall("GetClipboardFormatName", uInt, fmt, str, buf, int, 128 )
@TLMcode
TLMcode / main.cs
Created October 1, 2015 04:33
Reading & Writing .wav file (C# + .net)
// Waveファイル 読み込みと書き込み
// 16bit形式のみ対応
// 読み込んだデータはList<short>に格納されます
using System;
using System.Collections.Generic;
using System.IO;
namespace ConsoleApplication1
{
class Program