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 

Tickler File

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



Joined: 06 Mar 2007
Posts: 64
Location: Columbus, OH, USA

PostPosted: Thu Mar 27, 2008 8:02 pm    Post subject: Tickler File Reply with quote

I created a little Tickler File program with Autohotkey. You run the script, select files in Windows Explorer, hit Alt+T to add the files to your tickler list, with notes and appropriate date. Then each day, just hit Ctrl+Alt+T to see if you have any files for the day... if you do, the notes and files open! Hotkeys are customizable through the tray icon, and you can set it to run on startup.



Here's a video:
http://www.youtube.com/watch?v=DtoBuNkZtpI

And here's the files:
http://www.autohotkey.net/~elchapin/Tickler%20File%20Exe.zip
http://www.autohotkey.net/~elchapin/tickler_file005.ahk
http://www.autohotkey.net/~elchapin/tickler_file005_exe.ahk


Code:

;==================================================
;
;Tickler File v1.0
;Chip Kohrman (elchapin) @2007
;
;
;Select files/programs in Windows Explorer that you want to open at a later date, and press ALT+T!
;Select a date on the calendar, add any helpful notes, and press ENTER or click OK.  Your files have been logged!
;To open any previously selected files for the current date, press CONTROL+ALT+T.
;
;Right-click tray icon for more options or to exit.
;
;
;
;Requires no installation, and can run on a portable USB device.
;Tested OS: Windows XP/Vista
;
;
;Enjoy!
;
;==================================================

title = Tickler File
version = v1.0
extension = .exe
program_name = %title%%version%%extension%

;CREATE MENU=======================================
;==================================================
Menu, tray, NoStandard
Menu, tray, tip, Tickler File
Menu, tray, add, About, ABOUT
Menu, tray, add, Options, OPTIONS
Menu, tray, add, Exit, EXIT


;MAIN SCRIPT=======================================
;==================================================

IfNotExist, %A_ScriptDir%\DATA\
         FileCreateDir, %A_ScriptDir%\DATA
IfNotExist, %A_ScriptDir%\DATA\settings.ini
   {
     IniWrite, !T, %A_ScriptDir%\DATA\settings.ini, Hotkeys, HotkeyAddFile
     IniWrite, ^!T, %A_ScriptDir%\DATA\settings.ini, Hotkeys, HotkeyViewFile
     IniWrite, 0, %A_ScriptDir%\DATA\settings.ini, Variables, VariableStartup
  }
IniRead, HotkeyAddFile, %A_ScriptDir%\DATA\settings.ini, Hotkeys, HotkeyAddFile
IniRead, HotkeyViewFile, %A_ScriptDir%\DATA\settings.ini, Hotkeys, HotkeyViewFile
IniRead, VariableStartup, %A_ScriptDir%\DATA\settings.ini, Variables, VariableStartup
HotKey, %HotkeyViewFile%, HotkeyViewFile
HotKey, IfWinActive, ahk_class ExploreWClass
Hotkey, %HotkeyAddFile%, HotkeyAddFile1
HotKey, IfWinActive, ahk_class CabinetWClass
Hotkey, %HotkeyAddFile%, HotkeyAddFile2
return


;HOTKEYS===========================================
;==================================================


#IfWinActive, Tickler File
ENTER::
   Gui, Submit
   Pause, Off
return


;SUBROUTINES=======================================
;==================================================

HotkeyAddFile1:
   explorerClass = ExploreWClass
Goto ExplorerExtension
return

HotkeyAddFile2:
   explorerClass = CabinetWClass
Goto ExplorerExtension
return

HotkeyViewFile:
IfExist, %A_ScriptDir%\DATA\%A_YYYY%%A_MM%%A_DD%.txt
   Loop, Read, %A_ScriptDir%\DATA\%A_YYYY%%A_MM%%A_DD%.txt
      {
         Run, %A_LoopReadLine%
      }
