AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cola 1.0

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Hezzu



Joined: 08 Aug 2008
Posts: 50
Location: Raahe, Finland

PostPosted: Sun Aug 10, 2008 1:14 pm    Post subject: Cola 1.0 Reply with quote

---Hezzu presents---
---Cola 1.0 reminder---
I screwed up so badly in last version that I had to replace some text
Now with Graphic user interface!
You can now test how the reminder sounds like
I hope I don't suddenly see something awful in the script again


Description:
Do you sometimes forget something and remember it when it's too late because of a interesting game or film?

Do not forget anymore

Because Cola 1.0 is HERE

First created to just remind about a mere cola in a mere freezer
it can now remind you of anything in the world!!!
using Cola 1.0 is simple as 12... 124... I mean 123!
First: Start Cola 1.0.exe/ahk
Second: Follow tips
Third: NEVER FORGET AGAIN

Best thing in this simple program is that it comes with handy VOICE reminder:
Even if you have a fullscreen game on Cola 1.0 will keep sure you will not miss anything in your life AGAIN!

--- Text as it is in readme file of the exe version

Here's a link to the exe that installs ws4ahk.ahk
http://www.autohotkey.net/~Hezzu/Valmiit/Cola%201.0.exe
but if you get the code from the source download it from:
http://www.autohotkey.net/~easycom/
(Thanks to erictheturtle)

And here's the script:
cause i'm a noob feel free to clean it up

oh and now Shift+F12 shuts this baby down

Code:

#SingleInstance, Force

   #Include ws4ahk.ahk
   WS_Initialize()
   OnExit, ExitCleanup
   
   code =
   (
      Set ISpeechVoice = CreateObject("SAPI.SpVoice")
      ISpeechVoice.Rate = -2
   )
   WS_Exec(code)   
   Gosub, Nalli
Return





Nalli:



Gui, Add, Slider, x6 y40 w240 h30 +Range-10-10 +tooltip vMySlider, -3
Gui, Add, Edit, x6 y10 w220 h20 vColalol, Is the cola in the freezer?
Gui, Add, Edit, x266 y10 w50 h20 vTime, 15
Gui, Add, Button, x286 y40 w100 h30 gSub1, Accept
Gui, Add, Button, x246 y40 w40 h30 gTest, Test
jeps:
Gui, Font, S10 CDefault,
Gui, Add, Text, x226 y10 w40 h20 , Every
Gui, Add, Text, x316 y10 w60 h20 , Minute(s)
Gui, Show, h77 w393, Cola 1.0
Return

GuiClose:
ExitApp


Sub1:
Minute = 60
Guicontrolget, Time
Guicontrolget, Colalol
Guicontrolget, MySlider
Gui, destroy

MsgBox, 4,, I will remind you every %Time% Minute(s)?
   IfMsgBox No
GoSub, Nalli
else

EnvMult, Time, 60
EnvMult, Time, 1000
OFF = %Time%

Gosub, Sub5

Sub5:
Sleep, 1000

OFF -= 1000

Minutes = %OFF%
Minutes /= 60000


Minute -= 1

Mammoth = %Minute%
If Minute <= 0
Minute = 60


TrayTip, Cola 1.0 Ultrapanel, Warning in: %Minutes% Minute(s) %Mammoth% Second(s), 1, 17
if OFF = 0
GoSub, Sub2
else
GoSub, Sub5


Sub2:
speakee := VBStr(colalol)
   code =
   (
ISpeechVoice.Rate = %MySlider%
      ISpeechVoice.Speak %speakee%, 3
   )
   WS_Exec(code)

OFF = %Time%
Minute = 60
GoSub Sub5

return


ExitCleanup:
   WS_Uninitialize()
   ExitApp

Return


Test:
Guicontrolget, Time
Guicontrolget, Colalol
Guicontrolget, MySlider
speakee := VBStr(colalol)
   code =
   (
ISpeechVoice.Rate = %MySlider%
      ISpeechVoice.Speak %speakee%, 3
   )
   WS_Exec(code)
Gosub, jeps
return


+F12::gosub, kiinni
return


kiinni:
Exitapp


I hope someone has some use for this
_________________

If you want the baby but not the labour pain PM me (simple things only please)
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group