Initial
This commit is contained in:
152
Hammerer.ahk
Normal file
152
Hammerer.ahk
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
SendMode Input
|
||||||
|
Menu, Tray, Icon, shell32.dll, 166
|
||||||
|
|
||||||
|
|
||||||
|
f9::
|
||||||
|
Gosub, ShowGui
|
||||||
|
return
|
||||||
|
|
||||||
|
ButtonOK:
|
||||||
|
Gui, Submit
|
||||||
|
Gui, Destroy
|
||||||
|
|
||||||
|
if (MyRadioGrid = 1) { ; remember what was checked last...
|
||||||
|
Mode := "Grid"
|
||||||
|
} else if (MyRadioProperties = 1) {
|
||||||
|
Mode := "Prop"
|
||||||
|
} else if (MyRadioPropertiesParent = 1) {
|
||||||
|
Mode := "PropParent"
|
||||||
|
}
|
||||||
|
|
||||||
|
RegWrite, REG_SZ, HKEY_CURRENT_USER\Software\Hammerer, EntryMode, %Mode%
|
||||||
|
|
||||||
|
;aOrder := [1,1,1,1,2,1,2,1,3,1,2,1,2,1,2,1,2,1]
|
||||||
|
;RegRead, EntryOrder, HKEY_CURRENT_USER\Software\Hammerer, EntryOrder
|
||||||
|
aOrder := StrSplit(EntryOrder , ",")
|
||||||
|
|
||||||
|
Loop % aOrder.Length()
|
||||||
|
{
|
||||||
|
currEle=% aOrder[A_Index]
|
||||||
|
toSendText=% Texts%currEle%
|
||||||
|
if (toSendText = "") {
|
||||||
|
toSendText = % Texts0
|
||||||
|
}
|
||||||
|
; If the text is empty (that is not a blank) then don't change
|
||||||
|
; (Blank will change to blank)
|
||||||
|
if (toSendText != "") {
|
||||||
|
send % toSendText
|
||||||
|
send {enter}
|
||||||
|
} else {
|
||||||
|
if (Mode = "Grid"){
|
||||||
|
send {enter}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Mode != "Grid"){
|
||||||
|
send {down}
|
||||||
|
if (Mode = "PropParent") {
|
||||||
|
send {down}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sleep, 150
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
ButtonApply:
|
||||||
|
Gui, Submit
|
||||||
|
|
||||||
|
RegWrite, REG_SZ, HKEY_CURRENT_USER\Software\Hammerer, LanguageList, %LanguageList%
|
||||||
|
RegWrite, REG_SZ, HKEY_CURRENT_USER\Software\Hammerer, EntryOrder, %EntryOrder%
|
||||||
|
MsgBox, Changes Applied
|
||||||
|
Gosub, ShowGui
|
||||||
|
return
|
||||||
|
|
||||||
|
ButtonCancel:
|
||||||
|
Gui, Destroy
|
||||||
|
return
|
||||||
|
|
||||||
|
PasteButton:
|
||||||
|
index:=SubStr(A_GuiControl,2)
|
||||||
|
GuiControl,,Texts%index%,%clipboard%
|
||||||
|
return
|
||||||
|
|
||||||
|
ButtonBulkPaste:
|
||||||
|
aStrings := StrSplit(clipboard, "|")
|
||||||
|
|
||||||
|
Loop % aStrings.Length() {
|
||||||
|
GuiControl,,Texts%A_Index%, % aStrings[A_Index]
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
ShowGui:
|
||||||
|
Gui, Destroy
|
||||||
|
Gui, Add, Text,x5 y5 ,0-Fallback
|
||||||
|
Gui, Add, Edit,x100 y5 vTexts0
|
||||||
|
; Gui, Add, CheckBox, x220 y5 vSkip0,
|
||||||
|
Gui, Add, Button, x75 y5 gPasteButton, P0
|
||||||
|
;aLang := ["English","Spanish","Portuguese"]
|
||||||
|
RegRead, LanguageList, HKEY_CURRENT_USER\Software\Hammerer, LanguageList
|
||||||
|
if (StrLen(LanguageList) == 0) {
|
||||||
|
LanguageList := "German,English"
|
||||||
|
}
|
||||||
|
|
||||||
|
aLang := StrSplit(LanguageList, ",")
|
||||||
|
|
||||||
|
yPos := 35
|
||||||
|
Loop % aLang.Length() {
|
||||||
|
Gui, Add, Text,x5 y%yPos% , % A_Index "-" aLang[A_Index]
|
||||||
|
Gui, Add, Edit,x100 y%yPos% vTexts%A_Index%
|
||||||
|
; Gui, Add, CheckBox, x220 y%yPos% vSkip%A_Index%,
|
||||||
|
Gui, Add, Button, x75 y%yPos% gPasteButton, P%A_Index%
|
||||||
|
yPos += 30
|
||||||
|
}
|
||||||
|
|
||||||
|
RegRead, EntryMode, HKEY_CURRENT_USER\Software\Hammerer, EntryMode
|
||||||
|
|
||||||
|
if (EntryMode = "Grid") { ; remember what was checked last...
|
||||||
|
CheckedGrid=Checked
|
||||||
|
CheckedProp=
|
||||||
|
CheckedPropParent=
|
||||||
|
} else if (EntryMode = "Prop") {
|
||||||
|
CheckedProp=Checked
|
||||||
|
CheckedGrid=
|
||||||
|
CheckedPropParent=
|
||||||
|
} else { ; PropParent
|
||||||
|
CheckedProp=
|
||||||
|
CheckedGrid=
|
||||||
|
CheckedPropParent=Checked
|
||||||
|
}
|
||||||
|
|
||||||
|
Gui, Add, GroupBox, x300 y0 w200 h90, Mode
|
||||||
|
Gui, Add, Radio, x305 y20 vMyRadioGrid %CheckedGrid%, Grid
|
||||||
|
Gui, Add, Radio, vMyRadioProperties %CheckedProp%, Properties
|
||||||
|
Gui, Add, Radio, vMyRadioPropertiesParent %CheckedPropParent%, Properties With Parent
|
||||||
|
|
||||||
|
Gui, Add, Button, x300 y95 w67 gButtonBulkPaste, BulkPaste
|
||||||
|
Gui, Add, Button, x367 y95 w67 default gButtonOK, OK
|
||||||
|
Gui, Add, Button, x434 y95 w67 gButtonCancel, Cancel
|
||||||
|
|
||||||
|
if (yPos < 95) {
|
||||||
|
yPos := 95
|
||||||
|
}
|
||||||
|
|
||||||
|
yPos += 30
|
||||||
|
Gui, Add, Text,x5 y%yPos%,LanguageList
|
||||||
|
Gui, Add, Edit,x100 y%yPos% w400 vLanguageList, % LanguageList
|
||||||
|
|
||||||
|
yPos += 30
|
||||||
|
RegRead, EntryOrder, HKEY_CURRENT_USER\Software\Hammerer, EntryOrder
|
||||||
|
if (StrLen(EntryOrder) == 0) {
|
||||||
|
EntryOrder := "1,2,1,2"
|
||||||
|
}
|
||||||
|
|
||||||
|
Gui, Add, Text,x5 y%yPos%,EntryOrder
|
||||||
|
Gui, Add, Edit,x100 y%yPos% w400 vEntryOrder, % EntryOrder
|
||||||
|
|
||||||
|
yPos += 30
|
||||||
|
Gui, Add, Button, x5 y%yPos% w495 gButtonApply, Apply LanguageList and EntryOrder
|
||||||
|
|
||||||
|
yPos += 30
|
||||||
|
Gui, Show, h%yPos% w505, [Hammerer] 2018-06-05 j.tretter@accenture.com
|
||||||
|
return
|
||||||
Reference in New Issue
Block a user