Jump to content
Sign in to follow this  

Input command help

Recommended Posts


#include <GUIConstantsEx.au3>
$Form1 = GUICreate("Hello", 300, 30)
$input1 = GUICtrlCreateInput("", 0, 0, 300, 30)
$Waka = GUICtrlRead($Input1)

While 1

If Stringinstr($waka, "message Hello", 2) and _Ispressed("0D") then
If StringinStr($waka, "message Howdy", 2) and _Ispressed("0D") then
If StringinStr($waka, "Open Form1, 2) and _Ispressed("0D") then

Func Hello()
Msgbox(0, "Hey", "Hello)

Func Howdy()
Msgbox(0, "Hey", "Howdy")

Func GUI()
GUICreate("GUI", 300, 300)
I was wondering about any other methods of doing this, rather than making an If statement for every single message command.

Im going for something command-line-ish.

Share this post

Link to post
Share on other sites

Start by testing the _IsPressed(), then you don't have to bother with the other compares until that is true.

The rest will depend on the particulars. Does $waka contain multiple matching messages? Is there a standard format for it? Are you parsing something like command line arguments?


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.