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

How to get past the 6 hour log out without "Crash Smart"


chandlerethan

2012-01-03 02:43:56

If you are unable to download programs to your computer, stop reading now.
Anyways, to do this you will have to download a program called autohotkey, which you can find @ http://www.autohotkey.com/. Autohotkey is a scripting program (not for Runescape, just doing things for you in general, it's not another botting community either so I'm not advertising) that can automate tasks on your computer. All you have to do is run the macro that I will give the source code of below so you won't have to write it, and download a picture that the macro needs to run, and when it sees the update picture on the screen, it will close out smart, and rerun the script. This is a lot safer compared to the "Crash smart" method, although I do commend him on figuring that out. The only real drawback is, you must have smart as the front screen and must have Simba directly under it. Although, if you learn Autohotkey language (which isn't hard) then you can modify this to your liking). But anyways, download the pic below… lol, here is the code for the macro:
EDIT: I am in the process of writing a macro to handle multiple scripts at a time. :P Until then enjoy this haha
<- this is the pic you need to download.

;Anything after a ";" is a comment. :P
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
loginPicDirectory := "the directory of the login pic goes here. EX: C:\Users\Chandler\Desktop\pics\"
scriptDirectoryWithFullScriptName := "The directory of the script goes here, be sure to include the name of the script followed by .simba C:\Users\Chandler\Desktop\script.simba"
Sleep 7000 ;this makes the script sleep for 7 seconds before it begins so that you can check to make sure the script works before going afk, change if needed
loop 999999999{
ImageSearch loginX, loginY, 0, 0, A_ScreenWidth, A_ScreenHeight, *20 %loginPicDirectory%login.png
; What this does is searches for the login image you stated in the "loginPicDirectory" variable starting at 0x, 0y
; and ending in the max x and y of your computer screen. (which is your max resolution) with a color tolerance of 20.
if (ErrorLevel = 2){
; An error level of 2 means it couldn't conduct the search, prolly cuz you didn't put the right picture directory.
MsgBox Dude, the loginPicDirectory variable is prolly wrong... look again.
} else if (ErrorLevel = 1){
; This means it can't find the pic, and we want it to sleep so it won't interrupt anything and wont repeat a billion times a minute.
Sleep 300000
; 300,000 milliseconds / 1,000 = 300 seconds
} else {
; It found the update icon, now it's going to restart the script.
Process, Close, Simba.exe
Run %scriptDirectoryWithFullScriptName%
Sleep 10000
; Opens the script and sleeps for 10 seconds
Send {F9}
Sleep 300000

; Presses the F9 key which starts the script and then sleeps for 5 minutes so that it doesnt repeat the process when the login appears while S.M.A.R.T. is signing you in.
}
}
Esc::ExitApp
; This means if you press the Escape key, then it will exit out of the macro.

Step 1.
Download and install Autohotkey from
http://www.autohotkey.com/download/
Step 2.
Save the above picture to your desktop, and name it login.png (make sure it's a .png format. THIS IS IMPORTANT OR THE SCRIPT WONT WORK.
Step 2.
Open up notepad and paste the code into notepad, Edit the variables (At the bottom of this tut I have explained how. (scriptDirectoryWithFullScriptName and updatePicDirectory) to fit your computer, and save as: update.ahk
(SAVE AS TYPE: ALL FILES. THIS IS IMPORTANT)
Step 3.
Open up and run your script.
Step 4.
Enjoy 24/7 botting like the old days with a few exceptions. :P

Explanation of editing the variables.
To find out the directory of your script and the pic you downloaded (assuming you're running Windows(TM)), right click the picture you downloaded, and the script, and select properties. then it should say "Location" to the left. Copy the location (not the actual word), and paste it into the respective variable names.


ANY QUESTIONS? FEEL FREE TO POST YOUR QUESTIONS HERE. IF A MOD FINDS THIS INAPROPRIATE, please Delete it, don't infract me.

YoHoJo

2012-01-03 02:46:25

What a nice and helpful first post, cool!

Grihmm

2012-01-03 02:51:29

From: chandlerethan
The only real drawback is, you must have smart as the front screen and must have Simba directly under it.


Does this mean you would only be able to use it with one SMART at a time?

YoHoJo

2012-01-03 02:57:39

Oh yikes, that is a pretty big drawback then…. might as well just auto on the normal client, so we pretty much cant be on computer (at least at the instance this macro needs to be run).
A fix is a fix though, maybe just when you are done with comp leave those two windows up.

@Grihmm ya pretty much, gotta keep simba/smart on top of all other windows, so just 1 it seems like.

chandlerethan

2012-01-03 03:13:17

I *could* make it so that it maximizes and minimizes different windows but that would take a bit longer to write. this is for if you are away from your computer and not using it. but i will be sure to write one to handle multiple simba scripts with no problem. :P actually, i'll do it now!

Grihmm

2012-01-03 03:18:51

Would you be able to make one that maximizes and minimizes different windows, and when it is done, keep them all minimized? That would be ideal.

Harry

2012-01-03 03:24:13

Looks neat. I don't see why someone would want to use this instead of crashsmart though? Seems a lot more complicated.

chandlerethan

2012-01-03 03:33:44

I'm in the process of making a script that once an hour maximizes all smart windows to see if they logged out, and if one of them has, it closes it out and reruns the script. Which will be a lot more efficient than this. :P

Edit: Almost done with the new one. I feel retarded cuz the new one works better and has less code. haha oh well. will post new code when done. Check back for updates.
Edit2: I figured out how to make it run with multiple scripts, but Since all of the SMART windows have the same window name, it'll be hard to close that one and run the script specific to that SMART without restarting the other scripts :/ Anyone with a smarter brain think of anything? lol

chandlerethan

2012-01-03 04:32:39

BTW Harry, how does yours work? does it restart every 6 hours? or only when the SMART window closes?

Harry

2012-01-03 04:32:59

It restarts when the "RS has been updated" menu gets triggered.

chandlerethan

2012-01-03 04:55:53

Oh okay. then close this thread please. lol I though it only restarted when S.M.A.R.T crashed lol Sorry guys Dx

Grihmm

2012-01-03 04:56:53

Aw. And here you had me hoping.

chandlerethan

2012-01-03 06:37:20

Well I could still make it for you. :P I just didn't know that Harry's fix did the same as what I was trying to do lol

Swagger

2012-01-05 17:12:34

Ha. Chandler bro you know who it is ;).

Kajutsky

2012-01-05 17:32:23

crash smart vs this which ones better?

Shuttleu

2012-01-05 17:34:10

From: dgpro
crash smart vs this which ones better?


crash smart

~shut