Baked0420
2009-10-22 18:29:29
Has anyone noticed when you type with smart, everything other than numbers and letters are messed up? what causes this? updates from the game, changing the way chat is shown? Smart, I think, doesn't type /'s, types :'s and "'s incorrectly, and many other things, just a few I remember seeing wrong. How do we fix this, does SRL fix it, benland?
As in Autotalkers ?… need to add the "shift" key, which is…..
~RAM
Baked0420
2009-10-22 20:03:31
RAM, it works on a non-smart client (firefox and RuneScape Client) why would I need to add the shift key only for smart but not for firefox/RuneScape Client?
EDIT: yea, autotalkers, and just any script in general that talks, and it gives weird alt key codes, so I highly doubt it has anything to do with a shift key, but thanks for the reply, if you are right then sorry for doubting you.
sorry for double post, but has anyone noticed this? anyone know what's wrong? Am I right and it is because of updates to the game, or is it something else?
EDIT: sorry, just wanted someone to see this yohojo, only one person replied so far. -_-
Seems like noone has any answers confirming anything.
From: Baked0420
RAM, it works on a non-smart client (firefox and RuneScape Client) why would I need to add the shift key only for smart but not for firefox/RuneScape Client?
EDIT: yea, autotalkers, and just any script in general that talks, and it gives weird alt key codes, so I highly doubt it has anything to do with a shift key, but thanks for the reply, if you are right then sorry for doubting you.
sorry for double post, but has anyone noticed this? anyone know what's wrong? Am I right and it is because of updates to the game, or is it something else?
EDIT: sorry, just wanted someone to see this yohojo, only one person replied so far. -_-
Seems like noone has any answers confirming anything.
Yea I noticed it when I ran Harry's fight cave runner. Instead of typing "/ message to clan" it typed some alt code then the message.
Baked0420
2009-10-26 14:56:00
yea, it's all messed up, I don't know what causes this, since it doesn't happen when you target clients, only happens with SMART :confused:
ruler
2009-10-27 04:51:42
its because smart is a java bot and its input implementation is not correct for all keys.
From: ruler
its because smart is a java bot and its input implementation is not correct for all keys.
Hi Ruler, glad to see you're still active (Sincere, not Sarcastic ;) ….so, you mind sharing how Ibot performs in this situation and your work around for this ?
~RAM
Bobarkinator
2009-10-27 11:53:13
From: RAM
Hi Ruler, glad to see you're still active (Sincere, not Sarcastic ;) ….so, you mind sharing how Ibot performs in this situation and your work around for this ?
~RAM
They don't have the problem. It's because key codes in Delphi (that is to say, SCAR) are different from key codes in Java.
From: Bobarkinator
They don't have the problem. It's because key codes in Delphi (that is to say, SCAR) are different from key codes in Java.
I was thinking you had to add "+ Chr(13)" (*shift key not enter) to the text to get uppercase/signs…
Oh yes, I am remembering something like this now….. for instance…
procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;
procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;
I thought there were other procedures like this made to make the corresponding keys work ?
~RAM
Bobarkinator
2009-10-27 21:40:42
There are, I really don't know why their versions aren't working.
I have been experimenting with my own java bot for a while now. Here is the code I used for this problem…
[PHP]
package jbot.core;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.lang.*;
public class Keyboard {
public static void TypeSend(String text, Boolean pressEnter) {
int key;
Boolean shift = true;
Boolean shiftDown = false;
char[] chars = text.toCharArray();
for (char c : chars) {
shift = true;
switch © {
case '~': key = (int)'`'; break;
case '!': key = (int)'1'; break;
case '@': key = (int)'2'; break;
case '#': key = (int)'3'; break;
case '$': key = (int)'4'; break;
case '%': key = (int)'5'; break;
case '^': key = (int)'6'; break;
case '&': key = (int)'7'; break;
case '*': key = (int)'8'; break;
case '(': key = (int)'9'; break;
case ')': key = (int)'0'; break;
case ':': key = (int)';'; break;
case '_': key = (int)'-'; break;
case '+': key = (int)'='; break;
case '|': key = (int)'\\'; break;
case '"': key = (int)'\''; break;
case '?': key = (int)'/'; break;
case '{': key = (int)'['; break;
case '}': key = (int)']'; break;
case '<': key = (int)','; break;
case '>': key = (int)'.'; break;
default:
shift = Character.isUpperCase©;
key = (int)Character.toUpperCase©;
break;
}
if(shift) {
shiftDown = true;
jbot.Main.robot.keyPress(KeyEvent.VK_SHIFT);
Timing.Wait(Math.RandomRange(40,100));
}
if (!shift && shiftDown) {
shiftDown = false;
jbot.Main.robot.keyRelease(KeyEvent.VK_SHIFT);
Timing.Wait(Math.RandomRange(40,100));
}
jbot.Main.robot.keyPress(key);
Timing.Wait(Math.RandomRange(40,100));
jbot.Main.robot.keyRelease(key);
Timing.Wait(Math.RandomRange(40,100));
}
if(shiftDown) {
jbot.Main.robot.keyRelease(KeyEvent.VK_SHIFT);
Timing.Wait(Math.RandomRange(40,100));
}
if(pressEnter) {
jbot.Main.robot.keyPress(KeyEvent.VK_ENTER);
Timing.Wait(Math.RandomRange(40,100));
jbot.Main.robot.keyRelease(KeyEvent.VK_ENTER);
Timing.Wait(Math.RandomRange(40,100));
}
}
}
[/PHP]
If the SMART team is interested in using my code, just let me know. I would love to be a part of the SMART dev team. :D
ruler
2009-11-03 09:37:55
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/KeyEvent.htmlHas alot of the constants for key codes.
Key chars the same chars thou.
You really need benland to fix it since the code is all his side.