|
by Fullofkittens 07/05/2008, 4:02pm PDT |
|
 |
|
 |
|
caltropsSubject := "Test AutoHotKey message{.}{.}{.}"
caltropsMsg := "This is a test message; if this worked then AutoHotKey is actually pretty easy to use. Thanks Ray{!}"
clickImage(imagePath)
{
Loop
{
imagesearch, foundX, foundY, 0, 0, 1280, 800, %imagePath%
; msgbox %foundX%
if (foundX <> "")
{
break
}
} ; ends Loop inside clickImage
click %foundX%, %foundY%
} ; ends clickImage
Run www.caltrops.com
clickImage("C:\Documents and Settings\Clint\Desktop\AHK Images\caltrops2_13.gif")
Sleep, 1000
Send ^f
Send Still
Send {Enter}
Send {Esc}
Sleep, 500
Send {Enter}
Sleep, 2000
Send ^f
Send tying
Send {Enter}
Send {Esc}
Sleep, 500
Send {Enter}
clickImage("C:\Documents and Settings\Clint\Desktop\AHK Images\pointy-default-replybutton.gif")
Loop
{
imagesearch, foundX, foundY, 0, 0, 1280, 800, C:\Documents and Settings\Clint\Desktop\AHK Images\pointy-default-title.gif
; msgbox %foundX%
if (foundX <> "")
{
break
}
}
foundX += 100
foundY += 10
click %foundX%, %foundY%
Send ^a
Send %caltropsSubject%
Send {Tab 2}
Send %caltropsMsg%
clickImage("C:\Documents and Settings\Clint\Desktop\AHK Images\pointy-default-previewbutton.gif")
msgBox, 4, Did it work?, Click Yes if it worked and No if it didn't.
ifMsgBox No
WinClose, Caltrops - Still Life - Compose
ifMsgBox Yes
clickImage("C:\Documents and Settings\Clint\Desktop\AHK Images\pointy-default-postbutton.gif")
Holy shit it is driving me CRAZY by not deferencing variables the same way that VBscript does. But learning how to do this only took me like 2 hours so it is definitely faster to learn than Python.
Does it have some way of identifying links I want to click that is simpler than what I have done here? The tool I'm accustomed to has an Object Repository that lets you set up identifying characteristics for all the "test objects" you want to use, which is nice because visual elements are usually subject to change. Is there any way I can, like, use the image name rather than a comparison? |
|
 |
|
 |
|
|
|
Scripting of applications (on multiple platforms?) by Fullofkittens 07/03/2008, 7:32pm PDT 
Re: Scripting of applications (on multiple platforms?) by Entropy Stew 07/03/2008, 10:08pm PDT 
PYTHON! by motherfuckerfoodeater 07/03/2008, 10:54pm PDT 
This is the major downside to python :( NT by Entropy Stew 07/04/2008, 10:42pm PDT 
AutoHotKey $0 by Ray of Light 07/03/2008, 11:28pm PDT 
and I just read the other replies by Ray of Light 07/03/2008, 11:44pm PDT 
Perl has grown long in the tooth and Perl 6 is going to be more complicated than by Entropy Stew 07/04/2008, 12:46am PDT 
All true and wouldn't fault anyone for choosing Ruby but by Ray of Light 07/04/2008, 2:23am PDT 
Shaking hands, doffing hat, etc. by Entropy Stew 07/04/2008, 4:03am PDT 
While you guys agree to disagree... by Fullofkittens 07/04/2008, 9:12pm PDT 
Use all three together NT by Job Security 07/04/2008, 9:32pm PDT 
I'm too stupid for that. NT by Fullofkittens 07/04/2008, 9:39pm PDT 
Tying it all together by Ray of Light 07/04/2008, 11:05pm PDT 
Test AutoHotKey message... by Fullofkittens 07/05/2008, 3:51pm PDT 
(source) by Fullofkittens 07/05/2008, 4:02pm PDT 
Well done Clint! NT by Clint Stalker 07/05/2008, 4:20pm PDT 
A new forum spammer is born. >:( NT by Fussbett 07/05/2008, 7:42pm PDT 
Did I mention that my new job is spamming messageboards? by Fullofkittens 07/05/2008, 9:40pm PDT 
Source by motherfuckerfoodeater 07/05/2008, 10:14pm PDT 
Re: (source) by Ray of Light 07/06/2008, 2:13am PDT 
Re: (source) by Fullofkittens 07/06/2008, 9:48am PDT 
fixed quote tags by Fullofkittens 07/06/2008, 9:50am PDT 
Incidentally, I got this job and am quitting my current job tomorrow. by Fullofkittens 07/13/2008, 11:18am PDT 
So you're just changing jobs. NT by Creexuls, a monster >:3 07/13/2008, 1:54pm PDT 
Yes, I'm one of the employed Caltrops posters. NT by Fullofkittens 07/13/2008, 3:03pm PDT 
I also am. ^_^ NT by Creexuls, a monster >:3 07/13/2008, 3:19pm PDT 
|
|