Jump to content
lilkittenz

Scar not interacting with any window

Recommended Posts

I've used Scar successfully on my other computer, but I can't seem to get it to interact with any windows on this particular computer. If I don't select a client scar appears to click or move the mouse within the window but no effects of the mouse click or type send function or anything are produced. if I do select a client then scar doesn't do anything at all as if it doesn't recognize their is a client at all. The hot-keys aren't working either and Scar won't do anything if the Scar divi window is not selected. Pretty much the only thing it can do is interact with my desktop.

 

Anyone experienced this before? Any ideas on what might be causing this? This computer really isn't any different than my other one.

Link to comment
Share on other sites

Do you mean just ANY window? ..or do you mean a game window that you are scripting for? If you mean a game window, you might be facing a problem with macro protection (or incompatibility with DirectX)..

 

Look at these discussions:

 

http://forums.scar-divi.com/showthread.php?1315-Drag-at-quot-Tales-of-pirates-II-quot-HELP

http://forums.scar-divi.com/showthread.php?208-ClickMouse-does-not-convince-the-game

 

Edit: I think your problem is with any window indeed.. Now that I was reading your post again.

Which Windows OS you have (hopefully it is Windows..)?

Link to comment
Share on other sites

Well I'm trying to make a bot for a website. I believe I have tried Scar before with the Runescape game client and encountered the same problem though. I have also tried many web pages (with google chrome) I have Windows Vista on both of the computers I mentioned. Not sure why it works on one computer but not the other. I know Scar works with google chrome pages though.

Edited by lilkittenz
Link to comment
Share on other sites

Have you tried using GRML with APPA? APPA lets you open websites and have input without using you keyboard or mouse. Give it a try. If you look under Tools/APPA/APPA.scar you can see all the functions you have available.

 

Make sure to update you GMRL include before running this example because i changed some of the functions a bit.

 

Heres an example:

 

[scar]

program New;

{$DEFINE APPA}

{$I GMRL/GMRL.Scar}

 

begin

appa_Setup('http://www.google.com', 500, 500);

Writeln(appa_getColor(50, 50));

appa_MoveMouse(50, 50);

appa_free;

end.

[/sCAR]

Link to comment
Share on other sites

Have you tried using GRML with APPA? APPA lets you open websites and have input without using you keyboard or mouse. Give it a try. If you look under Tools/APPA/APPA.scar you can see all the functions you have available.

 

Make sure to update you GMRL include before running this example because i changed some of the functions a bit.

 

Heres an example:

 

[scar]

program New;

{$DEFINE APPA}

{$I GMRL/GMRL.Scar}

 

begin

appa_Setup('http://www.google.com', 500, 500);

Writeln(appa_getColor(50, 50));

appa_MoveMouse(50, 50);

appa_free;

end.

[/sCAR]

 

Just tried it out, and it works nicely :) thanks.

Link to comment
Share on other sites

APPA is usable even when minimized, all the working functions anyway. Please note that a lot of them are broke (the good ones). But the mouse, keyboard, color finding, and scrolling ones still work.

 

If you look in Tools/APPA_Status.scar it will tell you the details in GMRL.

 

EDIT: Freddy may be a long way from getting it to be like APPA, but it looks pretty good for another pre-alpha version :P

Link to comment
Share on other sites

Hmm. It seems to be capitalizing all letters in the appa_SendKeys function.

 

Weird, I do not remember it having this problem. I will have to hack it sort of to get it to work...

 

Maybe I'll try doing a TCharArray or Ansi Char

 

Edit: Can't get it to work atm.

 

appa_SendKey('a'); // will send 'a'

appa_SendKeys('aa'); // will send 'AA' its something wrong with the SendKey function or SCAR that is interfering

Edited by LordJashin
Link to comment
Share on other sites

Hmm. It seems to be capitalizing all letters in the appa_SendKeys function.

 

Okay I fixed it. Some one messed with the functions and added CharToVKey to them without even testing it thoroughly (Shadow :P).

 

So now SendKeys('LordJashin'); and appa_SendKeys('appa_LordJashin'); work

 

tbh I haven't gone through appa in a while, hopefully there isn't any more stuff that was changed from what I had it as. I think that was the only occurrence though.

Link to comment
Share on other sites

Okay I fixed it. Some one messed with the functions and added CharToVKey to them without even testing it thoroughly (Shadow :P).

 

So now SendKeys('LordJashin'); and appa_SendKeys('appa_LordJashin'); work

 

tbh I haven't gone through appa in a while, hopefully there isn't any more stuff that was changed from what I had it as. I think that was the only occurrence though.

 

