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
| # Cancel input() with CancelIoEx(). | |
| # | |
| # There is known problem: https://github.com/microsoft/terminal/issues/12143 | |
| import msvcrt | |
| import sys | |
| import threading | |
| from win32more import UInt32 | |
| from win32more.Windows.Win32.Foundation import TRUE |
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 | |
| from ctypes import sizeof | |
| from win32more import WinError | |
| from win32more.Windows.Win32.Foundation import CloseHandle | |
| from win32more.Windows.Win32.System.Threading import INFINITE, WaitForSingleObject | |
| from win32more.Windows.Win32.UI.Shell import ( | |
| SEE_MASK_NOCLOSEPROCESS, | |
| SHELLEXECUTEINFOW, | |
| ShellExecuteExW, |
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
| # /// script | |
| # dependencies = ["win32more"] | |
| # /// | |
| import sys | |
| from ctypes import Structure, cast, memoryview_at, pointer, wstring_at | |
| from win32more import WINFUNCTYPE, Char, IntPtr, UInt16, WinError | |
| from win32more.Windows.Win32.Foundation import ( | |
| BOOL, |
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
| # /// script | |
| # dependencies = ["win32more"] | |
| # /// | |
| from ctypes import POINTER | |
| from win32more import FAILED, Byte, List, UInt32, WinError | |
| from win32more.Microsoft.UI.Xaml.Media.Imaging import WriteableBitmap | |
| from win32more.Microsoft.Windows.Storage.Pickers import FileOpenPicker | |
| from win32more.Windows.Win32.Graphics.Imaging import ( | |
| CLSID_WICImagingFactory, |
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
| # /// script | |
| # dependencies = ["win32more"] | |
| # /// | |
| # | |
| # Ntfs preserves file names as is. | |
| # Windows API compares them using NFC normalization and case-insensitive matching. | |
| # | |
| # Directory has case sensitive flag. | |
| # With the flag enabled, the directory can contain file names that differ only by case. | |
| # fsutil.exe file setCaseSensitiveInfo <dir> |
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
| # calculate dst offset with icu api | |
| # | |
| # /// script | |
| # dependencies = ["win32more"] | |
| # /// | |
| from win32more import String | |
| from win32more.Windows.Win32.Globalization import ( | |
| UCAL_DEFAULT, | |
| UCAL_DST_OFFSET, |
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
| [ | |
| { | |
| "Bias": -270, | |
| "StandardName": "アフガニスタン標準時", | |
| "StandardDate": { | |
| "wYear": 0, | |
| "wMonth": 0, | |
| "wDayOfWeek": 0, | |
| "wDay": 0, | |
| "wHour": 0, |
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
| # /// script | |
| # dependencies = ["win32more"] | |
| # /// | |
| import asyncio | |
| import heapq | |
| import threading | |
| from concurrent.futures import Future | |
| from win32more.Microsoft.UI.Dispatching import DispatcherQueue |
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
| # "runFullTrust" and "systemAIModels" seems not supported in CreateAppContainerProfile(). | |
| # | |
| # > .\python.exe .\appcontainer.py | |
| # appcontainer.py: 24996 | |
| # systemAIModels: 0 | |
| # runFullTrust: 4 | |
| # Failed to find real location of C:\Users\yukih\work\py-win32more\unapp\unapp\python.exe | |
| # appcontainer.py: 10140 | |
| # systemAIModels: 0 | |
| # runFullTrust: 4 |
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
| # Caliculate Windows Limited Access Feature Token | |
| # https://firefox-source-docs.mozilla.org/widget/windows/LimitedAccessFeature.html | |
| # term: | |
| # Limited Access Feature (laf) | |
| # Package Family Name (pfn) | |
| import winreg | |
| from base64 import b64encode | |
| from hashlib import sha256 |
NewerOlder