Thread: VBS question
View Single Post
  #9  
Old 01-26-2010, 06:29 PM
xxxbeinxxx xxxbeinxxx is offline
Skeleton


Join Date: Jan 2010
Posts: 15
Default

This fixes the issue you described, but you need to validate your input to make sure the value isn't equal to null.

Dim Key, tempString, tempKey, Input

Input = InputBox("Enter Serial!")
Input = int(Input)

Key = ((((((((Input ^ 8) / 92657) + 16) * 7) / 316) - 23) / 71104) + 26) * 24

tempString = CStr(Key)
tempString = Left(tempString, 6)
tempKey = Int(tempString)

if (tempKey < 1000000) then
tempString = CStr(tempKey * 2540)
tempString = Left(tempString, 6)
Key = Int(tempString)
else
Key = tempKey
end if

msgbox (Key)