 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Rob08 Guest
|
Posted: Mon Aug 18, 2008 5:34 pm Post subject: How can I select "show original" in Gmail? |
|
|
Since I can't use mouse coordinates(the button always changes the position), how can I make a script for selecting "show original"?
 |
|
| Back to top |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 1145 Location: The Interwebs
|
Posted: Mon Aug 18, 2008 6:33 pm Post subject: |
|
|
| I would suggest using ImageSearch to find the location of the button, then use those coordinates to click it. |
|
| Back to top |
|
 |
Rob08 Guest
|
Posted: Tue Aug 19, 2008 3:11 am Post subject: |
|
|
Could you give me an example? I don't know how to use imagesearch.
Ps. I've read the manual of course.
| Code: |
ImageSearch, FoundX, FoundY, 40,40, 300, 300, C:\My Images\test.bmp
|
In my case, do i have to point to the URL or do i have to save the reply button(image) anyway?
Well, I don't know if i'm clear enough.
I'd try this. Does it make sense?
| Code: | ImageSearch, FoundX, FoundY, 40,40, 300, 300, http://mail.google.com/mail/?shva=1#inbox/11a8f1eefed21648
|
|
|
| Back to top |
|
 |
scottmattes
Joined: 21 May 2007 Posts: 98 Location: USA
|
|
| Back to top |
|
 |
Rob08 Guest
|
Posted: Tue Aug 19, 2008 1:30 pm Post subject: |
|
|
Based on this http://www.autohotkey.com/forum/post-110612.html#110612 script I've made this one:
| Code: | SetTitleMatchMode, 2
WinWaitActive, - Opera
sleep, 250
ImageSearch, OutputVarX, OutputVarY, 0, 0, 40, 40, quote.bmp
;It should find the "quote" button in this forum, but actually it finds the Opera logo.
MouseMove, %OutputVarX%, %OutputVarY%, 10
Sleep, 2000
MouseMove, 200, 200, 5, R
sleep, 2000
OutputVarX+=5
OutputVarY+=5
MouseMove, %OutputVarX%, %OutputVarY%, 10
Return
F12::ExitApp |
|
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Tue Aug 19, 2008 3:39 pm Post subject: |
|
|
Or, you could use/search the forum for JavaScript/COM. Always better than using ImageSearch or mousemoves/keystrokes on webpages.
HTH
________________________________________________________
New here? Please, before you post...
1. Read the tutorial and try the examples. -> 2. Take a look at the command list to get an idea of what you could do. -> 3. Create your script. Consult the documentation and the FAQ if you get stuck. -> 4. Search the forum if you need help or examples, method 1 (forum), method 2 (site), method 3 (Google). -> 5. Post your code on the forum in the "Ask for Help" section if you still run into problems (but read this first). -> 6. There is more AHK on autohotkey.net and the Wiki and there is an AHK IRC chat. |
|
| Back to top |
|
 |
Rob08 Guest
|
Posted: Wed Aug 20, 2008 3:05 pm Post subject: |
|
|
| n-l-i-d wrote: | Or, you could use/search the forum for JavaScript/COM. Always better than using ImageSearch or mousemoves/keystrokes on webpages.
HTH
|
Specifically... ? |
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Wed Aug 20, 2008 3:11 pm Post subject: |
|
|
| Did you use the search as I suggested? |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Wed Aug 20, 2008 3:12 pm Post subject: |
|
|
| Specifically... Javascript Injection. That should help. |
|
| Back to top |
|
 |
Rob08 Guest
|
Posted: Wed Aug 20, 2008 3:13 pm Post subject: |
|
|
I've tried again with no success. This is quite hard.
| Code: | F::
ImageSearch, OutputVarX, OutputVarY, 0, 0, 40, 40, reply.bmp
; using this image http://img84.imageshack.us/img84/8687/replyzh1.png
MouseMove, %OutputVarX%, %OutputVarY%, 10
Sleep, 2000
MouseMove, 200, 200, 5, R
sleep, 2000
OutputVarX+=5
OutputVarY+=5
MouseMove, %OutputVarX%, %OutputVarY%, 10
Return
F12::ExitApp |
|
|
| Back to top |
|
 |
Rob08 Guest
|
Posted: Wed Aug 20, 2008 3:15 pm Post subject: |
|
|
| n-l-i-d wrote: | | Did you use the search as I suggested? |
Yep, I've seen lots of topics. |
|
| Back to top |
|
 |
n-l-i-d Guest
|
|
| Back to top |
|
 |
WangL Guest
|
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 1033
|
|
| Back to top |
|
 |
Rob08 Guest
|
Posted: Mon Aug 25, 2008 6:54 pm Post subject: |
|
|
Thanks all for your responses, but finally I've learnt it.
| Code: | ImageSearch, X, Y, 0, 0, 1280, 1024, *50 D:\Documents and Settings\name\Desktop\arrow.bmp
; http://img50.imageshack.us/img50/5568/arrowmk1.png
; imageshack.us modifies the file extension.
MouseClick,, X, Y |
AHK is great!  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|