astrax Posted May 13, 2009 Share Posted May 13, 2009 (edited) Hi, Please help me write a short script that checks for space character and remove it. Thank you for assisting. Edited May 13, 2009 by astrax Link to comment Share on other sites More sharing options...
Yashied Posted May 13, 2009 Share Posted May 13, 2009 Hi,Please help me write a short script that checks for space character and remove it.Thank you for assisting.StringStripWS($String, 8) My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
astrax Posted May 13, 2009 Author Share Posted May 13, 2009 StringStripWS($String, 8) I'm not sure how i'd apply this. I have a text box ($input) asking for user input, the click of a button ($submit) will check the string for space and remove it. Would it be correct if i write it like this? case $submit StringStripWS($input, 8) sub() Link to comment Share on other sites More sharing options...
astrax Posted May 13, 2009 Author Share Posted May 13, 2009 I found a way to do it.. thanks for the code. Case $Submit $RmSp = StringStripWS(GUICtrlRead($input), 8) sub() Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted May 13, 2009 Share Posted May 13, 2009 You could also use "StringRepalce ()" here's a little example Source : $Replace_Space_With = '{Space}'; This can be anything. $Input = InputBox ('Name?','Please input your name.') $Input = StringReplace ($Input, ' ', $Replace_Space_With); Scans $Input for spaces and replaces it with $Replace_Space_With MsgBox ('0','StringReplace () Example','Before : ' & StringReplace ($Input, $Replace_Space_With, ' ') & @CRLF & 'After : ' & $Input, '0') Hope this helps! - John Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 13, 2009 Share Posted May 13, 2009 or.. stringsplit($String, ' ') there are a few ways to do this.. i would do John's idea myself though [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] 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