From 0b4bf7307d29686879a36d4260039b07db9ebb59 Mon Sep 17 00:00:00 2001 From: "Mr.KM" Date: Sun, 6 Dec 2020 00:48:16 +0300 Subject: [PATCH] Add files via upload --- src/CL-Translator.au3 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/CL-Translator.au3 b/src/CL-Translator.au3 index 8b8e899..91be924 100644 --- a/src/CL-Translator.au3 +++ b/src/CL-Translator.au3 @@ -1,10 +1,11 @@ #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=F:\Autoit Cool\Projects\Translator\yaTL.ico -#AutoIt3Wrapper_Outfile=F:\Autoit Cool\Projects\Translator\CL-Translator.exe +#AutoIt3Wrapper_Outfile=F:\Autoit Cool\Projects\Translator\CL-QuickTranslate.exe +#AutoIt3Wrapper_Compression=3 #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Res_Description=Translation made easy. -#AutoIt3Wrapper_Res_Fileversion=0.0.0.133 +#AutoIt3Wrapper_Res_Fileversion=0.0.0.137 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p #AutoIt3Wrapper_Res_CompanyName=Kabue Murage #AutoIt3Wrapper_Res_LegalCopyright=Kabue Murage @@ -129,9 +130,15 @@ ElseIf _CmdLine_KeyExists('f') Then If $b_gSaveToFile Then Select Case StringInStr($s_gSaveAs, '%f') - $s_gSaveAs = StringReplace($s_gSaveAs, '%f', "") + ; FQPN to filename. + Local $sRep = StringRegExpReplace($aMtpleEnc[$i], "^.*\\", "") + ; strip extension + $sRep = StringReplace($sRep, _GetFileExtension($sRep), "") + + $s_gSaveAs = StringReplace($s_gSaveAs, '%f', $sRep) + ContinueCase Case StringInStr($s_gSaveAs, '%l') - $s_gSaveAs = StringReplace($s_gSaveAs, '%l', $vLangResult) + $s_gSaveAs = StringReplace($s_gSaveAs, '%l', StringUpper($vLangResult)) EndSelect WriteToFile($s_gSaveAs, $res) $hCout("Saved to file : " & $s_gSaveAs & @CRLF)