AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fill string command

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
[¤GoO¤]



Joined: 22 Feb 2005
Posts: 60
Location: Sweden

PostPosted: Fri Mar 11, 2005 4:19 pm    Post subject: Fill string command Reply with quote

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
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat Mar 12, 2005 1:49 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Laszlo



Joined: 14 Feb 2005
Posts: 4078
Location: Pittsburgh

PostPosted: Sat Mar 12, 2005 5:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group