tag:blogger.com,1999:blog-490250049732336398.post2520552847565863828..comments2023-12-18T22:50:05.767-07:00Comments on Nora Díaz on Translation, Teaching, and Other Stuff: Adding Terms to a Secondary Termbase Using an AutoHotkey ScriptNora Díazhttp://www.blogger.com/profile/15881654628929793318noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-490250049732336398.post-9965986382833527252017-10-06T15:35:26.088-06:002017-10-06T15:35:26.088-06:00Thank you Michael!Thank you Michael!Nora Díazhttps://www.blogger.com/profile/07867455346963811186noreply@blogger.comtag:blogger.com,1999:blog-490250049732336398.post-91431017963048839242017-10-06T15:24:05.221-06:002017-10-06T15:24:05.221-06:00Very cool, thanks!Very cool, thanks!Michael Beijerhttps://www.blogger.com/profile/12826804655385764008noreply@blogger.comtag:blogger.com,1999:blog-490250049732336398.post-54448601204873189192016-11-10T07:51:17.513-07:002016-11-10T07:51:17.513-07:00Thank you Jesús! I've updated the post with an...Thank you Jesús! I've updated the post with an improved script based on your contribution.Nora Díazhttps://www.blogger.com/profile/07867455346963811186noreply@blogger.comtag:blogger.com,1999:blog-490250049732336398.post-30267242468589481992016-11-10T05:47:41.028-07:002016-11-10T05:47:41.028-07:00This is great Raphaël! Thank you for taking the ti...This is great Raphaël! Thank you for taking the time to enhance it. At my current level of non-proficiency, I would never have been able to make these enhancements, and beyond the improvements to this script, your additions will help me learn more about AutoHotkey. I love the idea of using the MultiTerm API to make the script more universal. Thanks again for sharing your knowledge on this!Nora Díazhttps://www.blogger.com/profile/07867455346963811186noreply@blogger.comtag:blogger.com,1999:blog-490250049732336398.post-2113472210947637652016-11-10T05:16:36.962-07:002016-11-10T05:16:36.962-07:00Nice script, Nora!
One more idea:
This script w...Nice script, Nora!<br /><br />One more idea: <br /><br />This script will get the source & target terms using a king of Wizard:<br /><br />; status: source term selected<br />F12::<br /> <br /> Clipboard = <br /> Send, {Control Down}{c}{Control Up}<br /> ClipWait, 0<br /> stringSource = %Clipboard%<br /><br /> msgbox, Please move to the target segment in Studio, select the term, and then click OK<br /><br /> Clipboard = <br /> Send, {Control Down}{c}{Control Up}<br /> ClipWait, 0<br /> stringTarget = %Clipboard%<br /><br /> ; Just to confirm both variables are fine<br /> MsgBox, %stringSource%`r`n%stringTarget%<br /><br />return<br /><br /><br />Regards,<br /><br />… Jesús Prieto …Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-490250049732336398.post-54117131450735868312016-11-10T03:53:54.265-07:002016-11-10T03:53:54.265-07:00Great idea, Nora!
I took the freedom to modify th...Great idea, Nora!<br /><br />I took the freedom to modify the first part of your script a bit to make it more robust:<br /><br />#IfWinActive ahk_exe SDLTradosStudio.exe<br />F12::<br />Clipboard := "" ; empty the clipboard<br />Send, {Control Down}{c}{Control Up}<br />ClipWait, 3 ; wait for text to appear on the clipboard, if there isn't any after 3 seconds display error message<br />If ErrorLevel<br />{<br /> ToolTip, Please make sure to select text before pressing the hotkey.<br /> SetTimer, RemoveToolTip, 3000<br /> Return<br /><br /> RemoveToolTip:<br /> SetTimer, RemoveToolTip, Off<br /> ToolTip<br /> Return<br />}<br /><br />WinActivate, SDL MultiTerm<br />Sleep, 500<br />Send, {F3}{Tab}<br />Sleep, 200<br />Send, {Tab}{Control Down}{v}{Control Up}<br />Sleep, 500<br />Send, {Tab}<br />Return<br /><br />#IfWinActive ahk_exe MultiTerm.exe<br />F12::<br />Send {F12}<br />Sleep 500<br />WinActivate, SDL Trados Studio<br />Send {F6}<br />Return<br /><br />I'm currently also looking into using the application programming interface (API) of MultiTerm to connect add terms instead of relying on "tab" pressing since it would make the script more universal and not depending on one specific termbase definition.<br /><br />Best regards,<br />RaphaëlMulleflupphttps://www.blogger.com/profile/12619182753199432591noreply@blogger.com