| View previous topic :: View next topic |
| Author |
Message |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Tue Feb 22, 2005 12:39 pm Post subject: Using /ErrorStdOut with TextPad |
|
|
Is #ErrorStdOut or /ErrorStdOut really working? I could not get any output on the cmd line, thus the integration with TextPad (or any other editor) fails.
Here's what i did on the command prompt:
| Code: | | C:\My Documents\AutoHotkey>"d:\Program Files\AutoHotkey\AutoHotkey.exe" /ErrorStdOut MyStuff.ahk |
I also tried #ErrorStdOut in MyStuff.ahk, no output at all.
If I omit the /ErrorStdOut option, i get the normal message box with an error (simple syntax error for testing).
Please help! (I have read the #ErrorStdOut page in the help)
AHK 1, 0, 26, 01 _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1717
|
Posted: Tue Feb 22, 2005 1:07 pm Post subject: |
|
|
i tried once... but couldn't get it to work. anyways, i use the following to launch any file from TextPad (using ErrorStdOut will limit it to just ahk, or i'll have to keep separate hotkey for ahk scripts)
cmd: c:\windows\system32\cmd.exe
params: /c start $DosFile
folder: $FileDir
x run minimized
x close when done _________________
 |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Tue Feb 22, 2005 1:42 pm Post subject: |
|
|
My problem is more general. I simply dont receive any output to the stdout when using the /ErrorStdOut switch, even when running the statement in my previous post from the Command Prompt.
(It has nothing to do with TextPad, the subject only indicates, that i would like to use it in TextPad, the editor of my choice). _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 206
|
Posted: Tue Feb 22, 2005 4:14 pm Post subject: |
|
|
I've never gotten it to work either . |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Feb 22, 2005 7:07 pm Post subject: |
|
|
It produces output only for programs designed to catch it. This kind of output will not appear at the command prompt because the program isn't designed to support console output yet.
The only editor I've gotten it to work with is EditPlus, but I haven't tried any others. The details for EditPlus are described at #ErrorStdOut. |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Wed Feb 23, 2005 9:25 am Post subject: |
|
|
| Chris wrote: | | It produces output only for programs designed to catch it. This kind of output will not appear at the command prompt because the program isn't designed to support console output yet. | Oh, no wonder it doesn't work in TexpTad. Can you tell us more details? What kind of output is that? Not stderr, or stdout, so what else can it be?
| Chris wrote: | | The only editor I've gotten it to work with is EditPlus, but I haven't tried any others. The details for EditPlus are described at #ErrorStdOut. | Maybe I will check out EditPlus. If only for the reason to maybe find out how it catches your output  _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Wed Feb 23, 2005 11:46 am Post subject: |
|
|
| #ErrorStdOut help wrote: | | This allows fancy editors such as Textpad, Scite, Crimson, and EditPlus to jump to the offending line when a syntax error occurs. | Hmmmmm  _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Wed Feb 23, 2005 1:09 pm Post subject: |
|
|
Ok. I tried it with EditPlus exactly as you described above.
All I got is this line:
| Code: | | Output completed (0 sec consumed) - Normal Termination |
Running it by Ctrl-1 from TextPad (so there is no /ErrorStdOut switch) i got the following in the message box:
| Code: | Error at line 71.
Line Text: ssss
Error: This line does not contain a recognized action.
The program will exit. | Something must be wrong with AHK i presume. _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Feb 23, 2005 2:22 pm Post subject: |
|
|
| SanskritFritz wrote: | | Can you tell us more details? What kind of output is that? Not stderr, or stdout, so what else can it be? | Actually it is stdout. The reason other programs (such as command prompt) can't catch it is probably either: 1) they do not attach themselves to the stdout of a launched program; and/or 2) the program is not compiled as a console program (doing so might create an empty console window every time AutoHotkey is launched, but I don't know enough about it).
I tried it again on EditPlus 2.11 (2096) and it still works. Be sure you have the "Capture output" option checked.
Until someone reports that it works on other editors, I will remove mention of all of them from the help file.
Thanks.
P.S. Support for writing text to the "real" stdout is planned for a future version, assuming some way can be found to do it that doesn't significantly increase the memory used by every script. |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Wed Feb 23, 2005 2:34 pm Post subject: |
|
|
I'm desperate . I even checked the source code of AHK, i found:
| Code: | // JdeB said:
// Just tested it in Textpad, Crimson and Scite. they all recognise the output and jump
// to the Line containing the error when you double click the error line in the output
// window (like it works in C++) ...
printf("%s (%d): ==> %s\n", sSourceFile[mFileNumber], mLineNumber, aErrorText); | For me it doesnt work from EditPad. What can be the reason?? You are not using XP i presume, that is the only explanation i can come up with at the moment. _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Feb 23, 2005 2:38 pm Post subject: |
|
|
| SanskritFritz wrote: | | For me it doesnt work from EditPad. | Is EditPad the same as EditPlus?
| Quote: | | What can be the reason?? You are not using XP i presume, that is the only explanation i can come up with at the moment. | I am using XP, so I can't think of an explanation. From e-mails I've received, I'm pretty sure others are using this method in EditPlus and other editors.
Note: It definitely won't work at the command prompt for the reasons I mentioned earlier. |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Wed Feb 23, 2005 2:44 pm Post subject: |
|
|
| Chris wrote: | | Is EditPad the same as EditPlus? | Sorry, typo, I meant EditPlus. _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Feb 23, 2005 2:49 pm Post subject: |
|
|
Shot in the dark: could it have something to do with user permissions? For example, if the current user is not an administrator, perhaps a program (EditPlus) can't attach itself to the output of another program (AutoHotkey).
Hard to imagine, but I'm grasping at straws. |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Wed Feb 23, 2005 2:50 pm Post subject: |
|
|
Nope, I'm admin.
 _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Wed Feb 23, 2005 3:04 pm Post subject: |
|
|
Hmm, on the command prompt when I redirect the output into a file, the file contains the error! So maybe writing a batch file i might type out the temp file onto the standard stdout. _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
|