Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Make the script click buttons like: "Home" and "End"
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 06-21-2009, 05:05 PM
ToastedApple's Avatar
Member
 
Join Date: Feb 2009
Posts: 86
Default Make the script click buttons like: "Home" and "End"

Hi. I'm using scar for other things than runescape and right now I really have the need to scroll down a page systematically. Is there a way for me to make my script click the: "PgDn" and "End" buttons on my keyboard?

Thanks for your help
__________________
ToastedApple - Fishing your fishies for FREE http://sythe.org/showthread.php?t=562094

Vouches: http://sythe.org/showthread.php?t=562094
Reply With Quote
  #2  
Old 09-03-2009, 07:54 PM
EduardSale's Avatar
Newcomer
 
Join Date: Sep 2009
Posts: 15
Default Re: Make the script click buttons like: "Home" and "End"

well, the VIRTUAL KEY CODE for this button is :
Code:
VK_NEXT (0x22)
    PAGE DOWN key
so, what we're gonna do is try to implent the virtual key into scar.
well, the msdn uses windows api, and HEX, so what i did was used the delphi virtual key codes:
http://delphi.about.com/od/objectpascalide/l/blvkc.htm

and wel, 0x22 = 22 lol.
so the scar codes look like this :
and scar read's the VK strings so :

Code:
program downpage;
var
i:integer;
const
howlong = 10000; // time in mili seconds so 1 second is 1000;
begin
activateclient;
i := 0;
repeat
if (i < howlong)  then
begin
KeyDown(VK_NEXT);    // VK_NEXT is the downpage button.
wait(1000);
i := i + 1;
end;
until(i = howlong)
end.
would work

~Eduard

wanna learn more? check out my thread
Reply With Quote
  #3  
Old 09-06-2009, 11:13 PM
Forum Addict
 
Join Date: Jul 2007
Posts: 493
Default Re: Make the script click buttons like: "Home" and "End"

You could also do this, and use a procedure with a parameter that allows it to click both, depending on what you need at that particular time. I also added standards to mine, so it's a bit easier to read. Feel free to pm me or post if you need any more help!

Code:
program New;

const
  Pagedown = true;
//True causes the script to fire the procedure PgDnOrEnd(true),
//which in turn fires the key click page down. False does the
//same thing, but for the key click end.

Procedure PgDnOrEnd(PgDn : Boolean);
Begin
  If PgDn = True then
  begin
    KeyDown(VK_Next);
    Wait(50);
    KeyUp(VK_Next);
  end else
  begin
    KeyDown(VK_End);
    Wait(50);
    KeyUp(VK_End);
  end;
end;

begin
  If PageDown then
    PgDnOrEnd(true)
  else
    PgDnOrEnd(false);
end.
~Sandstorm
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 06:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1