SRL Archive - OSR Help

Script gets buggy when disabling smart


Master BAW

2012-06-17 11:19:42

When I disable smart without putting the script onto pause first, the script will go on, but can't see anything. This will give problems.. after enabling the smart again, the scirpt just will do nothing…

Is there a way to check whether the smart is enabled or not?

Because if so, i would like to make this procedure, and put it into every procedure, so that the script won't get stuck:



Procedure WaitUntilSmartActivated(seconds:integer);
var
seconds := integer;
begin

if(SmartEnabled = False) then //this function is a function but doesn't work for me....
begin
wait(1000);
Writeln('Smart is disabled, we''re waiting for ' + IntToStr(seconds) + ' seconds now.');
WaitUntilSmartActivated(seconds+1);
exit;
end;

end;



Does this work?
I tried the function SmartEnabled but that didn't seem to work :( also when I tried it, the simba closed!

Do I have the right function, then what am I doing wrong?


~Greetz
//MasterCrimez

putonajonny

2012-06-17 11:40:10

I'm sorry I can't help with your actual question, but can't you just pause the script? In terms of your Procedure:
Procedure WaitUntilSmartActivated;
begin

if(not SmartEnabled)do
WriteLn('Waitng for smart to be enabled');

while(not SmartEnabled)do//This will wait until smart is enabled (if that function did work)
wait(1000);

end;

Brandon

2012-06-17 11:47:48

When you disable smart, your script does not go on.. :S Doesn't happen to me. It basically pauses since it cannot get any information from the client. When unpaused, it continues where it last left off.

To answer your strict question: SmartActive or SmartEnabled will tell you whether smart is on the screen and if Smart is enabled.

RSReady can probably work too since it has to read the data from smart.

putonajonny

2012-06-17 11:59:18

From: Brandon
When you disable smart, your script does not go on.. :S Doesn't happen to me. It basically pauses since it cannot get any information from the client. When unpaused, it continues where it last left off.

To answer your strict question: SmartActive or SmartEnabled will tell you whether smart is on the screen and if Smart is enabled.

RSReady can probably work too since it has to read the data from smart.


Disabling smart just pauses the screen that simba can see, so it will carry on running, but when it reads the screen it will get the old screen…

Master BAW

2012-06-17 16:49:53

thanks.. Actually it isn't really that important, but sometimes it's kind of irritating me that when I disable Smart, and accidentally not pause the script, I have to restart the whole script :(