 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Possemaster Guest
|
Posted: Wed Nov 18, 2009 3:55 pm Post subject: cRichEdit Open File |
|
|
I cant get this to work:
If i use the following code it opens in de rich text editor correct.
| Code: | cRichEdit(REdit1, "FileOpen", ("C:\test.rtf") )
Return |
But i want to use the file browser to coose my file like this:
| Code: | OpenFile:
FileSelectFile, SelectedFile, 3, C:\, Selecteer een Oplossing, RichText Documenten (*.rtf)
if SelectedFile =
MsgBox, Geen bestand geselecteerd.
else
cRichEdit(REdit1, "FileOpen", ("C:\test.rtf") )
Return |
The path returns correct but it needs the quotes around it, if u put quotes around the %SelectedFile% it looks at it as plain text.
What do i do. |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 7698 Location: Germany (but I only speak English)
|
Posted: Wed Nov 18, 2009 4:20 pm Post subject: |
|
|
Thanks for posting code
| Code: | OpenFile:
FileSelectFile, SelectedFile, 3, C:\, Selecteer een Oplossing, RichText Documenten (*.rtf)
if SelectedFile =
MsgBox, Geen bestand geselecteerd.
else
cRichEdit(REdit1, "FileOpen", ("""" . SelectedFile . """") )
Return |
"""" is a "" in quotes. The outer " make it a string, and the inner "" is a " when inside a string. _________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me. |
|
| 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
|