| View previous topic :: View next topic |
| Author |
Message |
how do i append a string Guest
|
Posted: Sat Oct 24, 2009 4:20 am Post subject: how do i append a string |
|
|
| string1+string2? is there a way to do it with regexreplace? |
|
| Back to top |
|
 |
tekkie2412
Joined: 22 May 2007 Posts: 73
|
Posted: Sat Oct 24, 2009 4:30 am Post subject: |
|
|
Im not sure what youre asking. You might be asking how to join 2 strings?
| Code: |
var1 = abc
var2 = def
var3 = %var1%%var2%
MsgBox, %var3% ;will output abcdef
|
You can also add to a string just by assigning to it
| Code: |
var1 = abc
MsgBox, %var1%def ;will also output abcdef
| [/quote] |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Oct 24, 2009 4:30 am Post subject: |
|
|
| Code: | string1 = abc
string2 = 123
string3 = %string1%%string2%
msgbox, % string3 |
|
|
| Back to top |
|
 |
Guest
|
Posted: Sat Oct 24, 2009 4:32 am Post subject: |
|
|
i understand now, i was using the wrong operator
var1:="blablabla%var2%" |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Oct 24, 2009 4:32 am Post subject: |
|
|
| thanks guys |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Oct 24, 2009 4:56 am Post subject: |
|
|
hold on now im still having trouble, the program has no idea what im doing
;files used
ending=\Q\file\E
file=%A_WorkingDir%%ending%
;pictures used
;software dependent pics, tabs and buttons
doubleClickClose:=RegExReplace(folder, "file","doubleClickClose.bmp")
okButton:=RegExReplace(folder, "file","okButton.bmp")
yesButton:=RegExReplace(folder, "file","yesButton.bmp")
saveTaxButton:=RegExReplace(folder, "file","saveTaxButton.bmp")
exploreButton:=RegExReplace(folder, "file","exploreButton.bmp")
trainButton:=RegExReplace(folder, "file","trainButton.bmp")
confirmBuildButton:=RegExReplace(folder, "file","confirmBuildButton.bmp") |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Sat Oct 24, 2009 5:08 am Post subject: |
|
|
Could you give examples of what the expected output to your variables would be versus what you're actually getting? _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
tekkie2412
Joined: 22 May 2007 Posts: 73
|
Posted: Sat Oct 24, 2009 5:15 am Post subject: |
|
|
Im not real familiar with RegExReplace, but I think you have some syntax issues.
| Quote: |
NewStr := RegExReplace(Haystack, NeedleRegEx [, Replacement = "", OutputVarCount = "", Limit = -1, StartingPosition = 1])
|
I think its trying to find "C:\blahblahblah\Q\file\E" in the string "folder". Its not finding it so nothing is happening. Atleast I think thats the problem.
Put a MsgBox at the end of your script, run it, then when the msgbox pops up double click the tray icon. You will be able to see how things were evaluated and see if its doing anything[/code] |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Oct 24, 2009 5:21 am Post subject: |
|
|
| got it lol thanks guys |
|
| Back to top |
|
 |
nostroke
Joined: 22 Oct 2009 Posts: 95
|
Posted: Sat Oct 24, 2009 6:09 am Post subject: |
|
|
string string
Hello who is this?
im the guy who asked about how do i append a string
oh can you call back later,
if the phone strings more then 3 times im probably not at home
Bye
later
String a ling String a ling string a ling
sorry the person you are trying to reach is not available,
for more options please press zero
press one for Spanish
press two for Chinese
press three for Japanese
press four if you're unsure of your race
press five if you have a question about autohotkey |
|
| Back to top |
|
 |
|