Extracting attachments from mail box using AutoHotKey - autohotkey

I need to extract the attachments(pdf and .xlsx) from mail box using auto hot key.
Can somebody elaborate the steps for achieving this?
Any links could also be of help.
Thanks

#dheerendra
First, figure out how to do it in a stepwise fashion with just the mouse and/or keyboard (look for shortcut keys or accelerator keys or hot keys - those things with underlines under them). Once you can do it manually, secondly, use AutoHotKey (or any other scripting utility) to automate those steps. These links can help.
AutoHotKey can replicate Mouse clicks at locations:
https://www.autohotkey.com/docs/commands/Click.htm
AutoHotKey can replicate sending Keys from the keyboard:
https://www.autohotkey.com/docs/commands/Send.htm
That should do it, now you just put the steps into the script, maybe with some wait times between steps, or maybe with some error checking, or maybe add some flow control logic, or perhaps get and respond to additional user input, or even a GUI.
But if you have any trouble, show us what you tried (just enough of your code to disclose the troublesome part), and tell us what you expected to happen, and then tell us what actually happened.
EDIT: (Examples of the improvements)
E.g., you could use control logic to save in a place and name it depending on the sender or subject, or a category:
https://www.autohotkey.com/docs/commands/IfExpression.htm
Or you could get simple user input to determine where to save it and what to call it:
https://www.autohotkey.com/docs/commands/InputBox.htm
Or even create a full blown application with a GUI and connections to other data, and use that to establish a complete workflow process.
https://www.autohotkey.com/docs/commands/Gui.htm
Also, you didn't say what Mail client you are using, but I should mention that in addition to scripting mouse and keyboard actions, AutoHotKey lets you easily interact with Microsoft Outlook com interface which can easily expose email message objects and their attachments.
https://www.autohotkey.com/docs/commands/ComObjCreate.htm
Good luck, and Hth,

Related

Access 2016: Alt+Tab...toggle between open forms by using Alt+Tab

I've got roughly 10 forms of which I need 2 or 3 open at same time. (BTW: the forms are linked to separate tables) I know I can open multiple forms but I need to be able to toggle between the open forms using "Alt+Tab" ..... anyone know if this is possible? Thank you in advance... Tjay
BTW: I posted on Stackoverflow as well and got some great tips but didn't accomplish what I was needing.
As mentioned in your other post (Old Post):
This cannot be done with use of Alt+Tab, you would need to use the MS Access shortcut setup in the design of the program CTRL+F6
It is not possible to override the Alt+Tab Windows function programmatically to achieve the results you are looking for.
Here's a simple question for you though; why would you "need to be able to toggle between the open forms using Alt+Tab"? Is there some specific reason you need Alt+Tab to accomplish your goal? Perhaps what you need can be accomplished through some other means.
For instance, you can setup events such as SetFocus for specific forms after certain events have been finalized, while not an Alt+Tab to a form, it accomplishes a similiar end result.

Intercept a mouse click on a hyperlink in a MS Word document in an OLE container?

I am working with Word in an OLE Container in a Delphi form, although the IDE is largely irrelevant to the question.
Up until now I have been unable to find any way of solving the above question and I have created and maintained my own word processor within my app solely because I have been unable to find a way to intercept hyperlink clicks in Word. Embedded MS Word would be the ideal solution save that Word does not expose an onHyperlinkClick event.
My embedded word processor needs to take over control of the hyperlink click as it is not navigating to a specific url, but triggers the running of a fairly elaborate function, which I cannot/do not wish to try to handle from within Word.
In the absence of an MS Word event, I would guess that the only way of doing this would be via a windows hook. I am not very familiar with hooks and would appreciate any feedback as to whether this is the best way to approach the problem. For it to work I would need the hook to be able to:
Identify the mouse coordinates on screen (that I assume is a given)
Intercept and prevent the mouse click to stop MS Word doing its own thing.
In MS Word I would need an exposed function which translates screen coordinates to the location of objects within the word document. I have looked through the Word VBA reference and couldn't find any immediately obvious function for this, but I have a feeling I have seen reference to such a function previously.
Any feedback as to whether this is a possible and sensible approach would be greatly appreciated.
I have found the answer to the above. It is fairly complex to achieve. It involves both mouse and keyboard hooks.
VBA for Word has a RangeFromPoint function which you can query to find out the the range below the mouse cursor. You then query the range object to get its hyperlinks.
You cannot query the range in the hook procedure as it causes a threads conflict. I added a timer with an interval of 1 millisecond which is enabled in the hook procedure. This makes life difficult if you want to handle the link yourself. I decided to query on mousedown rather than mousemove as latter likely to eat a lot of resource. As such you have to disable the mouse down each time and simulate it outside of the hook procedure if you want it to be handled in the normal way.
There are also all other sorts of problems to be dealt with such as other windows with a higher z order which may be lying over your ole container. You need to check if cursor falls within these windows.
You also need to make sure you don't handle the mousedown where a special key (such as shift) is depressed at the time of the mousedown otherwise you will disable selecting.
Handling opening of the link by pressing the enter key is much easier.
It would all be much easier if Word offered a hyperlinkclick event!

Interactive map, which unlocks if you provide email. What is the best way to get started on this?

So basically there is to be a map, and users are able to drop a pin in to note their location. To access the map and pin, an email must be provided.
So like you go to the site, there is a prompt for your email to proceed then that window closes after an email is given and there is a map and a pin that you can drop where ever you want.
What is the best way to do this?
I am finding interactive map tutorials that lead to external pages, or pop up windows for facts but nothing as visceral as putting a pin in a location with your name on it.
Also while we want to get the email, we want it in NO WAY to be connected to the pin information wise.
Thank you!
So I will make a guess and say you wan't this for a website, (should state what language or system you are doing this for)
Just have a simple
Javascript pop up with a text field.
Or use googles API

Create Intellisense inside a Word Add-in

I have an add-in in MSWord. One of the ways in which users interact with it requires a user to type into a Word document "commands" and also their own user-defined "data elements". I would like to provide the user with some Intellisense to help them type these commands and data elements. Has anyone done anything like that (I guess it involves trapping user key-strokes destined for Word and to do something with them before handing the key-stroke on to Word, but it would be nice if someone had found an easier way). Oh, yes, I program in C#.

Existing tool or code to identify quoted text in emails

I am looking for a way to identify quoted text in emails. The goal is to add something along the lines of Gmails "show quoted text" feature to my web app which involves a mail handler bot.
There are similar questions on stackoverflow, but they are asking for an algorithm. I could implement this if I have to, but I would greatly prefer a tried and true solution.
Requirements:
1) Support both HTML and plain text emails
2) Operates on the full thread (that is, it has the original text to compare the quoted text against; no need to guess)
3) Handles common quote-related additions such as "On May 10th, 2008 at 6:35 PM Brandon wrote:"
A python library would be super magically awesome ideal, but I don't expect to get that lucky. A simple command line tool which can do this would pretty close to ideal, but I don't expect to that that lucky either. I'd gladly settle on a well known good implementation from an open source mail client which would be reasonably possible to extract into a tool.
Does anyone have a suggestion what my best bet would be?
I'm kind of surprised that there is no such thing as an "email handler bot construction kit".
Just following up on an email I received regarding this question.
Sup has a pretty easy to understand/extract/translate bit of logic for accomplishing this. I ported the relevant functions to Python and tweaked it for my purposes.
Sup is terminal-based mail client written in Ruby: http://sup.rubyforge.org/
Google has a patent for their method:
http://www.google.co.uk/patents/US7222299