 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
z3lig
Joined: 13 Aug 2007 Posts: 11
|
Posted: Sun Aug 19, 2007 1:40 am Post subject: How to SendInput, {raw} %ini_variable_with_carriage_returns% |
|
|
Hello,
How do I use SendInput, {raw} to send a variable with carriage returns that is stored in an ini file?
For example
test.ini:
| Code: |
[scripts]
send=(
line 1
line 2
line 3
line 4
etc.
)
|
AHK Script:
| Code: |
IniRead, sAudit, test.ini, scripts, send, %A_Space%
f::
Sendinput, {raw} %sAudit%
return
|
I assume the problem is with iniread not being able to send the carriage returns. If so, is there a way around this? If not, how can I do it? Lastly, is there a better way to store these variables outside the ahk script? Ultimately, I want these variables to be easily configured and shared amoung users. I'm not married to the ini format.
Thanks in advance. Z |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6804 Location: Pacific Northwest, US
|
Posted: Sun Aug 19, 2007 4:22 am Post subject: |
|
|
iniread can only read the one line. you should do a stringreplace on the thing you are saving (replace `n with something else, like {enter})
then when you read it back in, you can send it directly (not raw) or stringreplace your line back to `n _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
z3lig
Joined: 13 Aug 2007 Posts: 11
|
Posted: Sun Aug 19, 2007 4:42 am Post subject: |
|
|
I'm considering using xml files to store this. Seems like Titan's XMLPath script may be a good solution for what I'm trying to do. If anyone thinks this is not the right path to go down, please advise.
Z |
|
| 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
|