Search & Replace for multiple terms/phrases

Hi,

I'm just responding to this thread in here with a possible AHK solution:

 RE: Search & replace multiple words/terms in pre-translated segments? 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
^!h:: ; The hotkey for Ctrl+Alt+H to start the process
global filePaths := {} ; Create an associative array to store full file paths
global fileNames := "" ; Create a variable to store the file names
global PosX, PosY ; Create global variables to store the dropdown menu's position
Gui, Add, DropDownList, w450 vFilePath ; Add a dropdown list to the GUI with width of 400
Gui, Font, s12 ; Set the font size to 12
Loop, Read, c:\Users\pfilkin\Documents\SDL\AppStore\2023\Search_Replace_AHK\settings.txt ; Read the hardcoded settings file line by line
{
SplitPath, A_LoopReadLine, name, dir, ext, name_no_ext, drive ; Split the file path into parts
fileNames .= name_no_ext . "|" ; Add the file name (without extension) to the string, separated by "|"
filePaths[name_no_ext] := A_LoopReadLine ; Store the full file path in the associative array
}
fileNames := SubStr(fileNames, 1, StrLen(fileNames) - 1) ; Remove the last "|"
GuiControl,, FilePath, %fileNames% ; Set the items of the dropdown list
WinGetPos, PosX, PosY,,, A ; Get the position of the active window
PosY := PosY - 150 ; Subtract 150 from PosY
Gui, Show, x%PosX% y%PosY% w500 h100, Select a file ; Show the GUI at the position of the active window with a larger window
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I definitely didn't write this on my own... I used ChatGPT by starting small and slowly enhancing the script until I had what I needed.  I think it took me around 3-hours from start to finish last night, but I think it's a good example of how we can use AI to help with our work.  I created a short video to explain how this works as it may not be obvious without some context.

emoji

Paul Filkin | RWS Group

________________________
Design your own training!

You've done the courses and still need to go a little further, or still not clear? 
Tell us what you need in our Community Solutions Hub