I am new. Please help.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Holis
Posts: 2
Joined: 19 Dec 2016, 15:29

I am new. Please help.

Post by Holis » 22 Dec 2016, 11:36

so. I'm trying to make a program that will fetch specific data off websites for me. I want to select specific text. I've tried using the Click Cold command and then sendevent (PgDwn) to select the text that I want to copy... but every time the program pages down it automatically unholds the mouse button. Is there an easier way to do this?

theres much more before this... i have succesfully run the program.. it just

imagesearch, Wx, Wy, 0, 0, 1360, 760, B:\Users\snuffleuffagus\Desktop\pictures4appshowz\boatsandhoes.bmp
sleep 2000
If ErrorLevel
{
imagesearch, Vx, Vy, 0, 0, 1360, 760, B:\Users\snuffleuffagus\Desktop\pictures4app\resumeselect.bmp
If Error Level
{
MsgBox, leh sigh
}
else
{
MouseMove, (Vx+65), Vy
}
sleep 1000
SendEvent Click 2
SendEvent Click Hold
Sleep 700
SendEvent {PgDwn}
MouseMove, (%Vx%+365), (%Vy%+200)
}
else
{
MouseMove, 123, 691
sleep 700
Click
}}}


hugin
Posts: 15
Joined: 17 Aug 2016, 01:33

Re: I am new. Please help.

Post by hugin » 27 Dec 2016, 02:51

Code: Select all

imagesearch, Wx, Wy, 0, 0, 1360, 760, B:\Users\snuffleuffagus\Desktop\pictures4appshowz\boatsandhoes.bmp
sleep 2000
If ErrorLevel
{
imagesearch, Vx, Vy, 0, 0, 1360, 760, B:\Users\snuffleuffagus\Desktop\pictures4app\resumeselect.bmp
If Error Level
{
MsgBox, leh sigh
}
else
{
MouseMove, (Vx+65), Vy
}
sleep 1000
SendEvent Click 2
SendEvent Click Down	; Down (Not Hold)
Sleep 700
SendEvent {PgDn}	; PgDn (Not Pgdwn)
MouseMove, (%Vx%+365), (%Vy%+200)
}
else
{
MouseMove, 123, 691
sleep 700
Click
}}}
I don't have your images, so I can't check the script directly.
And to be honest I have not played around with Imagesearch or made any script for it, so I'm no expert.
But here is what I have found need to be corrected or check if you think they not make sense:

As EvilC said, it has some typos, and fixed another one as well on your SendEvent Keys. (See Script, and script is untested.)
Also, your Brackets, I can't understand them, they might be OK as they are, but for me they don't make sense though.
And when are you sending your "Down" keys up again?

Googling ImageSearch, I find this:
ImageSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ImageFile
ImageSearch Tips & Tricks
Script by Leef_me
Script by Leef_me #2

Hope this can be at some help ;)

EDIT: Found that you had a similar post, here: https://autohotkey.com/boards/viewtopic ... 77#p121877

Post Reply

Return to “Ask for Help (v1)”