Guest rathore Posted March 27, 2004 Posted March 27, 2004 nothing advanced ... nothing difficult... but comes handy to me at many times so thought of submitting. if while entering serial nos. in applications which have 4 or 5 boxes which in turn require 5-6 characters each, you hate it when you can't just copy-paste, then you will like this script. this sends chars and strips whitespaces & dash (minus) while doing so. $serial = InputBox ( 'Enter Serial Number', 'Enter serial number with or without -' ) if $serial='' then Exit Do $serial = StringReplace( $serial, '-', '' ) $pos = StringInStr($serial, "-") until $pos = 0 Do $serial = StringReplace( $serial, ' ', '') $spos = StringInStr($serial, " ") until $spos = 0 SplashTextOn ( 'Select', 'Select the window' & @LF & 'in next 4 seconds.', 150, 75 ) WinMove ( 'Select', '', 1, 1, 150, 75 ) Sleep ( 4000 ) SplashOff ( ) Send ( $serial )
Developers Jos Posted March 27, 2004 Developers Posted March 27, 2004 Just a minor remark: You don't need the DO/Until loops because the StringReplace will replace all occurrences of the search string. $serial = InputBox ( 'Enter Serial Number', 'Enter serial number with or without -' ) if $serial='' then Exit $serial = StringReplace( $serial, '-', '' ) $serial = StringReplace( $serial, ' ', '') SplashTextOn ('Select', 'Select the window' & @LF & 'in next 4 seconds.', 150, 75,1,1 ) Sleep ( 4000 ) SplashOff ( ) Send ( $serial ) 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.
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