π
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
/* Melody | |
* (cleft) 2005 D. Cuartielles for K3 | |
* | |
* This example uses a piezo speaker to play melodies. It sends | |
* a square wave of the appropriate frequency to the piezo, generating | |
* the corresponding tone. | |
* | |
* The calculation of the tones is made following the mathematical | |
* operation: | |
* |
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
import ctypes | |
from ctypes import wintypes | |
#imports | |
GetWindowLong=ctypes.windll.user32.GetWindowLongW | |
SetWindowLong=ctypes.windll.user32.SetWindowLongW | |
SetLayeredWindowAttributes=ctypes.windll.user32.SetLayeredWindowAttributes | |
GetShell=ctypes.windll.user32.GetShellWindow | |
EnumChildren = ctypes.windll.user32.EnumChildWindows | |
EnumWindows=ctypes.windll.user32.EnumWindows |
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
#include "mainwindow.h" | |
#include "ui_mainwindow.h" | |
#include <QDebug> | |
#include <commoncontrols.h> | |
#include <CommCtrl.h> | |
#include <shellapi.h> | |
HICON JumboIcon(LPTSTR pszPath) | |
{ |
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
def geticon(PATH): | |
shfileinfostruct=SHFILEINFO() | |
SHGFI_ICON = 0x000000100 | |
SHGFI_DISPLAYNAME = 0x000000200 | |
SHGFI_TYPENAME = 0x000000400 | |
SHGFI_ATTRIBUTES = 0x000000800 | |
SHGFI_ICONLOCATION = 0x000001000 | |
SHGFI_EXETYPE = 0x000002000 | |
SHGFI_SYSICONINDEX = 0x000004000 | |
SHGFI_LINKOVERLAY = 0x000008000 |
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
# Some of this adapted from BoppreH's answer here:http://stackoverflow.com/questions/9817531/applying-low-level-keyboard-hooks-with-python-and-setwindowshookexa | |
import ctypes | |
from ctypes import wintypes | |
from collections import namedtuple | |
KeyEvents=namedtuple("KeyEvents",(['event_type', 'key_code', | |
'scan_code', 'alt_pressed', | |
'time'])) | |
handlers=[] |
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
import sys | |
import ctypes | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
from PIL import Image | |
from PIL.ImageQt import ImageQt | |
import pyautogui as pg | |
import platform | |
class Main(QWidget): |
NewerOlder