| View previous topic :: View next topic |
| Author |
Message |
[¤GoO¤]
Joined: 22 Feb 2005 Posts: 60 Location: Sweden
|
Posted: Fri Mar 11, 2005 4:19 pm Post subject: Fill string command |
|
|
As commented in http://www.autohotkey.com/forum/viewtopic.php?t=2760, there don't seem to be any command for "filling" a string with one single character (see example).
This command would be very useful if you want to transform multiple strings (with different length) into strings with the same length. _________________ "Make everything as simple as possible, but not simpler."
- Albert Einstein (1879-1955) |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sat Mar 12, 2005 1:49 am Post subject: |
|
|
Although the need seems to rare to justify a new command, the ability to call functions is planned for the near future. When this is done, you can #Include a file containing your favorite functions, one of which can be something like:
FillVar(MyVar, "Z", 20) ; Fill up any remaining space in MyVar with Z's (up to a length of 20).
You or someone else would have to actually write the function. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Sat Mar 12, 2005 5:57 pm Post subject: |
|
|
It is actually a 2-liner. | Code: | String = abc ; input = String, output = Filled
Fill = .......... ; constant, allows filling 10 dots
Filled = %String%%Fill%
StringLeft Filled, Filled, 10 |
|
|
| Back to top |
|
 |
|