Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

NotePad Calculator [Source]

I made this in hopes that this section will become more active.
Code
#include <String.au3>
while 1
    HotKeySet("{enter}", "addClip")
WEnd

Func addClip()
    WinActivate("Untitled - Notepad")
    If @error Then
        MsgBox(0, "Not Found", "Please open a valid blank Notepad document.")
    EndIf
    Send("^a")
    Send("^c")
    Global $Clip = ClipGet()
    Global $numbers = _StringExplode($Clip, "+")
    MsgBox(0, "Addition", $numbers[0] + $numbers[1])
    Exit
EndFunc

Instructions:
  1. Open a new Notepad Document
  2. Type in any number, then a plus sign, followed by another number
  3. Press Enter

I know it's kinda buggy (if you press Enter to close the message box it opens another one) but it's pretty awesome in my opinion!
This is a great idea... btw you can do only additions with this script... aniway i didnt try it but im sure this code its incorrect (there is an EndIf without sense)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Delphi] by djfshadyAug 27, 2010 12:07 PM 2 153 Aug 27, 2010 12:07 PM
Last Post: djfshady
by codepoetMar 19, 2010 09:58 AM 3 67 Mar 19, 2010 09:58 AM
Last Post: Cida