AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using /ErrorStdOut with TextPad
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
SanskritFritz



Joined: 17 Feb 2005
Posts: 283
Location: Hungary, Budapest

PostPosted: Thu Feb 24, 2005 3:04 pm    Post subject: Reply with quote

Can somebody confirm my problem?
_________________
Is there another word for synonym?
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Feb 24, 2005 3:23 pm    Post subject: Reply with quote

Mats wrote:
http://pub.inspiration3.com/ahk_console_patcher.zip
Thanks for providing that. There might be another thing that is similar, but much smaller (14 KB for MkConsole), at http://www.mvps.org/st-software/VB_Code_LJ.htm . If anyone gets a chance to check it out, please let me know if it falls short in any way because I was thinking of linking to it in the documentation.

SanskritFritz wrote:
if there is no error in the script, AHK does not produce any output whatsoever on the stdout, thus the editor freezes. If there is an error, TextPad captures the output nicely. So, I think we need a bug fix in AHK itself?
I don't think it would be proper for AutoHotkey to produce output when there isn't an error. However, I've made a couple of changes to PipeSplit.exe that might fix it. Please give it a try if you get a chance.

Last edited by Chris on Wed Sep 13, 2006 2:05 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Feb 24, 2005 3:30 pm    Post subject: Reply with quote

jonny wrote:
If the beta testing here goes well, perhaps Chris could implement this with a switch?
It's a good idea, but it would be best to have some source code for a console patcher. Otherwise, the console patcher would have to be distributed with the program, which in this case would add ~600 KB to the size of the installer.
Back to top
View user's profile Send private message Send e-mail
Mats
Guest





PostPosted: Thu Feb 24, 2005 4:29 pm    Post subject: Reply with quote

Chris wrote:
It's a good idea, but it would be best to have some source code for a console patcher.

Not a problem, but it's a small perl script. In its compiled state, the full perl interpreter is bundled with it and makes it big... Sad
The script itself is just a few lines of code, but no one has perl preinstalled on windows.
Back to top
SanskritFritz



Joined: 17 Feb 2005
Posts: 283
Location: Hungary, Budapest

PostPosted: Thu Feb 24, 2005 6:05 pm    Post subject: Reply with quote

Chris wrote:
However, I've made a couple of changes to PipeSplit.exe that might fix it. Please give it a try if you get a chance.
I tried, and as i expected, nothing changed. If the problem is with AHK, i dont expect the next program in the pipe fix the problem. Rolling Eyes
_________________
Is there another word for synonym?
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Feb 24, 2005 10:44 pm    Post subject: Reply with quote

A couple of points:

I couldn't reproduce the hanging problem you originally described: Even when pipesplit receives no input (no errors in script), it still terminated normally.

You might want to clear your browser cache to ensure you downloaded the latest version of pipesplit. I was pretty sure the changes I made would prevent it from hanging.

I'd rather not change AutoHotkey to send output to stdout when no errors occur. However, if others can reproduce your problem with editors being unable to receive text, I'd be more inclined to do so.

Is anyone here using /ErrorStdOut successfully with editors other than EditPlus? Or has anyone tried it and been unsuccessful even though the editor supports it? Thanks.
Back to top
View user's profile Send private message Send e-mail
SanskritFritz



Joined: 17 Feb 2005
Posts: 283
Location: Hungary, Budapest

PostPosted: Fri Feb 25, 2005 11:05 am    Post subject: Reply with quote

Chris wrote:
Is anyone here using /ErrorStdOut successfully with editors other than EditPlus? Or has anyone tried it and been unsuccessful even though the editor supports it? Thanks.
Rajat (here) and savage (here) both said in this thread, that they could not get to work it either. But i'm sure they also could implement the ahk_console_patcher.exe patch, and it would work for them just as it works for me now. Question is, does it also freeze with their system, when no output is given by AHK. There is a difference between Your system and mine, i wish i knew what it is (it works with the unpatched AHK, and does not have problems with no output).
_________________
Is there another word for synonym?
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Feb 25, 2005 1:08 pm    Post subject: Reply with quote

I managed to set up TextPad to capture ErrorStdOut too. If anyone uses TextPad, please try the following configuration and post your findings:

