I want my script to read a textfile containing an intiger and to write this number by keyboard with out me actually touching it, but im kinda having trouble understanding the autohotkey since there is no software for it. Having some C# knowledge this is what i have:
FileRead, OutputVar, answertext.txt
sleep, 3000
;MyString = %OutputVar%
MyString = 16807
Loop, Parse, MyString
{
if (%A_LoopField% = -)
{
Send, {SC00C}
}
if (%A_LoopField% = 0)
{
Send, {SC00B}
}
if (%A_LoopField% = 1)
{
Send, {SC002}
}
if (%A_LoopField% = 2)
{
Send, {SC003}
}
if (%A_LoopField% = 3)
{
Send, {SC004}
}
if (%A_LoopField% = 4)
{
Send, {SC005}
}
if (%A_LoopField% = 5)
{
Send, {SC006}
}
if (%A_LoopField% = 6)
{
Send, {SC007}
}
if (%A_LoopField% = 7)
{
Send, {SC008}
}
if (%A_LoopField% = 8)
{
Send, {SC009}
}
if (%A_LoopField% = 9)
{
Send, {SC00A}
}
}
exit
Now this code starts but it always punches in 0 and nothing else, and if MyString = -1234, there is an error.
Send %MyString%
, why are you sending the hardware scancodes? – wOxxOm