Project 1999

Go Back   Project 1999 > General Community > Off Topic

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-07-2010, 05:48 PM
guineapig guineapig is offline
Planar Protector

guineapig's Avatar

Join Date: Oct 2009
Posts: 4,028
Default VBS question

Hey fellow geeks.

Quick VBS question.
I have a script here for a basic keygen. It works fine except for one thing.
After you type in (for example) 2-3 digit number and the key is generated you click okay and it goes back to the window requesting another session key.

That part is fine. However, when I click close (x) it brings up the generated number again. Also if you click close (x) on the window with the generated key it also takes you back to the window requesting another key.

Here's the code:
---------------------------------
On Error Resume Next

Dim Key, tempString, tempKey, Input

Do

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)

Loop Until Input < 1

-----------------------------------------

How the hell do I get the code to terminate the script as soon as the close (x) click event happens???

I cant think of a bunch of ways to do it logically but I really suck at VBS and can't figure out the syntax. Any help would be greatly appreciated.

This is just for home computer use so feel free to use the code for whatever if you want to...
__________________
Quote:
Originally Posted by nilbog View Post
Server chat is for civil conversation. Personal attacks/generally being confrontational will not be tolerated.
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:14 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.