Email contact form GUI for bugs and suggestions reporting

Post your working scripts, libraries and tools
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Email contact form GUI for bugs and suggestions reporting

10 Jan 2016, 11:13

Hi everyone ! ;)

Following my previous thread https://autohotkey.com/boards/viewtopic ... 05bd6b3a42, I made a almost simple Email contact form GUI for bugs and suggestions reporting.

-It offers some choices to the user that automatically format the title of the email : Subject, Priority, Area, Short Title etc.
-It offers a template for the email content that the user have to complete
-It appends to the content of the email information about version and environment
-By a single button the email editor of the user is opened with the complete email ready to be sent
-OR it offers two buttons to copy the email title and content to paste whever the user wants to send its email from (ex: Gmail or whatever)

Feel free to use it/customize it/improve it for your needs and implement it in your software/scripts.

Cheers ;)

Code: Select all

; GLOBAL SETTINGS ===================================================================

#Warn
#NoEnv
#SingleInstance Force
;#NoTrayIcon

; INITIAL VARIABLES ============================================================================
VersionNum=3.125
[email protected]
MailTitleContent=
MailTemplate=
(
Hello, I would like to report a bug/suggestion.
Here are some information :

---------------------------------------
SHORT DESCRIPTION OF THE BUG : 
Complete Here

WHAT I WANTED : 
Complete Here

WHAT I DID : 
Complete Here

WHAT I WAS EXEPECTING : 
Complete Here

WHAT HAPPENED : 
Complete Here

OTHERS (FREE AREA):
Complete Here

---------------------------------------
Information about my environment:
Version = %VersionNum%
Windows Version = %A_OSVersion%
64bits = %A_Is64bitOS%
---------------------------------------

Cheers!
)

; GUI ============================================================================
Gui, 20:Default
Gui, Margin, 10, 10
Gui, Font, s12, Tahoma
Gui, Add, Text, ym+10 w700 +Center, Email Bugs / Suggestions Report
Gui, Font, s11, Tahoma
Gui, Add, Link, xm yp+40 gSendMail, <a id="1">%MyEmail%</a>
Gui, Font, s10 Bold, Tahoma
Gui, Add, Text, xm yp+40, Please choose first some general options and enter a short title of your bug/suggestion
Gui, Font, s10 Norm, Tahoma
Gui, Add, Text, xm yp+30, I WANT TO REPORT A:
Gui, Add, DropDownList, x300 w150 yp-2 vEmailReportChoice_What gSub_EmailReportChoice_What, BUG||SUGGESTION
Gui, Add, Text, xm yp+40, OF IMPORTANCE (from 1 : critical to 5 : minor) :
Gui, Add, DropDownList, x300 w40 yp-2 vEmailReportChoice_Priority gSub_EmailReportChoice_Priority, 5|4|3||2|1
Gui, Add, Text, xm yp+40, CONCERNED AREA OF THE PROGRAM:
Gui, Add, DropDownList, x300 w200 yp-2 vEmailReportChoice_Area gSub_EmailReportChoice_Area, ---- SELECT AREA ----||PROGRAM IDENTIFICATION|WINDOW IDENTIFICATION|EFA CONFIGURATION|OTHERS
Gui, Add, Text, xm yp+40, SHORT TITLE / DESCRIPTION (50 char):
Gui, Add, Edit, x300 yp w350 vEmailReportEdit_ShortTitle gSub_EmailReportEdit_ShortTitle Limit50,
Gui, Font, s11, Tahoma
Gui, Add, Text, xm yp+30, Email Title:
Gui, Font, s10, Tahoma
Gui, Add, Edit, xm y+10 w500 vMailTitleVar gMailTitleEdit, %MailTitleContent%
Gui, Add, Button, x+20 yp gCopyMailTitle, Copy EMail Title
Gui, Font, s10 Bold, Tahoma
Gui, Add, Text, xm y+20, Complete then the Email Content Template with the details of your bug/suggestion.
Gui, Font, s10 Norm, Tahoma
Gui, Add, Text, xm y+10, Please - if any - attach information about error messages: `nScreenshot or copy it via ctrl+c/v when message is displayed
Gui, Font, s11 Norm, Tahoma
Gui, Add, Text, xm y+10, Email Content:
Gui, Font, s10, Tahoma
Gui, Add, Edit, xm y+10 w700 h350 vMailContentVar, %MailTemplate%
Gui, Add, Button, xm+50 y+20 gCopyMail, Copy EMail Content
Gui, Add, Button, x400 yp gSendMail, Send EMail
Gui, Add, Button, x600 yp Default gCancelMail, CANCEL EMail
Gui, Show, AutoSize, Mail Bug Report
ControlSend, Edit3, {PgUp}{PgUp}, A
Gosub Sub_EmailReportEdit_ShortTitle
return

; SUBROUTINES ============================================================================

CancelMail:
Gui, 20:Destroy
return


Sub_EmailReportEdit_ShortTitle:
Gui, Submit, NoHide
MailTitleContent:= "[" . EmailReportChoice_What  . "]" . "[Prio=" EmailReportChoice_Priority  . "]" . "(" . EmailReportChoice_Area . ") " . EmailReportEdit_ShortTitle
GuiControl,,Edit2, % MailTitleContent
return

Sub_EmailReportChoice_What:
Gui, Submit, NoHide
MailTitleContent:= "[" . EmailReportChoice_What  . "]" . "[Prio=" EmailReportChoice_Priority  . "]" . "(" . EmailReportChoice_Area . ") " . EmailReportEdit_ShortTitle
GuiControl,,Edit2, % MailTitleContent
return

Sub_EmailReportChoice_Priority:
Gui, Submit, NoHide
MailTitleContent:= "[" . EmailReportChoice_What  . "]" . "[Prio=" EmailReportChoice_Priority  . "]" . "(" . EmailReportChoice_Area . ") " . EmailReportEdit_ShortTitle
GuiControl,,Edit2, % MailTitleContent
return

Sub_EmailReportChoice_Area:
Gui, Submit, NoHide
MailTitleContent:= "[" . EmailReportChoice_What  . "]" . "[Prio=" EmailReportChoice_Priority  . "]" . "(" . EmailReportChoice_Area . ") " . EmailReportEdit_ShortTitle
GuiControl,,Edit2, % MailTitleContent
return

MailTitleEdit:
Gui, Submit, NoHide
GuiControl,,Edit2, % MailTitleContent
return

CopyMailTitle:
    Gui, Submit, NoHide
	MailTitleContent := MailTitleVar
	GuiControl, Focus, Edit2
   Send, ^a
   Send, ^c
   Send {right}
return

CopyMail:
    Gui, Submit, NoHide
	GuiControl, Focus, Edit3
   Send, ^a
   Send, ^c
   Send {PgUp}{PgUp}
return

SendMail:
Gui, Submit, NoHide
StringReplace, FormatedMailEditContent, MailContentVar, `n,`%0A, All
Run, mailto:%MyEmail%?subject=%MailTitleContent%&body=%FormatedMailEditContent%
return

; EXIT ==============================================================================
GuiClose:
GuiEscape:
ExitApp
Gui, 20:Destroy
return

Image
Image
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic
Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates

Return to “Scripts and Functions”

Who is online

Users browsing this forum: f1ster and 40 guests