SRL Archive - General S.M.A.R.T.

Any idea why my script goes nuts


The Claw

2007-09-01 07:16:56

OK so I've been messing around with smart, and I've got the silent mouse working fine, but as soon as i minimize the window the script just goes straight to the progress report and when I go back to the client the screen is spinning. Here is my VWM, which is what I'm trying to get it to work on, and I'm using the Smart.scar that everyone else is. If someone could take a look and tell me whats wrong, that would be great :)

Sumilion

2007-09-01 07:51:58

SMART might be the minimizing client, but atm it doesnt do that very well. I haven't looked at your script but i wouldn't be surprised if nothing is wrong.

I always drag the smart window off screen, that does seem to work :)

Wizzup?

2007-09-01 08:00:51

From: Sumilion
SMART might be the minimizing client, but atm it doesnt do that very well. I haven't looked at your script but i wouldn't be surprised if nothing is wrong.

I always drag the smart window off screen, that does seem to work :)


Sum it does work for me. ;)
You just need to make your own Compass function.

The Claw

2007-09-01 08:11:47

Hmm, even when I drag it off screen it does the same thing

and the script that you sent me Wizzup works perfect minimized, and I havent
got any different compass function or anything.

Wizzup?

2007-09-01 08:55:35

From: The Claw
Hmm, even when I drag it off screen it does the same thing

and the script that you sent me Wizzup works perfect minimized, and I havent
got any different compass function or anything.


Yes, but the script doesn't call MakeCompass. ;)

The Claw

2007-09-01 10:05:34

Neither does mine..I removed all of them, even the ones inside SRL which could be causing it.

but yer I've figured it out, it's not recognizing that we are logged in, causing it to skip through everything and then want to change player. this was also happening on your power miner wizzup when it went to switch player, but i didnt want to annoy you so i didnt say anything lol.

so we have a problem with seeing if we're logged in or not. can anyone confirm?

Smartzkid

2007-09-01 11:46:34

In your smart.scar, did you override findwindowbysize? SRL might be resetting SCAR's target to the actual applet, instead of the SMART output.

The Claw

2007-09-01 21:25:20

yup..heres my smart.scar.

procedure ActivateClient;
begin
end;

function FindWindowBySize(w, h: Integer): boolean;
begin
result := true;
end;

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

BenLand100

2007-09-02 00:37:41

Scar's GetColor method doesn't switch with SetTargetBitmap anymore, you need to override it also.

The Claw

2007-09-02 01:45:39

ok sweet. now it works, but whenever its minimised it walks 180 degrees in the wrong direction. lol

Sumilion

2007-09-02 04:51:37

Then you will have to use a diff compass function :p

Wizzup?

2007-09-02 05:28:21

From: Sumilion
Then you will have to use a diff compass function :p


No, use Result := i; instead of Result := 360 - i, just tara's logic. :)

The Claw

2007-09-02 06:55:41

replaced the compass function, and when Radial or Radial road walking it still goes in the complete other direction. If its meant to walk down, it walks up, if its meant to walk left it walks right. Only when minimized though. :rolleyes: