SDL Trados Studio
SDL Trados GroupShare
SDL Trados Business Manager
SDL Trados Live
SDL MultiTerm
SDL Passolo
SDL Speech to Text
SDL Managed Translation - Enterprise
SDL MultiTrans
SDL TMS
SDL WorldServer
Translation Management Connectors
SDL LiveContent S1000D
SDL Contenta S1000D
SDL XPP
SDL Tridion Docs
SDL Tridion Sites
SDL Content Assistant
SDL Machine Translation Cloud
SDL Machine Translation Connectors
SDL Machine Translation Edge
Language Developers
Tridion Developers
Tridion Docs Developers
Xopus Developers
Community Help
SDL User Experience
Language Products - GCS Internal Community
SDL Community Internal Group
SDL Access Customer Portal
SDL Professional Services
SDL Training & Certification
Style Guides
Language Technology Partner Group
SDL Academic Partners
SDL Enterprise Technology Partners
XyUser Group
ETUG (European Trados User Group) Public Information
Machine Translation User Group
Nordic SDL Tridion Docs User Group
SDL Tridion UK Meetup
SDL Tridion User Group New England
SDL Tridion West Coast User Group
SDL WorldServer User Group
Tridion Docs Europe & APAC User Group
Tridion User Group Benelux
Tridion User Group Ohio Valley
SDL MultiTerm Ideas
SDL Passolo Ideas
SDL Trados GroupShare Ideas
SDL Trados Studio Ideas
SDL Machine Translation Cloud Ideas
SDL Machine Translation Edge Ideas
SDL Language Cloud TMS Ideas
SDL Language Cloud Terminology Ideas
SDL Language Cloud Online Editor Ideas
SDL Managed Translation - Enterprise Ideas
SDL TMS Ideas
SDL WorldServer Ideas
SDL Tridion Docs Ideas
SDL Tridion Sites Ideas
SDL LiveContent S1000D Ideas
SDL XPP Ideas
Events & Webinars
To SDL Documentation
To SDL Support
What's New in SDL
Detecting language please wait for.......
I came across this script from Selcuk Akyuz in the Proz website a few weeks ago:
;------------------------------------------------------------------------------; Count characters in a segment;------------------------------------------------------------------------------!c:: Send, ^cClipWaitChars := StrLen(Clipboard)RegExReplace(Clipboard,A_Space,"",Spaces)MsgBox % "The highlighted text is " Chars " characters in length and contains " Spaces " spaces."clipboard = ; Empty the clipboardreturn
The way it works is you select some text in the source or target segment and press Alt+c. You then get something like this with a small message box that contains the count including spaces:
ClipWait with no parameter will wait indefinitely until the clipboard contains some data. Because there is nothing selected, the script doesn't ever get to the next line.
Please change the ClipWait…
Thanks Paul Filkin !I ran into a problem with the script that I don't know how to solve. Maybe an IF no text is selected, then return, or IF no text selected, show 0 character?I have no problem running the script on selected text, but if I press the hotkeys without first selecting text, nothing happens, and the script no longer works. This script would be super useful to my team when translating social media content, but some of my translator are not that comfortable with computers, and I definitely anticipate one of them forgetting to select the text, and they would’nt know how to restart the script.Any idea how to work around this error?
Please change the ClipWait line to something like this:
ClipWait, 1 ; wait for 1 sec max.
and it will not hang up.
Good luck!
Works perfectly and I learned a new thing! Thanks Jesús!Here’s my code now, with a different hot key :
^+!c:: Send, ^cClipWait, 1 ; wait for 1 sec maxChars := StrLen(Clipboard)RegExReplace(Clipboard,A_Space,"",Spaces)MsgBox % "The highlighted text is " Chars " characters in length and contains " Spaces " spaces."clipboard = ; Empty the clipboardreturn
Glad it helped!