Agent Orange Posted September 14, 2006 Share Posted September 14, 2006 What is command that can be used in AutoIt that will do a trim of empty spaces from text that you've grabbed into a variable. Example: I have a script that grabs the author name from a Word document and inputs it into the Author section of the Properties window. When it adds it to the box there are a bunch of preceeding spaces in front of that name. How can I clean up those spaces before it gets added. I know VB has trim or rtrim ltrim. thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted September 14, 2006 Developers Share Posted September 14, 2006 What is command that can be used in AutoIt that will do a trim of empty spaces from text that you've grabbed into a variable. Example:I have a script that grabs the author name from a Word document and inputs it into the Author section of the Properties window. When it adds it to the box there are a bunch of preceeding spaces in front of that name.How can I clean up those spaces before it gets added.I know VB has trim or rtrim ltrim.thanksDid you open the Helpfile a search ? I am sure its there... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Agent Orange Posted September 14, 2006 Author Share Posted September 14, 2006 What is command that can be used in AutoIt that will do a trim of empty spaces from text that you've grabbed into a variable. Example:I have a script that grabs the author name from a Word document and inputs it into the Author section of the Properties window. When it adds it to the box there are a bunch of preceeding spaces in front of that name.How can I clean up those spaces before it gets added.I know VB has trim or rtrim ltrim.thanksYa, I did check the help file first. I don't see a command "trim". I wondering what the equiv would be to that.thanks Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 14, 2006 Moderators Share Posted September 14, 2006 Ya, I did check the help file first. I don't see a command "trim". I wondering what the equiv would be to that.thanksSince your dealing with "Strings" look at the String* functions in the help file.. as Jdeb said, you'll find all you need there. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Agent Orange Posted September 14, 2006 Author Share Posted September 14, 2006 Found it. Thanks Link to comment Share on other sites More sharing options...
Agent Orange Posted September 14, 2006 Author Share Posted September 14, 2006 Ok, I what to trim off the leading spaces to the left of the string in question. But I won't know the number of leading spaces.....I just what to trim off all the leading spaces. Link to comment Share on other sites More sharing options...
Agent Orange Posted September 14, 2006 Author Share Posted September 14, 2006 maybe StringStripWS? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 14, 2006 Moderators Share Posted September 14, 2006 Ok, I what to trim off the leading spaces to the left of the string in question. But I won't know the number of leading spaces.....I just what to trim off all the leading spaces.How do you do it in VB?I use StringStripWS() personally. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Agent Orange Posted September 14, 2006 Author Share Posted September 14, 2006 (edited) Sorry all....I'm a noob. I'll research this better before bothering you again. Edited September 14, 2006 by Agent Orange Link to comment Share on other sites More sharing options...
Developers Jos Posted September 14, 2006 Developers Share Posted September 14, 2006 Ya, I did check the help file first. I don't see a command "trim". I wondering what the equiv would be to that.thanksNo, I meant SEARCH not "look in the index"....Click on the Search tab at the top and type Trim.... I am pretty sure it will show you the correct functions..... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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