Auto Hot Key
213 subscribers
7 files
17 links
Created using ahk with love ❤️

@Lencore
Download Telegram
Channel created
Channel photo updated
🔥 AutoHotKey

Добро пожаловать. Здесь собраны полезные скрипты и функции со всего интернета, написанные на AutoHotKey. Чтобы предложить скрипт для публикации, напишите @Lencore.

Welcome. Here we collect useful scripts and functions from all the Internet created with AutoHotKey. To suggest a script to publish contact @Lencore.
📂 Folder Maze

Скрипт создает лабиринт из папок. Например: 5 папок, в каждой из которых по 5 папок, в каждой из которых еще по 5 папок и так далее. Размеры лабиринта можно выбрать. Имена генерируются с помощью рандомных чисел. Рекомендую не выбирать все по максимуму, потому что это создаст более 590 триллионов папок на ПК, которые будет трудновато удалить.

The script creates a maze using folders. For example, 5 folders including 5 more folders including 5 more folders etc. Size of maze is changeable. Names of folders are generating using random numbers. It is recommended to choose maximum parameters due to process of creating of 590 trillion of folders that can't be removed easily.

Автор / Author: @Lencore
#App
Folder Maze.ahk.untrusted
10.1 KB
Folder Maze via @AutoHotKey
#App
👍2
🔄 Переводчик

Нужно выделить любой текст и нажать Ctrl + C + C, сразу же откроется диалоговое окно с интерфейсом полноценного переводчика (с разными языками и озучкой) от Google. Возможно пригодится в телеграме, потому что в браузере легче нажать ПКМ > Перевести.

Select any text and press Ctrl + C + C, a dialog box will immediately open with the interface of a full-fledged translator (with different languages ​​and audio) using Google. Perhaps it will come in handy in telegram, because in the browser it is easier to press RMB > Translate.

Автор / Author: teadrinker
#App
👍2
Translator.ahk.untrusted
56.7 KB
Google Translator via @AutoHotKey
#App
👍5
🔹 Определение размера изображения в PSD/PSB-файле

Информацию о размерах изображения в psd/psb-файле можно получить из его заголовка (File Header Section). Высота изображения находится по смещению 14 от начала заголовка, ширина по смещению 18. Данные записаны в формате big-endian, для конвертации в формат little-endian, используемый в процессорах архитектуры x86-64, можно применить api-функцию ntohl().

В скрипте надо указать путь к файлу и запустить скрипт.

Information about the size of the image in the psd / psb file can be obtained from its header (File Header Section). The height of the image is at offset 14 from the beginning of the header, the width is at offset 18. The data is written in big-endian format, to convert to the little-endian format used in x86-64 architecture processors, you can use the ntohl() api function.

In the script, you must specify the path to the file and run the script.

Автор / Author:
teadrinker
#App
👍2
psd size.ahk.untrusted
336 B
PSD/PSB size extractor via @AutoHotKey
#App
👍2
🔎 Google From Everywhere

Скрипт позволяет загуглить выделенный текст из любого окна, либо посмотреть значение выделенного слова. Чтобы загуглить, нужно выделить текст и нажать Win + Shift + G. Для просмотра значения — Win + Shift + W.

The script allows to google selected text from any window or to google any query with "definition" word. Select any text and press Win + Shift + G to google or press Win + Shift + G to get definition of word using Google Dictionary.

Автор / Author: @ArminGh02
#App
🔥4
GoogleFromEverywhere.ahk.untrusted
1.4 KB
Google From Everywhere
@AutoHotKey
#App
🔥3
🔢 FormatNumber()

Функция превращает обычные числа в более читаемые, разделяя каждые три символа с конца числа запятой для улучшения читаемости. Символ разделения можно заменить на пробел, точку или любой другой. В приложении код для первой и второй версии ahk.

The function creates comma-separated numbers from integers for better readability. It separates every 3 symbols from the ending by comma. Separator can be changed to space, dot etc. There are scripts for both ahk v1 and v2 in the attachment.

