Search found 54 matches

by DevWithCoffee
10 Jan 2024, 07:30
Forum: Scripts and Functions (v1)
Topic: bufferToHex for 2 Bytes
Replies: 2
Views: 350

Re: bufferToHex for 2 Bytes

What a lack of attention on my part, I was so happy and so tired when I finally discovered this solution that I didn't realize my mistake, thank you.
by DevWithCoffee
10 Jan 2024, 01:11
Forum: Scripts and Functions (v1)
Topic: bufferToHex for 2 Bytes
Replies: 2
Views: 350

bufferToHex for 2 Bytes

I was having a lot of difficulty extracting data from memory using the readString function, so through this solution created by RHCP I was wondering how to separate 2-byte data, so I decided to check if the String's position is even or odd to read without repeating any bytes. Source: p297901 Functio...
by DevWithCoffee
06 Jan 2024, 21:20
Forum: Ask for Help (v1)
Topic: Convert byte string to Image Topic is solved
Replies: 4
Views: 369

Re: Convert byte string to Image Topic is solved

Unfortunately, this was a lack of attention on my part regarding the functions of GDI+ ... I was using Gdip_FillRectangle to make each pixel and for that I had to update each "Gdip_BrushCreateSolid" with the color that would be used in the coordinate... making the process take a long time. The corre...
by DevWithCoffee
04 Jan 2024, 19:31
Forum: Ask for Help (v1)
Topic: Convert byte string to Image Topic is solved
Replies: 4
Views: 369

Re: Convert byte string to Image Topic is solved

