tom13 Posted June 9, 2007 Posted June 9, 2007 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?
MHz Posted June 9, 2007 Posted June 9, 2007 Send('/script if ( GetMinimapZoneText() == "Alterac Valley" ) then SetBinding("NUMPAD2", "MOVEFORWARD"); end') Notice the single quotes
pixels75 Posted June 9, 2007 Posted June 9, 2007 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.
tom13 Posted June 9, 2007 Author Posted June 9, 2007 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 ?
tom13 Posted June 9, 2007 Author Posted June 9, 2007 Try using the 2nd parameter of sending raw characters.Sorry but I'm not that good in AutoIT, what do you mean with second parameter?
MHz Posted June 9, 2007 Posted June 9, 2007 Send('text', 1) ; The 1 is the 2nd parameter of the function call.
gamepin126 Posted June 9, 2007 Posted June 9, 2007 (edited) 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 June 9, 2007 by gamepin126
tom13 Posted June 9, 2007 Author Posted June 9, 2007 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?
MHz Posted June 9, 2007 Posted June 9, 2007 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.
tom13 Posted June 9, 2007 Author Posted June 9, 2007 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?
MHz Posted June 9, 2007 Posted June 9, 2007 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')
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now