IfNotExist, %A_ScriptDir%\DATA\%A_YYYY%%A_MM%%A_DD%.txt
   MsgBox, 0, %A_MMM% %A_DD%`, %A_YYYY%, No Tickler Files for Today!
IfExist, %A_ScriptDir%\DATA\%A_YYYY%%A_MM%%A_DD%_note.txt
   {
      FileRead, TodayNote, %A_ScriptDir%\DATA\%A_YYYY%%A_MM%%A_DD%_note.txt
      MsgBox, 4096, Tickler Notes, %A_MMM% %A_DD% `| Tickler Notes`:`n`n%TodayNote%,
   }
return

EXIT:
   Pause, Off
   ExitApp

AddToDate1:
   Gui, Submit
   Pause, Off
   return
   
CancelFileAdd1:
   Pause, Off
   return
   
GuiClose:                                     
   Gui, Destroy
   Pause, Off
   return   


ABOUT:
   MsgBox, %title%%version% (freeware)`nAuthor: Chip Kohrman (elchapin), 2007`nwww.chipkohrman.com`n`nSelect any files and/or programs in Windows Explorer `nthat you want to open at a later date, and press ALT+T!`n`nSelect a date on the calendar, add any helpful notes, `nand press ENTER or click OK.  Your files have been logged!`n`nTo open any previously selected files for the current date, `njust press CONTROL+ALT+T.`n`nYou can set your own hotkeys via the options menu. `nRight click the icon in the tooltray.`n`nIf you like the program, be sure to select the option to run on startup!`n`nEnjoy!
   return

OPTIONS:
   Gui, Add, GroupBox, x12 y12 w160 h140 , Hotkeys
   Gui, Add, Text, x22 y42 w140 h20 , Add file(s) to Tickler File:
   Gui, Add, Hotkey, x22 y62 w140 h20 vAddFileKey, %HotkeyAddFile%
   Gui, Add, Text, x22 y92 w140 h20 , Open file(s) for current date:
   Gui, Add, Hotkey, x22 y112 w140 h20 vViewFileKey, %HotkeyViewFile%
   Gui, Add, CheckBox, checked%RunOnStartup% x12 y162 w160 h20 vRunOnStartup, Run Tickler File on Startup
   Gui, Add, Button, x12 y192 w70 h30 gOKOPTIONS, OK
   Gui, Add, Button, x102 y192 w70 h30 GCANCELOPTIONS, CANCEL
   Gui, Show, x593 y315 h241 w190, Options
   Return

OKOPTIONS:
   Gui, Submit
   Gui, Destroy
   IniWrite, %AddFileKey%, %A_ScriptDir%\DATA\settings.ini, Hotkeys, HotkeyAddFile
  IniWrite, %ViewFileKey%, %A_ScriptDir%\DATA\settings.ini, Hotkeys, HotkeyViewFile
  IniWrite, %RunOnStartup%, %A_ScriptDir%\DATA\settings.ini, Variables, VariableStartup
        
  If (RunOnStartup = 1){
     IfNotExist, %A_Startup%\%title%%version%.lnk
           {
              FileCreateShortcut, %A_WorkingDir%\%program_name%, %A_Startup%\%title%%version%.lnk
           }
     }
  If (RunOnStartup = 0){
     IfExist, %A_Startup%\%title%%version%.lnk
           {
              FileDelete, %A_Startup%\%title%%version%.lnk
           }
     }
  Reload
   return
   
CANCELOPTIONS:
   Gui, Destroy
   return

#IfWinActive
ExplorerExtension:
   ;current path in windows explorer
   ControlGetText currentPath, Edit1, ahk_class %explorerClass%
   ;current (selected/with focus) filename in windows explorer
   selectedFile := GetExplorerSelectedFile()
     


;FUNCTIONS=========================================
;==================================================

GetExplorerSelectedFile()
{
  local selectedFiles, file

  ControlGet, selectedFiles, List, Selected Col1, SysListView321, ahk_class %explorerClass%
     CalDate1=
      Gui, Add, MonthCal, x12 y12 w250 h180 vCalDate1,
      Gui, Add, Button, x12 y202 w120 h30 gAddToDate1, OK     
      Gui, Add, Button, x142 y202 w120 h30 gCancelFileAdd1, CANCEL
      Gui, Add, Edit, x12 y242 w250 h140 vNote, Add note for these files...
      Gui, Show, xcenter ycenter h400 w279, Tickler File
     Pause, On
     Gui, Destroy
      
      
      
      IfExist, %A_ScriptDir%\DATA\%CalDate1%.txt
         FileRead, CurrentFileList, %A_ScriptDir%\DATA\%CalDate1%.txt
            
            
      
      Loop, Parse, selectedFiles, `n
         {   
            If Instr(CurrentFileList, A_LoopField){
               If (A_Index=1){
                     AlreadySelected = %A_LoopField%`n
                  }
               else
                  {
                     AlreadySelected = %AlreadySelected%%A_LoopField%`n
                  }
               continue
            }
            
            If (A_Index=1){
                  filepath = %currentPath%`\%A_LoopField%`n
               }
            else
               {
                  filepath = %filepath%%currentPath%`\%A_LoopField%`n
               }
         }
      
      FileAppend, %filepath%, %A_ScriptDir%\DATA\%CalDate1%.txt
      
      If (Note!="Add note for these files..."){
         FileAppend, `=`=`=`=`=`=`=`=`=`=`=`=`=`=`=`=`=`=`=`=`n%Note%`n, %A_ScriptDir%\DATA\%CalDate1%`_note.txt
     }
     
     Note =
      filepath =
      
      IfNotEqual, AlreadySelected,
      {
         MsgBox, 0, Notice, Previously scheduled file`(s`)`:`n%AlreadySelected%
         AlreadySelected =
      }
           
   Return file
}
 
 
 


Hope someone finds it useful!
_________________
My startup is Telesaur - a telecommuting job site.


Last edited by elchapin on Sat Mar 29, 2008 3:54 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
imapow



Joined: 13 Mar 2008
Posts: 155
Location: Trøndelag, Norway

PostPosted: Thu Mar 27, 2008 9:34 pm    Post subject: Reply with quote

thank u i've been loking for a good "tickler" program
i wil try it
_________________
-._.-¨¯¨-._.-IM@PΩW-._.-¨¯¨-._.-
Back to top
View user's profile Send private message
Display posts from previous:   
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