I had already taken a screenshot, but the player can create a blur effect in the video, so I intended to extract it directly from memory: StartSnapshot_old: if(ChkScreen <> 1) { if(!FileExist("Screenshots")) { FileCreateDir, Screenshots } WinGet, VidPlayerHWND, ID, % "ahk_pid" VidPlayerPID sFile := ...
by DevWithCoffee
04 Jan 2024, 16:45
Forum: Ask for Help (v1)
Topic: Convert byte string to Image Topic is solved
Replies: 4
Views: 369

Convert byte string to Image Topic is solved

Is it possible to convert raw bytes to image, preferably PNG? I found it in Python, but I don't think it's convenient to link another language just for this task.
https://www.reddit.com/r/learnpython/comments/ovv5hq/how_to_convert_byte_string_to_image/
by DevWithCoffee
01 Oct 2023, 17:56
Forum: Ajuda e Suporte Geral
Topic: Compactação de script
Replies: 1
Views: 703

Re: Compactação de script

Você quer dizer no editor? Se for, cada editor tem o seu próprio recurso para isso. Eu faria as coisas separadas em arquivos e pastas. Por exemplo: [Pasta] Functions [Pasta] Libs [Pasta] Resources [File] Main.ahk [File] Header.ahk [File] Globals.ahk Main.ahk : #Include Header.ahk #Include Globals.ah...
by DevWithCoffee
18 Sep 2023, 17:27
Forum: Ask for Help (v1)
Topic: Mouseclick after mouse move
Replies: 8
Views: 518

Re: Mouseclick after mouse move

The mouse position is relative due to the screen resolution and zoom, both defined by the user.

I believe that the most convenient thing would be to create an extension for Chromirium and another for Firefox that performs this operation.

If it's your website, I advise you to use only Javascript.
by DevWithCoffee
17 Sep 2023, 17:17
Forum: Ask for Help (v2)
Topic: Anomolies with V1 to V2 Conversion
Replies: 2
Views: 218

Re: Anomolies with V1 to V2 Conversion

In particular, I didn't migrate to V2 because I don't trust this type of instant conversion and because GDIplus hasn't received any more updates.
When I do this, I will start by reading the documentation and rewriting the codes I created without using converter tools.
by DevWithCoffee
16 Sep 2023, 21:59
Forum: Scripts and Functions (v1)
Topic: InputMouseKeyboard
Replies: 0
Views: 336

InputMouseKeyboard

There probably already exists a function previously made for this purpose, but I couldn't find it. I made this function so that LControl, RControl, LShift, RShift, mouse buttons 1 and 2 work together with the keyboard keys. Function: InputMouseKeyboard(_fmt := 0, _md := "vk", _tmo := 0) { ; _fmt (Fo...
by DevWithCoffee
16 Sep 2023, 20:14
Forum: Ask for Help (v1)
Topic: How to save img name day/time ?
Replies: 14
Views: 721

Re: How to save img name day/time ?

Would it be something like that? #Requires AutoHotkey v1.1.33 #Include <Gdip_All> if (!pToken := Gdip_Startup()) { MsgBox 48, Error, % "File not found.`n`n" gdip Return } r:: image := A_ScriptDir "\" A_Hour "" A_Min ".png" pToken := Gdip_Startup() pBitmap := Gdip_BitmapFromScreen("0|0|900|900") File...
by DevWithCoffee
16 Sep 2023, 20:03
Forum: Ask for Help (v1)
Topic: error ONLY when compiled Topic is solved
Replies: 9
Views: 696

Re: error ONLY when compiled Topic is solved

I had a similar problem, both in Script and Compiled, so I always wrote it this way: ; New Function MyFunction(name) { MsgBox % "Hello " name } ; Conditions if(v == 1) { MsgBox Working! } ; Simple Loop { Tooltip % "Clock: " A_Hour ":" A_Min ":" A_Sec, % A_ScreenWidth, % A_ScreenHeight } These are ju...
by DevWithCoffee
26 Aug 2023, 22:39
Forum: Ask for Help (v1)
Topic: Counter starts from 10000 when I run Topic is solved
Replies: 7
Views: 324

Re: Counter starts from 10000 when I run Topic is solved

You could even do this with Batch Script, the AHK Loop in Files mode probably saves memory size so it resets on every request. Test in version 2.0.5 to see what happens.
by DevWithCoffee
26 Aug 2023, 18:42
Forum: Ask for Help (v1)
Topic: Counter starts from 10000 when I run Topic is solved
Replies: 7
Views: 324

Re: Counter starts from 10000 when I run Topic is solved

Interesting.. I had ChatGPT assisting me with some ... First rule of becoming a programmer, don't use AI of any kind. I believe that the AHK Loop is passing file by file, and when that happens, if a file is created during this process, it will be queued as a new file. The problem is not in your cod...
by DevWithCoffee
26 Aug 2023, 15:38
Forum: Ask for Help (v1)
Topic: Counter starts from 10000 when I run Topic is solved
Replies: 7
Views: 324

Re: Counter starts from 10000 when I run Topic is solved

I changed line 70 to this to parse and the error doesn't seem to happen:

Code: Select all

    NewPath := Dir "\" NewFilename  ; Add timestamp to the filename
    ;FileMove, % A_LoopFileLongPath, % NewPath
	Tooltip % "NewPath:`n" NewPath "`nCounter: " counter
	Sleep 100
by DevWithCoffee
26 Aug 2023, 13:43
Forum: 请求帮助
Topic: 代码无法运行 Topic is solved
Replies: 1
Views: 886

Re: 代码无法运行 Topic is solved

删除这部分:

Code: Select all

if not A_IsAdmin
{
  Run *RunAs "%A_ScriptFullPath%"
  ExitApp
}
将其包含在代码的开头:

Code: Select all

;@Ahk2Exe-UpdateManifest 1
#NoEnv
#SingleInstance force
SetTitleMatchMode,2
文档中参考:
https://wyagd001.github.io/zh-cn/docs/misc/Ahk2ExeDirectives.htm#UpdateManifest
by DevWithCoffee
26 Aug 2023, 00:34
Forum: Ajuda e Suporte Geral
Topic: Script de loop
Replies: 1
Views: 838

Re: Script de loop

Você quer que o comando acione simultaneamente as 3 teclas ou em sequencia?
by DevWithCoffee
26 Aug 2023, 00:26
Forum: Ajuda e Suporte Geral
Topic: Identificação de Ativação de Script Topic is solved
Replies: 2
Views: 940

Re: Identificação de Ativação de Script Topic is solved

Melhor maneira de analizar dados: ToolTip ToolTip Pra evitar que fique seguindo o ponteiro do mouse force ficar sempre no canto da tela com as variaveis nativas que verificam o tamanho do display: A_ScreenWidth e A_ScreenHeight Exemplo de uso: Loop { ToolTip % "Horário: " A_Hour ":" A_Min ":" A_Sec ...
by DevWithCoffee
26 Aug 2023, 00:15
Forum: Scripts e Funções
Topic: Tocador
Replies: 1
Views: 897

Re: Tocador

V1 certo? Se incluir os formatos de musica mais comuns em filter fica mais prático pro usuário, ficaria algo assim:
FileSelectFile, musica,,, Selecione o arquivo com a música, Audio (*.wav; *.mp2; *.mp3; *.m4a; *.wma)
by DevWithCoffee
20 Aug 2023, 18:27
Forum: Gaming Help (v1)
Topic: GDI+ Convert Picture to 8-Bit (256 colors) Topic is solved
Replies: 14
Views: 1960

Re: GDI+ Convert Picture to 8-Bit (256 colors) Topic is solved

If by any chance you're interested in this feature, here's a window capture (Hwnd) fix that works on Windows 7:
viewtopic.php?t=120476

Go to advanced search