From the menu bar, select Configure > Preferences.
Expand the Tools entry.
Press the Add button and select "Program".
Copy and paste (adjust to your path): C:\Windows\System32\cmd.exe then press OK.
Triple-click the newly added item (cmd.exe) in the ListBox and rename it to your choice (e.g. Launch Script).
Press Apply.
Select the new item in the tree at the left and enter the following information:
Command (should already be filled in): cmd.exe (or the full path to it)
Parameters (adjust to your path, if necessary): /c ""C:\Program Files\AutoHotkey\AutoHotkey.exe" /ErrorStdOut "$File""
Initial folder: $FileDir
Check the following boxes: 1) Run minimized; 2) Capture output.
Press OK. The newly added item should now exist in the Tools menu.

Now when you launch a script, a "command results" window should appear to show the first syntax error (if any).

Also, if anyone else has tried unsuccessfully to get /ErrorStdOut working with EditPlus, please let me know.
Back to top
View user's profile Send private message Send e-mail
SanskritFritz



Joined: 17 Feb 2005
Posts: 283
Location: Hungary, Budapest

PostPosted: Mon Feb 28, 2005 10:54 am    Post subject: Reply with quote

Thanks, that is better than patching the ahk. Now only the problem with the freezing output remains. Twisted Evil
_________________
Is there another word for synonym?
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Mon Feb 28, 2005 4:10 pm    Post subject: Reply with quote

Ok, I've read this thread a few times, but it never really clicked.

Chris wrote:
Is anyone here using /ErrorStdOut successfully with editors other than EditPlus? Or has anyone tried it and been unsuccessful even though the editor supports it? Thanks.


I am currently using it with PSPad without any trouble at all. No "hanging problems" either. The only inconvenience is that you have to set AutoHotkey.exe as the "compiler" and Ahk2Exe.exe as an "application" to get the output. Also, it doesn't appear to be able to jump to offending lines, but the testing I conducted wasn't exactly extensive.

So that makes three now; EditPlus, TextPad, and PSPad.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Feb 28, 2005 6:29 pm    Post subject: Reply with quote

SanskritFritz wrote:
Thanks, that is better than patching the ahk. Now only the problem with the freezing output remains. Twisted Evil
If you haven't already, try not using pipesplit.

If anyone else can produce this freezing/hanging problem -- or has trouble getting the TextPad or EditPlus /ErrorStdOut methods working without pipesplit -- please let me know.

Thanks.
Back to top
View user's profile Send private message Send e-mail
SanskritFritz



Joined: 17 Feb 2005
Posts: 283
Location: Hungary, Budapest

PostPosted: Tue Mar 01, 2005 10:52 am    Post subject: Reply with quote

If AHK produces output, TextPad finds the corresponding line without problem. Now I use it like this: first i run AHK from TextPad without /ErrorStdOut. If there is errors, I launch AHK with /ErrorStdOut, using the technique you described above. This way I have the convenience of both methods.
_________________
Is there another word for synonym?
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Mar 01, 2005 12:42 pm    Post subject: Reply with quote

So in summary, if you use /ErrorStdOut and there is no syntax error, TextPad waits forever (if this is not the case, please post here).

I can't reproduce this problem and while there's a chance it affects only your PC, it seems best not to "fix" AutoHotkey by having it produce output unconditionally, which seems inappropriate and might cause side effects for some users.

Once again, if anyone else cannot get ErrorStdOut working with TextPad/EditPlus using the exact method described here, please let me know.
Back to top
View user's profile Send private message Send e-mail
SanskritFritz



Joined: 17 Feb 2005
Posts: 283
Location: Hungary, Budapest

PostPosted: Tue Mar 01, 2005 1:20 pm    Post subject: Reply with quote

Chris wrote:
So in summary, if you use /ErrorStdOut and there is no syntax error, TextPad waits forever.
Exactly. EditPlus behaves the same here.
Chris wrote:
I can't reproduce this problem and while there's a chance it affects only your PC, it seems best not to "fix" AutoHotkey by having it produce output unconditionally, which seems inappropriate and might cause side effects for some users.
I agree. If someone knows what system setting is required, let me know please.
_________________
Is there another word for synonym?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group