SRL Archive - Help and Support

Typing '@' in Appa


J J

2012-11-10 17:13:11

Hi

I'm looking to type @ in Appa but when you get the keycode from a string it will type 2 instead of @. Then I made it press shift and 2 but it will still type 2.

How can I let it type '@'?

procedure appa_SendKeys(s: string);
var
L, i: Integer;
Shift: Boolean;

begin
L := Length(s);
for i:=1 to L do
begin
Shift := False;
if(s[i] = '@') then
Shift := True;

writeln(s[i]);
writeln(Shift);

if(Shift) then
appa_KeyDown(VK_SHIFT);
appa_KeyDown(GetKeyCode(s[i]));
Wait(100);
appa_KeyUp(GetKeyCode(s[i]));
if(Shift) then
appa_KeyUp(VK_SHIFT);
Wait(100);
end;
end;

mormonman

2012-11-10 17:30:16

Isn't there a constant for @?

nielsie95

2012-11-10 18:17:58

Try appa_SendKey(Ord('@')).

J J

2012-11-11 04:12:00

From: mormonman
Isn't there a constant for @?

Not sure if there is. I don't know it :P

From: nielsie95
Try appa_SendKey(Ord('@')).

Does type a '@' but also types a '2' behind it for some reason.
Ord presses shift or something?

Flight

2012-11-11 04:22:17

From: J J
Not sure if there is. I don't know it :P


Does type a '@' but also types a '2' behind it for some reason.
Ord presses shift or something?


I believe "Ord" returns the keycode for a single string character.

CynicRus

2012-11-11 04:29:25

From: J J
Not sure if there is. I don't know it :P


Does type a '@' but also types a '2' behind it for some reason.
Ord presses shift or something?


ASCII key kode for @ its alt + 2 = #64 in FreePascal.


procedure appa_SendKeys(s: string);
var
L, i: Integer;
Shift: Boolean;

begin
L := Length(s);
for i:=1 to L do
begin
Shift := False;
if(s[i] = #64) then
Shift := True;

writeln(s[i]);
writeln(Shift);

if(Shift) then
appa_KeyDown(VK_SHIFT);
appa_KeyDown(GetKeyCode(s[i]));
Wait(100);
appa_KeyUp(GetKeyCode(s[i]));
if(Shift) then
appa_KeyUp(VK_SHIFT);
Wait(100);
end;
end;


begin
appa_SendKeys('la@la');
end.

output:

Compiled successfully in 0 ms.
l
False
a
False
@
True
l
False
a
False
Successfully executed.

nielsie95

2012-11-11 11:05:07

From: J J
Not sure if there is. I don't know it :P


Does type a '@' but also types a '2' behind it for some reason.
Ord presses shift or something?


Ord gets the ordinal (numeric) representation. Which website are you trying this? Does it work for you with Google?

J J

2012-11-11 13:58:09

Thanks everyone I'll try it now now and edit this post soon :)

From: nielsie95
Ord gets the ordinal (numeric) representation. Which website are you trying this? Does it work for you with Google?

Was trying to enter it at https://secure.runescape.com/m=account-creation/
But I realised that it loads RuneScape once you hit play so I might aswell use it from there.

Looking a bit into an account creator, playing around with Appa. Always fun to use new things :)

Home

2012-11-11 15:31:21

From: J J
Thanks everyone I'll try it now now and edit this post soon :)


Was trying to enter it at https://secure.runescape.com/m=account-creation/
But I realised that it loads RuneScape once you hit play so I might aswell use it from there.

Looking a bit into an account creator, playing around with Appa. Always fun to use new things :)


Use appas built in functions to modify Forms. ;)

~Home

J J

2012-11-11 15:59:33

From: Home
Use appas built in functions to modify Forms. ;)

~Home

Yeah I looked through the functions, played around a bit with TAppaElementArray. I tried to click things on the actual client loaded into Appa but the clicks didn't register. I could click the adverts using the appa mouse but when I clicked on the forms it wouldn't register the clicks even though they were on. Maybe a problem with appa and java which I saw in another topic I read?

Anyways, currently playing around with SMART for the account creation, will probably use Appa to click on emails in my emailbox. Thanks for the help everyone :P

EDIT: Got the account creation working now :)
Now I'll use Appa to open the emails and register them. Looks like this

Pretty sure I can use the TAppaElementArray to check for the names of the emails then use the Box it returns. Click in a random point in the box to open email, wait to load the email. Then use Pos or something to get the link out of the array of HTML or whatever language it returns. Then navigate to that link to register. Should be managable.