This file contains 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
Width := 20, Height := 20 | |
KeyMap := {"up": "up", "left": "left", "down": "down", "right": "right"} | |
Map := [], BlankSquares := [] | |
Loop, % Width | |
{ | |
x := A_Index | |
Loop, % Height | |
{ | |
y := A_Index |
This file contains 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
Title := "}{FISH}" | |
Stats := {"Hunger": 50, "Drowsy": 80, "Health": 75, "Bowels": 10, "Thirst": 0} | |
Sleeping := False | |
Gui, Add, Text, r6 w75 -VScroll +ReadOnly vScreen | |
GoSub, UpdateStats | |
Gui, Add, Button, vButton1 gFeed ys x+5 w100, Feed | |
Gui, Add, Button, vButton2 gSleep w100, Put to bed | |
Gui, Add, Button, vButton3 gKill w100, Put to sleep | |
Gui, Add, Text, xm w175 Center vTicker, Your fish |
This file contains 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
Size := 100 | |
PixSize := 5 | |
GuiSize := Size * PixSize | |
Stack := [] | |
Loop, % Size | |
Stack.Insert(Rand(0.0, 1.0)) | |
Gui, +hWndhWnd -Caption |
This file contains 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
Size := 600 | |
PixSize := 1 | |
GuiSize := Size * PixSize | |
List := [] | |
Loop, % Size | |
List.Insert(Rand(0.0, 1.0)) | |
Gui, +hWndhWnd -Caption |
This file contains 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
Ascii = | |
( | |
; Necessary newline | |
+----+ | |
| | | |
+-------------------------+-----+----+ | |
| | | | | |
| +-------------------+-----+ | | |
| | | | | | |
| | | | | |
This file contains 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
#NoEnv | |
SetBatchLines, -1 | |
Conversion := {"mph": 0.44704, "km/s": 0.277778} | |
MsgBox, Put the input on the clipboard then hit OK | |
Data := ParseInput(Clipboard) | |
Data.Cameras.Remove(1) ; This is a redundant camera for my purposes |
This file contains 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
Pens := [], Brushes := [], Fonts := [] | |
GuiSize := 600 | |
Gui, +hWndhWnd -Caption | |
hDC := DllCall("GetDC", "UPtr", hWnd, "UPtr") | |
hMemDC := DllCall("CreateCompatibleDC", "UPtr", hDC, "UPtr") | |
hBitmap := DllCall("CreateCompatibleBitmap", "UPtr", hDC, "Int", GuiSize, "Int", GuiSize, "UPtr") | |
hOriginalBitmap := DllCall("SelectObject", "UPtr", hMemDC, "UPtr", hBitmap) | |
OnExit, ExitSub | |
OnMessage(0xF, "WM_PAINT") | |
Gui, Color, Black |
This file contains 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
#SingleInstance, Force | |
#NoEnv | |
SetBatchLines, -1 | |
; Start gdi+ | |
If !pToken := Gdip_Startup() | |
{ | |
MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system | |
ExitApp | |
} |
This file contains 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
This [strike]"tutorial"[/strike]/explanation requires the knowledge of how objects (aka arrays) work in AutoHotkey. If I got something wrong, please point it out. | |
[hr][/hr] | |
[center][b]What is a class?[/b][/center] | |
[quote="wiktionary"]class /klɑːs/ | |
n. A group, collection, category or set sharing characteristics or attributes.[/quote] | |
In the case of AutHotkey, most commonly an object. In this post, we will be talking about the syntax of making custom object classes that have methods, and how it works. |
This file contains 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
^d:: | |
Code := Clipboard ;"<div style='overflow:scroll; width: 100%; height: 100%; margin: none;'>" Clipboard "</div>" | |
Code := RegExReplace(Code, "s)\[list\](.*?)\[/list\]", "<ul>$1</ul>") | |
Code := RegExReplace(Code, "\[\*\](.*)", "<li>$1</li>") | |
Code := RegExReplace(Code, "\[quote(?:=""([^""]*)"")?\]", "<div class='author'> $1</div><div class='quote'>") | |
Code := RegExReplace(Code, "\[/quote\]", "</div>") | |
Code := RegExReplace(Code, "s)\[code[^\]]*\](.*?)\[/code\]", "<pre>$1</pre>") | |
Code := RegExReplace(Code, "\[c\](.*?)\[/c\]", "<code>$1</code>") | |
Code := RegExReplace(Code, "\[([^\]]*)\]", "<$1>") | |
Code := RegExReplace(Code, "\R", "<br/>") |
OlderNewer