 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ReyRey Guest
|
Posted: Sun May 31, 2009 4:06 pm Post subject: Replacing `n, square problem |
|
|
I'm trying to make a dropdown menu with FileRead (reading a file and using the contents to create the dropdown).
Code:
| Code: | FileRead,sup,sp.ahk
StringReplace,sup,sup,`n,|,A
Gui,Add,DropDownList,vSuppliers, %sup%
Gui,Show |
sp.ahk (file used):
| Code: | Some1
Some2
Some3 |
Result:
| Code: | | Some1(square) | Some2(square) | Some3(square) |
It works ok, but a square is at the end of each of the choices. I know the square represent the new lines, but I can't get rid of it. Is this an AHK problem? |
|
| Back to top |
|
 |
ManaUser
Joined: 24 May 2007 Posts: 1121
|
Posted: Sun May 31, 2009 4:08 pm Post subject: |
|
|
| Try replacing `r`n instead of just `n. |
|
| Back to top |
|
 |
ReyRey Guest
|
Posted: Sun May 31, 2009 4:10 pm Post subject: |
|
|
Nice thanks. Why does this work?  |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Sun May 31, 2009 4:52 pm Post subject: |
|
|
Typically, Windows files use carriage return and linefeed (`r`n) and Unix files use only linefeed (`n).
You may be better off using the *t option of FileRead. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|