Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Explicit
- Dim WshShell, theCalculator
- Dim a, a1, a2
- Set WshShell = WScript.CreateObject("WScript.Shell")
- a = InputBox(a, "Enter first operand")
- a2 = InputBox(a2, "Enter sign")
- a1 = InputBox(a1, "Enter second operand")
- Set theCalculator = WshShell.Exec("calc")
- WScript.Sleep 500
- WshShell.AppActivate theCalculator.ProcessID
- WScript.Sleep 500
- Select Case a2
- Case "+"
- WshSHell.SendKeys a & "{+}"
- Case "-"
- WshSHell.SendKeys a & "{+}"
- Case "/"
- WshSHell.SendKeys a & "{/}"
- Case "*"
- WshSHell.SendKeys a & "{*}"
- end select
- WScript.Sleep 100
- WshShell.SendKeys a1
- WScript.Sleep 100
- WshShell.SendKeys "~"
- WScript.Sleep 100
- WshShell.SendKeys "^c"
- WScript.Sleep 100
- WshShell.AppActivate theCalculator.ProcessID
- WshShell.SendKeys "%{F4}"
- WshShell.Run "notepad"
- WScript.Sleep 1000
- WshShell.AppActivate "notepad"
- WshShell.SendKeys a
- If a2="+" then
- WshSHell.SendKeys "{+}"
- else
- WshShell.SendKeys a2
- End If
- WshShell.SendKeys a1 & "="
- WshShell.SendKeys "^v"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement