Jump to content

Oldie but a goodie needs to shrink and improve


Recommended Posts

Dim $procs = ProcessList()

For $i = 1 To $procs[0]

$extension = StringRight($procs[$i], 4)

If $extension = ".SCR" Then ProcessClose ($procs[$i])

Next

Can I make this script any shorter?

Also, I'd like to add something below it to have it give the current plaintext screensaver password for Windows 9x whether a screensaver has/n't been selected for use. (i.e.) A plaintext 1 is encrypted to become 373900 in the registry. Sure, I have utilities to tell me the current password, but what fun is that? AutoIt gets better every time I visit this site. BTW, I use version 3.0.103.0. Nothing but the best. People rarely use Windows 9x anyway so it's not a security risk. Just a curiousity. Also, I don't want to hear lame answers like you can't decrypt passwords longer than 14 characters (Windows limit, will hang,...)because I've set my screensaver to have a 30 character password and it works fine and the utility I'm borrowing, until I learn how to decrypt the registry entry using AutoIt, works.

Thanks,

The Tech Guy

My Programs:Dissolve (Updated 5-30-06)Credit Card Validator (Not created as of yet)Master Lock Combination Cracker (Updated 7-08-07)Go Siteseeing:My Website: - Click HereCyberZeroCool's Website - Click Here

Link to post
Share on other sites

Try this :

Dim $procs = ProcessList()
For $i = 1 To $procs[0]
If StringRight($procs[$i], 4) = ".SCR" Then ProcessClose ($procs[$i])
Next

At least one line shorter..

Edit:

If you also mean shorter in filesize, then you could

remove some spaces in your code..

For example :

Dim $procs=ProcessList()
For $i=1 To $procs[0]
If StringRight($procs[$i],4) = ".SCR" Then ProcessClose ($procs[$i])
Next

Both examples are untested, but should work..

Edited by Helge
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...