Yanas
New Member
Posts: 5
|
Post by Yanas on May 26, 2005 13:00:48 GMT -5
Hello, First I want to thank you for all those great informations I could retrieve from this forum. Every coder here makes really a good job So, what about me... I've been reading almost all your tuts and I found them really interesting. I think I've understood the main system of FFACT + AutoTerror and so on. Now, I've tried to write my own provoke bot, without editing one I found on the internet, in order to gain programming experience. Here's what I've got : WinWaitActive("FFXiApp");
Sleep(3000);
$Target = "Carrion";
$WindowText = WinGetText("FFACT Debug Window",""); $result = StringInStr($WindowText, $Target)
If($result <> "0") Then; Send("^1"); EndIf
How do I want it to work ? - Retrieve all the informations of the FFACT's Debug Window. - Verify that the mob I want to voke is already a part of the string I retrieved. - Voke it! (no loop atm, I just want to test the main functions) How does it work? (- Really bad ) - I know the $result is <> "0" because I tried with a MsgBox in the "if" statement. - the problem is that the "send" doen't work. It seems to send a "spacebar" instead of "Control+1"... (In ffxi, it simply activates the chat bar, nothing to do with my voke macro) I've noticed that if I set a msgbox in the if statement, then once I pressed "ok", it vokes well... withtout that MsgBox, I'm lost with that "spacebar" :/ (it doesn't neither work with a sleep(1000) after the condition) Thank you for your help PS : I'm french, so please excuse me for my bad english and/or for all my mistakes... I tried to do my best
|
|
|
Post by TinyTerror on May 26, 2005 14:48:45 GMT -5
Yeah, that should work. It might be a bit slow if called often, but in theory it should function.
|
|
Yanas
New Member
Posts: 5
|
Post by Yanas on May 26, 2005 15:23:53 GMT -5
Yeah it should but it doesn't ^^
The Send("^1"); statement makes the game act like if I had pressed the spacebar key! (it opens the chat bar).
Do you know how to fix this?
By the way, why do you say it'd be a bit slow? How should I do this ?
|
|
Yanas
New Member
Posts: 5
|
Post by Yanas on May 26, 2005 15:44:43 GMT -5
Ok nice, I've found the answer by myself. I'm working on an Azerty keyboard, which means I've to call ^& instead of ^1. Sleep(3000);
$Target = "Carrion"; $Fight = 0;
While $Fight = 0
$WindowText = WinGetText("FFACT Debug Window",""); $result = StringInStr($WindowText, $Target)
If($result <> "0") Then; Send("^&"); $Fight = 1; EndIf
WEnd
Here's where I am atm. To be continued... Thanks,
|
|
FitJi
New Member
Posts: 6
|
Post by FitJi on May 27, 2005 3:32:32 GMT -5
Bon courage xD
|
|
Yanas
New Member
Posts: 5
|
Post by Yanas on May 27, 2005 11:18:17 GMT -5
Merci ^^ Well I'm at the same point than yesterday... but I've still the same problem Send("^1"); does NOT work (Send(^&)) doesn't neither... how come I can't access my macro by that way? I'm doing Send("/ja Provoke <t>") Send("{ENTER}") Sleep (1500) Send("/attack <t>") Send("{ENTER}")
instead of that Send(^1) but it's kinda longer... any idee is welcome Ty.
|
|
Yanas
New Member
Posts: 5
|
Post by Yanas on May 27, 2005 14:10:51 GMT -5
Hmm... I really found my mistake. I forgot to write this
AutoItSetOption("SendKeyDownDelay",30);
Now it works great (3/4 claims Spook)
--
j'avais déjà essayé de changer mon clavier en qwerty, en fait j'avais mis ^& comme argument pour send au lieu de ^1, mais ça marchait pas. Avec cette ligne, tout marche nickel
|
|