v1:
FormatNumber(Amount) {
StringReplace Amount, Amount, -
IfEqual ErrorLevel,0, SetEnv Sign,-
Loop Parse, Amount, .
If (A_Index = 1) {
len := StrLen(A_LoopField)
Loop Parse, A_LoopField
If (Mod(len-A_Index,3) = 0 and A_Index != len)
x = %x%%A_LoopField%,
Else x = %x%%A_LoopField%
} Else Return Sign x " " A_LoopField
Return Sign x
}

v2:
FormatNumber(Amount) 
{
Amount := StrReplace(Amount, "-",,,, 1)
x := ""
Sign := ""
Loop Parse, Amount, "."
If (A_Index = 1) {
len := StrLen(A_LoopField)
Loop Parse, A_LoopField
If (Mod(len-A_Index,3) = 0 and A_Index != len)
x := x . "" . A_LoopField . ","
Else x := x . "" . A_LoopField
} Else Return Sign x " " A_LoopField
Return Sign x
}

Источник / Source: link
v2: @Lencore
#Script
👍2
🔥 AutoHotKey

Добро пожаловать. Здесь собраны полезные скрипты и функции со всего интернета, написанные на AutoHotKey. Чтобы предложить скрипт для публикации, напишите @Lencore.

Welcome. Here we collect useful scripts and functions from all the Internet created with AutoHotKey. To suggest a script to publish contact @Lencore.
🔥1
Auto Hot Key pinned «🔥 AutoHotKey Добро пожаловать. Здесь собраны полезные скрипты и функции со всего интернета, написанные на AutoHotKey. Чтобы предложить скрипт для публикации, напишите @Lencore. Welcome. Here we collect useful scripts and functions from all the Internet created…»
📆 Получение Unix-времени / Getting Unix-time

Получение текущего Unix-времени (количество секунд от января 1970) для первой и второй версии ahk.

Getting current Unix-timestamp (measure in seconds since 1970's January) for both v1 and v2.

v1:
Time := A_NowUTC
EnvSub, Time, 19700101000000, Seconds

v2:
UnixTime := DateDiff(A_NowUTC, 19700101000000, "Seconds")

Источник / Source: документация / docs
#Script
👍3
📆 Конвертация UNIX-времени в DATE / Convert from UNIX to DATE

Облазил кучу сайтов, но почему-то для всех это оказалось слишком трудной задачей, хотя решается в одну строку. Вместо UNIXTIME подставить свое значение.

Replace the UNIXTIME with your value.

v1:
Date := 19700101000000
Date += UNIXTIME, seconds

v2:
Date := FormatTime(DateAdd(19700101000000, UNIXTIME, "seconds"), "d MMMM yyyy, H:mm")


Источник / Source: документация / docs
#Script
🔥4
💱 Кодирование текста в URI / Encoding text to URI

Скрипт форматирует заданный текст в URI по одному символу без использования сторонних скриптов.

The script converts given text to URI char by char without using external scripts/libs.

v1:
URIEncodeChar(c) {
char := Chr(c)
If (c >= 65 and c <= 90) or (c >= 97 and c <= 122) or (c >= 48 and c <= 57) or (c = 45) or (c = 95) or (c = 46) or (c = 33) or (c = 126) or (c = 42) or (c = 39) or (c = 40) or (c = 41) {
Return char
}
enc := ""
hex := Format("{:x}", c)
if (Len(hex) = 1)
hex := "0" . hex
enc .= "%" . hex
Return enc
}

URIEncode(str) {
encStr := ""
Loop, Parse, str
{
c := Ord(A_LoopField)
encStr .= URIEncodeChar(c)
}
Return encStr
}


v2:
URIEncodeChar(c) 
{
char := Chr(c)
If (c >= 65 and c <= 90) or (c >= 97 and c <= 122) or (c >= 48 and c <= 57) or (c = 45) or (c = 95) or (c = 46) or (c = 33) or (c = 126) or (c = 42) or (c = 39) or (c = 40) or (c = 41)
Return char
enc := ""
hex := Format("{:x}", c)
if (strLen(hex) = 1)
hex := "0" . hex
enc .= "%" . hex
Return enc
}

URIEncode(str)
{
encStr := ""
Loop Parse str
{
c := Ord(A_LoopField)
encStr .= URIEncodeChar(c)
}
Return encStr
}

Источник / Source: ChatGPT
#Script
👍2