sigil Posted July 20, 2006 Share Posted July 20, 2006 I have a script that collects data from a terminal application and writes that information to an MS Word document. Because of the Word document's format, the data must be written in the Overtype mode (the mode that Word goes into when you press the Insert key). Some of the data writes properly, but certain strings automatically turn off Overtype. Maybe they have a hidden character that automatically turns Overtype off, regardless of whether it's already on or off. This code: send("{ins}"&$mystring&"{ins}") hasn't worked. What I want to do: I want to make sure that Overtype turns on before I send the string, and turns off after the string writes to Word. Link to comment Share on other sites More sharing options...
Skruge Posted July 21, 2006 Share Posted July 21, 2006 Could be special characters in your string. Try this: Send("{INS}") Send($mystring, 1) Send("{INS}") [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
Squirrely1 Posted July 21, 2006 Share Posted July 21, 2006 It could be that Word is protective of your data. Send is a window related command that might take extra time to execute. Try this in your loop and if it seems to help, as little as 400 ms might be enough time: send("{ins}"&$mystring&"{ins}") sleep(3000) But if the problem is a special character, does the text that you are entering include a lot of special characters or is it a common problem, about as common as @CRLF when @CR or @LF might better do. Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now