The problem is i think when it sends the info to the notepad i think maybe some how the shift button is being pressed on and off because words like ahk_id come back as ahk-id or the numbers 843 comes back as *43 on the notepad like shift is being held down for a moment once in a while, even some words in like the title coMe bAck witH caPs oN.
does anyone have an idea how to fix this?
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
SetBatchLines -1
pause
loop
{
MouseGetPos, , , id, control
WinGetTitle, title, ahk_id %id%
WinGetClass, class, ahk_id %id%
MouseGetPos, xpos, ypos
ToolTip, ahk_id %id%`nahk_class %class%`n%title%`nControl: %control%`nX%xpos% Y%ypos%
}
return
f1::pause, toggle
return
F2::
{
IfWinNotExist, Untitled - Notepad
run, notepad
sleep 200
WinWait ahk_class Notepad
controlSend,Edit1, ahk_id %id%`nahk_class %class%`n%title%`nControl: %control%`n %xpos% %ypos% `n `n,Untitled - Notepad
}
Return
f3::reload
f1 to start script
f2 to send info to note pad
f3 to reload
anyone know why? or how to fix?