Hey mr, you had the update bitmap function creating a billion clients. Huge memory leak! lol. Wouldnt even load a webpage. you were comparing the target.dc to something before it was ever created so it gave a runtime error. so i just set the target bitmap up in the setup procedure along with the client.

Link to comment
Share on other sites

Hey mr, you had the update bitmap function creating a billion clients. Huge memory leak! lol. Wouldnt even load a webpage. you were comparing the target.dc to something before it was ever created so it gave a runtime error. so i just set the target bitmap up in the setup procedure along with the client.

 

AND you changed this function called ummm sendkeys

Link to comment
Share on other sites

AND you changed this function called ummm sendkeys

I thought since the new system we needed to use the Vkeys but its all cool. The darn SPS system is kicking my butt. Im trying to get it working properly but keep getting the error call to unknown proc.. =/

 

Hmm, didn't I recommend to drop that UpdateBitmap function?

 

Yes you did, but in order to drop it you would have to add 3 or so lines of code to every function that uses color/bitmaps. This way it saves lines of code.

Link to comment
Share on other sites

I thought since the new system we needed to use the Vkeys but its all cool. The darn SPS system is kicking my butt. Im trying to get it working properly but keep getting the error call to unknown proc.. =/

 

 

 

Yes you did, but in order to drop it you would have to add 3 or so lines of code to every function that uses color/bitmaps. This way it saves lines of code.

 

That's exactly what I said.

 

I'm looking forward to this TSCARWebClient more than anything. APPA, just leave it how it is...

Link to comment
Share on other sites

The version in the current alpha doesn't do much more than navigate and allow capturing, but I've already got mouse movements and some other stuff done in my development copy.

 

If you need any help with HTML, CSS, or any of that you can ask me :o.

 

All you need is keyboard functions then, you're ahead of APPA! :D

Link to comment
Share on other sites

If you need any help with HTML, CSS, or any of that you can ask me :o.

 

All you need is keyboard functions then, you're ahead of APPA! :D

 

Hmm, I've got about 12 years of experience with HTML and 5ish with CSS, I'll manage :P Also, I don't see how I would ever need either for this ;)

 

I'll be pushing an updated copy in like 15 minutes.

Link to comment
Share on other sites

Hmm, I've got about 12 years of experience with HTML and 5ish with CSS, I'll manage :P Also, I don't see how I would ever need either for this ;)

 

I'll be pushing an updated copy in like 15 minutes.

 

You know like appa_GetElement, and all the fun element actions? In APPA. What do you plan to do instead?

Link to comment
Share on other sites

You know like appa_GetElement, and all the fun element actions? In APPA. What do you plan to do instead?

 

I will be working on a replacement, but I haven't worked out exactly how I'm going to implement it yet... The new copy should be up in about 5 minutes, do note that I changed something rather important, before the Navigate method waited for the page to load, now you have to wait for it in the script, there's a new example included.

 

EDIT: Well, it's up now, at the moment, as far as input goes, only moving the mouse and clicking is implemented.

Edited by Freddy
Link to comment
Share on other sites

I will be working on a replacement, but I haven't worked out exactly how I'm going to implement it yet... The new copy should be up in about 5 minutes, do note that I changed something rather important, before the Navigate method waited for the page to load, now you have to wait for it in the script, there's a new example included.

 

My suggestions: Make it like GetSelf function. Where you can hide the browser, minimize, maximize, etc. Then have regular stuff. It would be cool if it could scroll down an amount, then if there is like a flash game. Lock on to it somehow then change size to fit the game?

Link to comment
Share on other sites

I am not taking suggestions on this, I'm just going to follow my development plan. I'm sure the result will be satisfactory. As for minimizing, this won't be available. It turns out to be more trouble than it's worth. But the client does not have to be focused or on the foreground to work. At the moment flash can't be captured along with the webpage, but that should change by the time it's completed. Java is not and probably won't be supported as it tends to crash everything.

Link to comment
Share on other sites

I am not taking suggestions on this, I'm just going to follow my development plan. I'm sure the result will be satisfactory. As for minimizing, this won't be available. It turns out to be more trouble than it's worth. But the client does not have to be focused or on the foreground to work. At the moment flash can't be captured along with the webpage, but that should change by the time it's completed. Java is not and probably won't be supported as it tends to crash everything.

 

I know you like to push on to new things/developments. I just think those would be easy to add too I think.

 

EDIT: How would the includes system fit in with this. Would it just have the web page open, and then click to install? Or is that more of the back end to it? The one on this site. Or are you adding internet functionality so you can use it with the includes system? xD

Edited by LordJashin
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...