Jump to content

Send a long sentence?


Recommended Posts

Hi,

I want to let my AutoIT script send the following sentence:

/script if ( GetMinimapZoneText() == "Alterac Valley" ) then SetBinding("NUMPAD2", "MOVEFORWARD"); end

But this doesn't works:

Send("/script if ( GetMinimapZoneText() == "Alterac Valley" ) then SetBinding("NUMPAD2", "MOVEFORWARD"); end")

I looked into the helpfile but couldnt figure it out.. anyone can help me out?

Link to comment
Share on other sites

Hi,

I want to let my AutoIT script send the following sentence:

/script if ( GetMinimapZoneText() == "Alterac Valley" ) then SetBinding("NUMPAD2", "MOVEFORWARD"); end

But this doesn't works:

Send("/script if ( GetMinimapZoneText() == "Alterac Valley" ) then SetBinding("NUMPAD2", "MOVEFORWARD"); end")

I looked into the helpfile but couldnt figure it out.. anyone can help me out?

Look at the syntax colouring, green is supposed to be string.
Link to comment
Share on other sites

I found a problem, when I execute the script it types Ä instead of A:

/script if ( GetMinimapZoneText() == "Alterac Valley" ) then SetBinding("NUMPAD1", "TURNLEFT"); SetBinding("NUMPAD2", "MOVEFORWARD"); SetBinding("NUMPAD3", "TURNRIGHT"); else SetBinding("NUMPAD1"); SetBinding("NUMPAD2"); SetBinding("NUMPAD3"); end

Becomes:

/script if ( GetMinimapZoneText() == "Älterac Valley" ) then SetBinding("NUMPAD1", "TURNLEFT"); SetBinding("NUMPAD2", "MOVEFORWARD"); SetBinding("NUMPAD3", "TURNRIGHT"); else SetBinding("NUMPAD1"); SetBinding("NUMPAD2"); SetBinding("NUMPAD3"); end

How can I solve this ?

Link to comment
Share on other sites

Send ( "keys" [, flag] )

flag

[optional] Changes how "keys" is processed:

flag = 0 (default), Text contains special characters like + and ! to indicate SHIFT and ALT key-presses.

flag = 1, keys are sent raw.

Send('/script if ( GetMinimapZoneText() == "Alterac Valley" ) then SetBinding("NUMPAD2", "MOVEFORWARD"); end', 1)

'' and "" can be used interchangeably

Edited by gamepin126
Link to comment
Share on other sites

Send('/script if ( GetMinimapZoneText() == "Alterac Valley" ) then SetBinding("NUMPAD2", "MOVEFORWARD"); end', 1)

'' and "" can be used interchangeably

Thanks, but after I tried this it still inserted a Ä instead of A :) any other idea?
Link to comment
Share on other sites

Suppose you are sending to a console type of screen with a shirt-state issue. You could try using ControlSend() or search the forum for _ControlSendPlus() UDF (user defined function) made by Pekster.

Link to comment
Share on other sites

I figured that it has to do with "A

It first fires " then A

and if you do that on the keyboard you get Ä

but if you do the same with N you get "N

So it should first do " then SPACE then A which results in "A

is that possible with just 1 Send() command?

Link to comment
Share on other sites

If the syntax is not case sensitive then try a small "a". Your could also try using Chr(34) that may help solve the issue.

Send('/script if ( GetMinimapZoneText() == ' & Chr(34) & 'Alterac Valley" ) then SetBinding("NUMPAD2", "MOVEFORWARD"); end')
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...