Discussion, questions and support.
-
vrod5454
- Posts: 20
- Joined: Apr 18th, ’18, 02:13
Post
by vrod5454 » Jun 5th, ’20, 05:06
Hi,
I am trying to reduce the amount of clicks it takes for me to access client folders from Outlook. My idea is...
I would like to be able to middle-click (mouse wheel) on the name of a person in an outlook email and then choose "open client folder" from a FastKeys Start Menu. This would then:
- 1) copy the email (this is what is copied from outlook: John Smith<[email protected]>
2) parse what is copied and grab everything after the @ so just "foobardomain.com"
3) Check to see if a folder exists in this path "C:\mypath\foobardomain.com"
3.a) If true, then open an explorer window and go to the following path "C:\mypath\foobardomain.com"
3.b) If false, then open a YES/CANCEL alert box asking "Would you like to create the folder foobardomain.com?".
3.b.1) If YES then create the foobardomain.com folder and open an explorer window going to "C:\mypath\foobardomain.com".
3.b.2) If CANCEL then do nothing and exit out.
How can this be done?
Thanks for your help.
-
Marko
- Posts: 1730
- Joined: Mar 2nd, ’13, 21:02
Post
by Marko » Jun 5th, ’20, 16:24
This script (Type: Command) does what you want - you need to select the mail address first.
Code: Select all
Send, ^c
Sleep 100
pos:=InStr(clipboard, "@", 0, 0)
if not pos
return
folder:=SubStr(clipboard, pos+1)
folder:=StrReplace(folder, ">")
folder:="C:\mypath\" folder
if FileExist(folder)
run % folder
else
{
msgbox 4,, % "Would you like to create the folder " folder "?"
IfMsgBox, Yes
{
FileCreateDir, %folder%
run % folder
}
}
-
vrod5454
- Posts: 20
- Joined: Apr 18th, ’18, 02:13
Post
by vrod5454 » Jun 5th, ’20, 19:10
Hi Marko,
I created the Start Menu entry and set the type to "Script"
I get the following error when I try to save the script.
Error at line 9.
The following variable name contains an illegal character:
"0)",,UseErrorLevel"
The program will exit.
Any suggestions?
-
Marko
- Posts: 1730
- Joined: Mar 2nd, ’13, 21:02
Post
by Marko » Jun 5th, ’20, 19:52
You need to use Type: Command.