TynoPrime Posted July 6, 2007 Share Posted July 6, 2007 Ok, hard to explain it really, basically I've used; $Test1 = InputBox("Tester1", "Type in something") $Test2 = InputBox("Tester1", "Type in something else") Now, later on in the script, I want to be able to mix those, with text. For instance if I typed in "LOLZ" into the first input box, and "HAHA" into the second, I want to be able to do something like this: MsgBox(64, "Tester1", "You're right that's $Test1 not $Test2") But if I do that, it comes out with "You're right that's $Test1 not $Test2", rather than "You're right that's LOLZ not HAHA", which is what I want. Any idea how I could do it? All help is welcome. Link to comment Share on other sites More sharing options...
Monamo Posted July 6, 2007 Share Posted July 6, 2007 (edited) MsgBox(64, "Tester1", "You're right that's $Test1 not $Test2") Syntax rules all. When including variables in your output, you don't want them inside your quotes. This basically means you'll have a concatenated set of data passed to msgbox (using "&"). MsgBox(64, "Tester1", "You're right that's " &$Test1 &" not " &$Test2) Edit for spacing Edited July 6, 2007 by Monamo - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2007 Share Posted July 6, 2007 Ok, hard to explain it really, basically I've used; $Test1 = InputBox("Tester1", "Type in something") $Test2 = InputBox("Tester1", "Type in something else") Now, later on in the script, I want to be able to mix those, with text. For instance if I typed in "LOLZ" into the first input box, and "HAHA" into the second, I want to be able to do something like this: MsgBox(64, "Tester1", "You're right that's $Test1 not $Test2") But if I do that, it comes out with "You're right that's $Test1 not $Test2", rather than "You're right that's LOLZ not HAHA", which is what I want. Any idea how I could do it? All help is welcome. Look in the help file for variables and operators, and you'll find the '&' ampersand for appending strings: MsgBox(64, "Tester1", "You're right that's " & $Test1 & " not " & $Test2) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
TynoPrime Posted July 6, 2007 Author Share Posted July 6, 2007 Thanks alot, both of you. I had a quick look in the help file, but didn't remember what they were called, lol. Thanks guys, much appreciated. 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