I am trying to write a ahk "send with Gmail", which will work as:
1. Right click a file
2. Choose sendto...
3. Choose "send with Gmail"
4. ahk works, then open an IE, go to gmail.com, then compose a mail, send the file which in step 1 as the attachment.
Now the problem is, I cannot get the file path which need in the step 4.
I make a shortcut for my exe file and copy it to the "Sendto" folder, and edit the shortcut target as
"C:\Documents and Settings\Administrator\Desktop\test.exe" /FilePath:%1
Then use "FilePath" in my ahk script, but cannot get the file path.
Anyone can help me?
My script is here
----
Run,
www.gmail.com
WinWaitActive,Gmail: Email from Google
sleep,100
Send, Username{TAB}password{Enter}
IfWinExist, Gmail
WinActivate
Send,c ;compose a mail
sleep,100
WinWaitActive,Gmail - Compose Mail
Send,
abc@abc.com{TAB}backup ;seciever and subject
Mouseclick,L,280,360 ;attachment link
Send, %FilePath% ;problem is here!!!