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 

How to create string?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
merronmee



Joined: 13 Oct 2009
Posts: 1

PostPosted: Tue Oct 13, 2009 9:07 pm    Post subject: How to create string? Reply with quote

I'd like to create string (or something like it) which contains letters which are given, or which are randomized. I can make random numbers and letters already, but how I combine them to one string or... something that could be pasted somewhere else? I figured out one solution: write every letter to a file and then read the first line to variable xD

So how I can make string from letters or numbers?

And hey btw, how it is possible to empty file from data? I'm sure there's a better way to do it than just delete file every time and create it again...
Back to top
View user's profile Send private message
mstorey20



Joined: 21 Sep 2009
Posts: 10

PostPosted: Tue Oct 13, 2009 9:20 pm    Post subject: Reply with quote

Maybe missing something, but you can put strings, variables into strings easily
Code:


Random, rand, 1, 10

Test = ABC%rand%TEST
clipboard = %Test% ; copied to clipboard for pasting

MsgBox %Test%

_________________
StoreyQuickNotes - An AutoHotkey Project for Radiation Oncology


Last edited by mstorey20 on Tue Oct 13, 2009 9:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Tue Oct 13, 2009 9:21 pm    Post subject: Reply with quote

Also, this function may be of your interest.
_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"

Antonio França
My stuff: Google Profile
Back to top
View user's profile Send private message Visit poster's website
txquestor



Joined: 22 Aug 2009
Posts: 294

PostPosted: Tue Oct 13, 2009 9:22 pm    Post subject: Reply with quote

If you post your script, even if it doesn't work.
It's easier for forum members to understand what you are trying to do.

Also to help you. Read the following links.
http://www.autohotkey.com/docs/Variables.html
http://www.autohotkey.com/forum/viewtopic.php?t=4986
http://www.autohotkey.com/forum/viewtopic.php?t=47791
http://www.autohotkey.com/docs/
http://www.autohotkey.com/docs/commands.htm

Example of combining strings.
Code:

String1 = kdfuio4et
String2 = 12w34r56
String3 := String1 . String2 ; note: the period (.) must have a single space on either side of it.

Msgbox % String3
Return


Have Fun Exclamation Laughing
_________________

"Man's quest for knowledge is an expanding series whose limit is infinity"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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