Jump to content

Dell Battery Recall Check


DJ VenGenCe
 Share

Recommended Posts

First real useful program. I have been a lurker, but many of you IT People may find this useful.

Example Uses:

xxxC2451xxxxxxxxxxxxx - Known not on Recall

xxxC5446xxxxxxxxxxxxx - Should be on Recall

You can enter your whole code, I subbed the real barcode with x's (obviously)

Requires v3.2.0.1 (May work in older versions, not tested though)

#include <Array.au3>
Dim $avArray[38]

; Dell Batter Recall Check - Uses Array of Known Dell Part Numbers that know on Recall.
; Enter the Serial Number WITHOUT the Hyphen's or the program may encounter Error.  

; This is a beta release of the program.  Suggestions/Additions are welcome!
;Set arrays
 $avArray[0] = "1K055"
 $avArray[1] = "C5446"
 $avArray[2] = "F2100"
 $avArray[3] = "KD494"
 $avArray[4] = "W5915"
 $avArray[5] = "Y1333"
 $avArray[6] = "3K590"
 $avArray[7] = "C6269"
 $avArray[8] = "F5132"
 $avArray[9] = "OR331"
$avArray[10] = "X5308"
$avArray[11] = "Y4500"
$avArray[12] = "5P474"
$avArray[13] = "C6270"
$avArray[14] = "GD785"
$avArray[15] = "M3006"
$avArray[16] = "X5329"
$avArray[17] = "Y5466"
$avArray[18] = "6P922"
$avArray[19] = "D2961"
$avArray[20] = "H3191"
$avArray[21] = "RD857"
$avArray[22] = "X5332"
$avArray[23] = "D5555"
$avArray[24] = "C2603"
$avArray[25] = "J1524"
$avArray[26] = "TD349"
$avArray[27] = "X5333"
$avArray[28] = "C5339"
$avArray[29] = "D6024"
$avArray[30] = "JD616"
$avArray[31] = "U5867"
$avArray[32] = "X5875"
$avArray[33] = "C5340"
$avArray[34] = "D6025"
$avArray[35] = "JD617"
$avArray[36] = "U5882"
$avArray[37] = "X5877"

$string = "Please Scan or Input Serial Number: " & @CRLF  & "For Example: KR0C2451712705250334" & @CRLF & "Do not Enter Hyphens";
$input = InputBox("Enter Battery Serial Number", $string,"")

$dellPN = StringMid($input, 4,5); 4th Character, 5 total chars.

;Sort Array
_ArraySort( $avArray)

;Look up the Entry
$iKeyIndex = _ArrayBinarySearch ( $avArray, $dellPN)
;If it was ok, display "Recall" Notice"
If Not @error Then
   Msgbox(0,'Battery Eligible',' Your Battery is on Recall, Contact Dell!')
Else
   Msgbox(0,'Battery Not Eligible',' Battery is not set for Recall')
EndIf

Comments and Suggestions welcomed!

DJ

Edited by DJ VenGenCe
Link to comment
Share on other sites

  • Developers

@Valik ... make sure you breath at least 5 time before replying to the last one ... :P

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers
sure... ever looked at the v2 syntax? :P

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

sure... ever looked at the v2 syntax? :P

Years ago.

After re-reading the orignal post again and spotting this:

============

Requires 2.0 (May work in older versions, not tested though)

..

..

#include <Array.au3> <---***

Dim $avArray[38]

..

..

=============

I realize he has to mean AutoIt v3.something

Link to comment
Share on other sites

@Valik ... make sure you breath at least 5 time before replying to the last one ... :P

Actually, that is the exact reason I'm being a prick about stating the correct version of AutoIt. The syntax is clearly v3 syntax but there is no "2.0" version of AutoIt with that syntax, ergo, confusion can ensue. And vim proved my point perfectly.
Link to comment
Share on other sites

Sorry Guys, not always in front of my PC. But yes, Big daddy was right.. v3.2.0.1 is what it was tested on. I am going to update that in my first post.

thanks for the suggestions, I am going to try something different.

You win a warm palm rest on the D-series of Laptops (Latitudes) if you match 4-out-of-5.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...