AutoHotkey Community

It is currently May 27th, 2012, 5:14 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: December 14th, 2005, 6:10 pm 
I'm searching for TODO script? Something simple and to fit on desktop?
Script showing what to do, and then to delete message when double click on it.
I'm kinda newbie, so i'm asking for help? :oops:
I've red the faq, but it's too complicated for me to achive something like that. I found http://www.autohotkey.com/forum/viewtop ... 46&start=0 , i wanna have something more basic?
Sorry for my bad english.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2005, 6:17 pm 
Code:
---------------
|TODO list    |
|+ask for help|
|+reply       |
|             |
---------------

With no time of creation or deadline like in script above.
And then with double click strikeout the line which is finished.And to somehow erase the line which is striked.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2005, 8:31 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
Here's a simple ToDo script that docks to the desktop. Comment out the dock to desktop section if you prefer normal GUI behaviour.

Code:
; simple dock to desktop todo script by Serenity (c) 2005
; double-click on entry to edit, right-click on entry to delete, click on column header to create new entry

#singleinstance force
; #notrayicon

; check for settings.ini file, create it if it doesn't exist:
ifnotexist, settings.ini
  fileappend, [Position on Desktop]`nx=Center`ny=Center`n`n[Window Size]`nh=250`nw=175, settings.ini

; read docking location and gui size from ini file:
iniread, x, settings.ini, Position on Desktop, x
iniread, y, settings.ini, Position on Desktop, y
iniread, h, settings.ini, Window Size, h
iniread, w, settings.ini, Window Size, w

gui, font, s8 w700, tahoma
gui, +resize -caption +toolwindow ; toolwindow stops flicker of icon in taskbar
gui, add, listview, -E0x200 -LV0x10 -ReadOnly NoSort x1 y1 glist vlist, .:: ToDo :.

; read from todo.txt, create it if it doesn't exist:
ifnotexist, todo.txt
  fileappend, , todo.txt

fileread, data, todo.txt

; populate the listview:
loop, parse, data, `,
{
  if A_LoopField !=
    lv_add("",A_LoopField)
}

gui, show, x%x% y%y% h%h% w%w%

process, exist
pid = %errorlevel%

; dock to desktop:
winget, hw_gui, ID, ahk_class AutoHotkeyGUI ahk_pid %pid%
hw_desktop := DllCall( "FindWindowEx", "uint", 0, "uint", 0, "str", "Progman", "uint", 0 ) ; WorkerW Progman
DllCall( "SetParent", "uint", hw_gui, "uint", hw_gui )
; end of dock to desktop section

return


list:
row = %A_EventInfo% ; store this

if A_GuiEvent = ColClick ; the user has clicked on the header
{
  LV_Add("","new task")
}

if A_GuiEvent = DoubleClick
{
  iItem := (A_EventInfo-1)
  SendMessage, 0x1017, %iItem%, 0, SysListView321, ahk_pid %pid%
}

if A_GuiEvent = R ; double right-click
{
  LV_Delete(row)
  filedelete, todo.txt
  ; get the text from all the rows, delete the old todo.txt and create a new one:
  Loop % LV_GetCount()
  {
    LV_GetText(task,A_Index)
    fileappend, %task%`,, todo.txt
  }
}

if A_GuiEvent = e ; the user has finished editing the field
{
  filedelete, todo.txt
  ; get the text from all the rows, delete the old todo.txt and create a new one:
  Loop % LV_GetCount()
  {
    LV_GetText(task,A_Index)
    fileappend, %task%`,, todo.txt
  }
}
return

guisize:
guicontrol, move, list, % "W" (A_GuiWidth - 2) "H" (A_GuiHeight - 2)
; prevent the horizontal bar from showing:
colwidth := (A_GuiWidth-2)
LV_ModifyCol(1,colwidth)
return

guiclose:
exitapp

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2005, 8:58 pm 
Serenity thank you very much! That is what i'm looking for. I appreciate for your comments and so fast replying.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2005, 9:12 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
You're welcome. :D I enjoyed writing this script.

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2005, 11:01 pm 
AFAIK, AGU (AGermanUser) has provided a ToDo as well.
Viva la competicion :wink: [AHK ToDo-List v0.4.0]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2005, 11:49 pm 
In fact, TODO already found my little app. ;)

That was the link he posted in his first posting.
Thought my little TODO is a basic thing compared to some other ToDo List Apps. :mrgreen: You live and learn. ;)

In the early stages it was that simple. But it developed over the time.

This was the thread where all began:
http://www.autohotkey.com/forum/viewtopic.php?t=2358

btw. I continued developing on it in the past days.
I'll try to add this "group thing" which let's you create a group/project and let's you assign different tasks/ideas.

Cheers
AGU


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 15th, 2005, 12:00 am 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
I was using Rainlendar's ToDo list until today, I always felt it was too bloated. I like mine for its simplicity. :P

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 15th, 2005, 1:23 am 
Serenity i used Rainlander Todo list too, but now i found your script more practical! :)
If you are somehow going to update script, pls share it with us :).
Keep up the good work and bless ahk :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 15th, 2005, 4:38 pm 
I added ->
Code:
^enter::
InputBox, UserInput, What to do?, , 50, 300
if ErrorLevel <> 0
   return
else
LV_Add("",%UserInput%)
return

UserInput is not working it only add %UserInput% and not the right text, what i'm i doing wrong?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 15th, 2005, 5:37 pm 
Offline

Joined: November 28th, 2005, 4:34 pm
Posts: 10
Location: Michigan, USA
Too bad neither of the scripts have a GUI that is both movable and resizable. :(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 15th, 2005, 7:05 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
Rich wrote:
Too bad neither of the scripts have a GUI that is both movable and resizable. :(


If you remove -Caption from the gui options and comment out the dock to desktop section you will be able to move the window.

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 15th, 2005, 10:01 pm 
Offline

Joined: September 28th, 2005, 2:10 pm
Posts: 39
Location: Pirot
@TODO
Code:
LV_Add("",UserInput)

You'll need also to add 'FileAppend' to have the user input appear in the todo file.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 15th, 2005, 10:54 pm 
@dinkosta thx for help
here's the code
Code:
^enter::
InputBox, UserInput, What to do?, , 50, 300
if ErrorLevel <> 0
   return
else
{
  LV_Add("",UserInput)
  filedelete, todo.txt
  ; get the text from all the rows, delete the old todo.txt and create a new one:
  Loop % LV_GetCount()
  {
    LV_GetText(task,A_Index)
    fileappend, %task%`,, todo.txt
  }
}


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 16th, 2005, 8:40 pm 
Offline

Joined: November 28th, 2005, 4:34 pm
Posts: 10
Location: Michigan, USA
Thanks Serenity :)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], XstatyK, Yahoo [Bot] and 69 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group