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
import win32gui | |
import win32ui | |
from ctypes import windll | |
from PIL import Image | |
def get_hwnd_from_string(hwnd_string): | |
hwnd = win32gui.FindWindowEx(None, 0, None, hwnd_string) | |
return hwnd | |
def screengrab(hwnd): |
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
CoordMode, Mouse, Screen | |
ICON_NAMES := "|agility|construction|cooking|crafting|farming|firemaking|fishing|fletching|herblore|hunter|magic|mining|prayer|ranged|runecrafting|slayer|smithing|summoning|thieving|woodcutting" | |
StringSplit, ICON_NAMES, ICON_NAMES, | | |
PTOKEN := Gdip_Startup() | |
PAGILITY := Gdip_CreateBitmapFromFile("agility.gif") | |
PCONSTRUCTION := Gdip_CreateBitmapFromFile("construction.gif") |
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
def winner(votes): | |
return max(votes, key = votes.count) | |
winner([1,1,2,2,2,2,2,3]) | |
>>> 2 |
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
var circle = $(".circle") | |
$("a").on("click", function(e){ | |
e.preventDefault() | |
var url = this.href | |
$.ajax({ | |
url:url, | |
success:function(response){ | |
if (response === "True") { |
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
$("a").on("click", function(e){ | |
e.preventDefault() | |
url = this.href | |
$.ajax({ | |
url:url, | |
success:function(response){ | |
if (response === "True") { | |
$(".circle").css("background-color", "green") | |
} else { |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-1.11.2.js"></script> | |
</head> | |
<body> | |
<a href="/red/1"><button> Click me to turn red on</button></a> | |
<a href="/red/0"><button> Click me to turn red off</button></a> | |
<script> | |
$("a").on("click", function(e){ | |
e.preventDefault() |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-1.11.2.js"></script> | |
</head> | |
<body> | |
<a href="/red/1"><button> Click me to turn red on</button></a> | |
<a href="/red/0"><button> Click me to turn red off</button></a> | |
<script> | |
$("button").on("click", function(e){ | |
e.preventDefault() |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-1.11.2.js"></script> | |
<script> | |
$("button").on("click", function(e){ | |
e.preventDefault() | |
}) | |
</script> | |
</head> | |
<body> |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-1.11.2.js"></script> | |
<script> | |
$("button").on("click", function(e){ | |
e.preventDefault() | |
}) | |
</script> | |
</head> | |
<body> |
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
<script> | |
$(button).on("click", function(e){ | |
e.preventDefault() | |
}) | |
</script> |