Sign in to follow this  
Followers 0
kzurn

Force a carriage return after <n> keystrokes

3 posts in this topic

I have been pondering how to accomplish a forced carriage return in a terminal app (teraterm) that would countdown from 32 with every keystroke.  I am kind of new at scripting and could use any help that you all could give. 

Share this post


Link to post
Share on other sites



Provide some code you've already tried and provide a bit more detail and context to your question. No ambiguity please.

Share this post


Link to post
Share on other sites

Might fall under "capturing all keys" rule this, so you might be out of luck.

Here is some code to recognize when a key is pressed by Melba23.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $cKey_Pressed

_PressAnyKeyToContinue()

Func _PressAnyKeyToContinue()
    $hGui = GUICreate("Press any key...", 0, 0, -100, -10)
    $cKey_Pressed = GUICtrlCreateDummy()
    GUISetState()
    GUIRegisterMsg($WM_KEYUP, "_KeyPressed")
    ;$iBegin = TimerInit()
    Do
    Until GUIGetMsg() = $cKey_Pressed
EndFunc   ;==>_PressAnyKeyToContinue

Func _KeyPressed()
    GUICtrlSendToDummy($cKey_Pressed)
EndFunc   ;==>_KeyPressed

But I don't think it will help your case as the window has to be active.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0