Here it is
It will:
Download Ahk if you dont already have
Save Inputed abbreviations in an ahk file ready for execution and will automaticaly expand these into full words when run.
The .AHK with the abbreciations in will be saved in the same folder as the main app
The expanding file will be made in the same directory when an input is added for the first time
Code:
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.T.Fieldhouse <kermit.the.frog93@gmail.com>
; File type: exe/ahk
#NoEnv
#SingleInstance
SetWorkingDir, %A_ScriptDir%
;-------------------------------------------GUI----------------------------------------------------------
Gui, Add, Text,, Press Alt + H to hide Alt + S to re-show or esc to exit.
Gui, Add, Text,, Please enter the abbreviation here.
Gui, Add, Edit, vAbAddName
Gui, Add, Text,, Please enter the full phrase here.
Gui, Add, Edit, vFullAddName
Gui, Add, Button, Default, Add
Gui, Add, Button,, Hide
Gui, Show
Return
;----------------------------------ADD TO VAR LOGG-------------------------------------------
ButtonADD:
IfNotExist, AbbreviationData.ahk
{
GoSub, ADD1
}
else
{
GoSub, ADD2
}
Return
ADD1:
Gui,Submit,Nohide
FileAppend ,
(
::%AbAddName%::%FullAddName%
), AbbreviationData.ahk
MsgBox, The abbreviation entered has been saved in %A_ScriptDir%AbbreviationData.ahk .
Reload
Return
Return
ADD2:
Gui,Submit,Nohide
FileAppend ,
(
::%AbAddName%::%FullAddName%
), AbbreviationData.ahk
MsgBox, The abbreviation entered has been added to the library.
Reload
Return
;---------------------------------------HOTKEYS-----------------------------------------------------
esc::ExitApp
!h::GoSub, ButtonHIDE
!s::GoSub, WINSHOW
;----------------------------------------------HIDE-----------------------------------------------------
ButtonHIDE:
WinHide, Abbreviation replacer.ahk
return
;--------------------------------------------SHOW-----------------------------------------------------
WINSHOW:
WinShow, Abbreviation replacer.ahk
return
NOTE: Save the file as
Abbreviation replacer.ahk