SRL Archive - Help and Support

Scar help - opening web pages


puj

2006-03-20 12:14:56

I want to make a script that opens firefox, goes to runescape.com, and loads up the game and logs in.

i have no idea where to start.

i would like to ask,

1) Can you get scar to open up programs without clicking on the icon? eg using RUN.
2) How would i get it to visit a website once the browser is open?

I will tackle the rest of the hurdles when i get to them :)

also, has anyone made one of these already?

inferno

2006-03-20 12:38:43

OpenWebPage(URL: string);

puj

2006-03-20 14:21:38

From: inferno
OpenWebPage(URL: string);


I gave it a try:


program New;

procedure openwebpage;
begin
OpenWebPage('http://www.google.com')
end;

begin
openwebpage
end.

when i tried that, this came up:

Failed when compiling
Line 7: [Error] (7:1): Invalid number of parameters in script C:\Program Files\SCAR 2.03\Scripts\open google.scar

I dont know whats wrong, can you help me?

timmyboy

2006-03-20 16:10:26

You have the procedure name that you wrote the same as the other procedure. You have to change it.
Like so:


program OpenGoogle;

Procedure OpenPage;
begin
OpenWebPage('http://www.google.com');
end;

begin
openpage;
end.

Or, you can just write:

program OpenGoogle;

begin
OpenWebPage('http://www.google.com');
end.

Hope that helped

puj

2006-03-20 18:52:56

Thanks, now it works :)

i have one more question, how can i get scar to move the page up and down without using the bar at the side?

can it use the page up or down button or even a scroll wheel function?

Any help would be apprecieated

Krazy_Meerkat

2006-03-20 20:47:27

Keydown(VK_DOWN);
wait(500);
KeyUp(VK_DOWN);

Bam Bam

2006-03-20 22:38:23

If you are only opening the webpage you dont even ahve to create a new procedur just through it in the main loop…

timmyboy

2006-03-21 07:35:45

I know, I wrote it for him that way too;)

puj

2006-03-21 13:34:09

From: Krazy_Meerkat
Keydown(VK_DOWN);
wait(500);
KeyUp(VK_DOWN);


what is the code for the page down button like the down arrow one used above?

moparisthebest

2006-03-21 14:24:31

since ive made a script like this already, ill give you a hint:

use the tab button and enter button instead of scrolling and clicking where you can ;) :D

Bam Bam

2006-03-21 16:57:18

From: timmyboy
I know, I wrote it for him that way too;)

oh im sorry…I don't think to clearly at Mid night

puj

2006-03-26 10:39:06

From: moparisthebest
since ive made a script like this already, ill give you a hint:

use the tab button and enter button instead of scrolling and clicking where you can ;) :D


Sorry, how do i use the tab button?

I have tried a few things but i cant get it to hit "tab". Thanks