Jump to content
Sign in to follow this  

Parse output buffer

Recommended Posts

I am trying to parse the user's output, and replace it with something else. Example in an AIM window:

-User types:


-User presses enter

-Autoit replaces Hello with:

I just said: Hello!

-Autoit erases Hello! from the chatbox, sends new formatted text (I just said: Hello!), and presses enter for the user

First of all, is it possible to block keys? Such as it would block AIM from getting the "enter key", except if it send the enter command itself?

Second, how would you make a function to parse all key calls? Then only way I can think of is registering every key seperateley (A-Z,0-9), which would be a hassle.

Third, is there a "null" terminator, so if you set buffer[0] as null, the rest of buffer would be cleared also?

Example code:

Global buffer[1024]
Global storecount = 0
HotKeySet(ALL, parseInput)

Func parseInput(key)
    Global buffer[1024]
    If key <> ENTER Then
         storecount = storecount + 1
         buffer[storecount] = key
         storecount = 0
         Send("I just said: " & buffer)

Share this post

Link to post
Share on other sites

I looked a little closer at the HotSetKey command and saw that it always blocks most keys, so nevermind about question number one.

Edited by Dest

Share this post

Link to post
Share on other sites

2nd question you won't find a straight up answer to if at all, it stems on the "keylogger" events.

3rd question is maybe take a look at ReDim if I'm understanding what your question is.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...