 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Wed Feb 16, 2005 11:10 pm Post subject: |
|
|
its true there is not yet a control like what you want, however this is a way...
having a slider on the side that moves the controls for the checkbox edit and so on up and down is an effective way to get it done, but I have requested such a feature to chris. _________________ my lame sig  |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Thu Feb 17, 2005 12:40 am Post subject: |
|
|
there can be a different approach that's possible with what we already have... instead of many checkboxes try just one listbox. we can add or remove items to it dynamically from script. and use '8' in its options for the desired effect.
do try, you might like it. _________________
 |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Thu Feb 17, 2005 8:05 am Post subject: |
|
|
That option '8' is new, isn't it? That's a nice feature.
There is a way that you can add the checkboxes and buttons on the fly with a loop. But the problem arises from the fact that your buttons will have g-lables with an indey number, but you can't hold as many subroutines. (I have done this dynamic creation for one of my guis, but without buttons, just text and progressbars which get dynamical variables)
And what happens when the to-do-list gets long? Does the window then disappeer at the lower screen? I think that this should be avoided.
Therefor Rajats listbox is the best choice. You can even make it look like a multicolumn list. E.g. have (A)rchive, (D)one, (U)rgent in the first column, then the started date and the to be finished date. The last column can be a be column of variable length. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Thu Feb 17, 2005 5:19 pm Post subject: |
|
|
Like rajat said, manipulating all those check boxes is plenty more work than is has to be. I came up with this before I even thought of making a gui with all them checkboxes
| Code: | ; Generated using the SUPER DUPER SmartGUI Creator 3.3
Gui, Add, Edit, x6 y75 w170 h20, Edit
Gui, Add, ListBox, x6 y105 w170 h220, ListBox
Gui, Add, Button, x6 y325 w170 h30, Task Complete
Gui, Add, ListBox, x186 y75 w170 h240, Completed events
Gui, Add, Button, x186 y325 w170 h30, Achive Completed tasks
Gui, Add, Text, x6 y55 w100 h20, To Do Tasks:
Gui, Add, Text, x186 y55 w100 h20, Completed Events
Gui, Show, x305 y553 h377 w365, Generated using SmartGUI Creator 3.3
Return
GuiClose:
ExitApp |
I like the way this would work too, and its really simple _________________ my lame sig  |
|
| Back to top |
|
 |
AGU Guest
|
Posted: Fri Feb 18, 2005 12:20 am Post subject: |
|
|
I read all your posts. Very interesting. I can't find anything about this option 8. What's that? Do you have an example script or anything else to study?
@Invalid User
Nice GUI. But I thought of just one single listbox which is filled dynamically at the start of the script. Possible?
@toralf
Indeed it can and shall happen that the list gets longer than the listbox. In this case I would like to have a scrollbar. Is that possible? I thought this app should hold not just tasks, but also ideas and thoughts which come to my mind when sitting at my computer. In order to not forget it in the next second I want a hotkey to save it very fast. Sounds kind'o'weard, heh?
Hey, it comes to my mind. Why not 3 tabs in the GUI. Tab "Ideas", "Tasks", Thoughts". Maybe this is s.th for later.
But let me discribe what I mean. (some very, very basic PAP )
I start the script. A Loop or s.th similar scans the semicolon seperated textfile for all lines with either the Now/Archive Attribute. At start that should be all lines with "now" attribute. E.g.
| Code: | | N;mow lawn;18.02.05 17:00;20.02.05 20:00 |
With the results of the scan the listbox should be filled with these entries.
Pushing the "Now" or "Archive" Button should call a similar loop that does the same according to the wanted attribute lines.
To add a new task, there should be some hotkey that opens a new window where I can add all the data for a new task.
When I close this window it should refresh the display of the entries in the listbox.
The listbox should not display the date of creation. Nevertheless it should be saved in the textfile. I'm not sure about what should be displayed beside the tasks.
There should also be a button which moves the marked entry to the archive at once and refreshes the listbox.
Another button to display the additional information of a marked entry.
That's what I thought about until now. Of course I'm still open to other approaches and solutions. |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Fri Feb 18, 2005 2:15 am Post subject: |
|
|
| Code: |
; Generated using SmartGUI Creator 3.4
Gui, Add, ListBox, x6 y7 w110 h140 8, Item1|Item2|Item3|Item4
Gui, Add, Button, x6 y147 w110 h20, Add ToDo Item
Gui, Add, Button, x6 y177 w110 h20, Remove ToDo Item
Gui, Show, x422 y304 h211 w121, Generated using SmartGUI Creator 3.4
GuiControl, Choose, ListBox1, 2
GuiControl, Choose, ListBox1, 4
Return
GuiClose:
ExitApp
|
this should give you an idea. _________________
 |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Fri Feb 18, 2005 5:23 am Post subject: |
|
|
All that needs to be done is.... well you said you didnt want anyone doing it ALL for you so....
But this might give you some ideas and something to go off of, I am gonna finish this and post it when its completly done | Code: |
Gui, Add, Tab, x6 y25 w460 h340, Ideas|Tasks|Thoughts
Gui, Add, Button, gEnterNewIdea x356 y55 w100 h30, Enter New Idea
Gui, Add, Edit, vIdeaContents x16 y55 w330 h30, IdeaContents
Gui, Add, ListBox, vCurrentIdeas x16 y95 w200 h260, Current Ideas
Gui, Add, ListBox, vOldIdea x256 y95 w200 h253, Old Ideas
Gui, Add, Button, gMakeOldIdea x226 y205 w20 h30, >>
;----TASKS-----
Gui, Tab, Tasks
Gui, Add, Button, gCreateNewTask x356 y55 w100 h30, Create New Task
Gui, Add, ListBox, vTasksToDo x16 y105 w220 h260 HScroll VScroll, TasksToDo
Gui, Add, ListBox, vCompletedTasks x236 y105 w220 h260 HScroll VScroll, CompletedTasks
Gui, Add, Text, x16 y85 w70 h20, Things to do
Gui, Add, Button, gTaskComplete x86 y85 w80 h20, Task Complete
Gui, Add, Button, x166 y85 w70 h20, Details
Gui, Add, Text, x236 y85 w100 h20, Things I've done
Gui, Add, Button, x336 y85 w120 h20, Archive
Gui, Tab, Thoughts
Gui, Add, Edit, x16 y55 w440 h260, My Thoughts
Gui, Add, Button, x246 y325 w100 h30, Remember this
Gui, Add, Button, x356 y325 w100 h30, Past Thoughts
Gui, Show, x460 y252 h377 w477, MemoryKeeper
Return
;-------------Create New Task Gui-------------
#c::
CreateNewTask:
Gui, 2:Add, ComboBox, vTaskName x16 y15 w140 h20, TaskName
Gui, 2:Add, DropDownList, x16 y75 w100 h20, Month||Jan|Feb|Mar|Arp|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
Gui, 2:Add, DropDownList, x116 y75 w100 h20, Day||1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
Gui, 2:Add, DropDownList, x216 y75 w100 h20, Hour||0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|
Gui, 2:Add, DropDownList, x316 y75 w100 h20, Min||0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59
Gui, 2:Add, GroupBox, x6 y55 w420 h50, Due Date
Gui, 2:Add, Edit, x16 y125 w400 h20, TaskDescription
Gui, 2:Add, Edit, x16 y155 w400 h220, TaskDetail
Gui, 2:Add, Button, gUpdateTasks x16 y385 w140 h30, Create/UpDate This task
Gui, 2:Show, x409 y364 h423 w436, Manager - New Task
Return
;----------Updates Tasks to do list-------------
UpdateTasks:
Gui, 2:Submit
MsgBox, 4,, Are you sure you want to add %TaskName% to the Tasks-to-do list?
IfMsgBox, NO, Return
GuiControl, 1:, TasksToDo, %TaskName%||
Gui, 2:Destroy
Return
;---------------Makes a new Idea-------------------
EnterNewIdea:
GuiControlGet, IdeaContents,, IdeaContents
GuiControl,, CurrentIdeas, %IdeaContents%
GuiControl,, IdeaContents,
Return
;----------------Makes a current idea an old idea
MakeOldIdea:
GuiControlGet, CurrentIdeas,, CurrentIdeas
GuiControl,, OldIdea, %CurrentIdeas%
ControlGet, SelectedNewToOldIdea, FindString, %CurrentIdeas%, ListBox1, MemoryKeeper
Control, Delete, %SelectedNewToOldIdea%, ListBox1, MemoryKeeper
Return
;---------------indicates a task has been completed so move it to the completed list--------------
TaskComplete:
GuiControlGet, TasksToDo,, TasksToDo
GuiControl,, CompletedTasks, %TasksToDo%
ControlGet, SelectedNewToOldTask, FindString, %TasksToDo%, Listbox3, MemoryKeeper
Control, Delete, %SelectedNewToOldTask%, ListBox3, MemoryKeeper
Return
GuiClose:
ExitApp
#r::
Reload |
_________________ my lame sig  |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Fri Feb 18, 2005 8:26 am Post subject: |
|
|
@AGU: Read the manual regarding option 8 for listboxes (it is in the section of "Multi" option for ListBox)
- Scrollbar - possible - is automatically activated, when mre items are in a list then can be displayed. (again: see GUI manual)
- Consider to do a pipe "|"separated textfile, then you could use the semicolon also in the text of the idea.
- Yes, the list can be filled with data from a file at start time.
- Yes, all of these button tasks are possible.
- To have full control of what is in a listbox, use an array of tasks. Each task is a semicolon of pipe separated string. The substrings can hold all data that needs to be stored. Only some of these substrings are displayed in the list.
- The advantage of an array is that you can move items up and down the list(difficult with strings), add and delete them easily and make a loop over them (e.g. for storing). Although a string is nice for sorting items. But you can always switch between a string and an array. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Sat Feb 19, 2005 8:08 pm Post subject: |
|
|
A few more Bonus prizes and this is done _________________ my lame sig  |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Sun Feb 20, 2005 5:56 am Post subject: |
|
|
Ok, My version of this solution is done, Save the first portion as what ever you want, where ever you want and Save the Second Portion in that same location under the name MKTips.ahk, I suggest that you do this on a 3.5 Floppy cus then you can take your thoughts with you to any pc (according it has a 3.5 drive and you have access to it) you want. Yall lemme know what you think. By the way I know there are a few limitations to it but I think it will serve the forgetful and/or the to-fast-of-thinker-for-his-own-good types. Enjoy | Code: | ;NOTES
;
;
;
;
;
;
;
;-------------------AUTO EXECUTE SECTION BEGIN-------------------
Run, MKTips.ahk, %A_ScriptDir%
Blank =
;--------------------USER SETTINGS END---------------------------
IfNotExist, %A_ScriptDir%\Ideas\
{
MsgBox, the folder Ideas could not be found. `nIt will be created.
FileCreateDir, %A_ScriptDir%\Ideas\
}
IfNotExist, %A_ScriptDir%\Tasks\
{
MsgBox, the folder Tasks could not be found. `nIt will be created.
FileCreateDir, %A_ScriptDir%\Tasks\
}
IfNotExist, %A_ScriptDir%\Thoughts\
{
MsgBox, the folder Thoughts could not be found. `nIt will be created.
FileCreateDir, %A_ScriptDir%\Thoughts\
}
;----------------------------------
IfNotExist, %A_ScriptDir%\Ideas\Current_Ideas.ini
{
MsgBox, The file Current Idea could not be found. `nIt will be created.
FileAppend,%Blank%, %A_ScriptDir%\Ideas\Current_Ideas.ini
}
IfNotExist, %A_ScriptDir%\Ideas\Old_Ideas.ini
{
MsgBox, The file Old Ideas could not be found. `nIt will be created.
FileAppend,%Blank%, %A_ScriptDir%\Ideas\Old_Ideas.ini
}
IfNotExist, %A_ScriptDir%\Tasks\Current_Tasks.ini
{
MsgBox, The file Current Tasks could not be found. `nIt will be created.
FileAppend,%Blank%, %A_ScriptDir%\Tasks\Current_Tasks.ini
}
IfNotExist, %A_ScriptDir%\Tasks\Old_Tasks.ini
{
MsgBox, The file Old Tasks could not be found. `nIt will be created.
FileAppend,%Blank%, %A_ScriptDir%\Tasks\Old_Tasks.ini
}
IfNotExist, %A_ScriptDir%\Tasks\Archive.ini
{
MsgBox, The file Archive could not be found. `nIt will be created.
FileAppend,%Blank%, %A_ScriptDir%\Tasks\Archive.ini
}
IfNotExist, %A_ScriptDir%\Tasks\Details.ini
{
MsgBox, The file Details could not be found. `nIt will be created.
FileAppend,%Blank%, %A_ScriptDir%\Tasks\Details.ini
}
IfNotExist, %A_ScriptDir%\Thoughts\Past_Thoughts.ini
{
MsgBox, The file Past Thoughts could not be found. `nIt will be created.
FileAppend,%Blank%, %A_ScriptDir%\Thoughts\Past_Thoughts.ini
}
;------------MAIN GUI------------
Menu, FileMenu, Add, E&xit, Exit
Menu, Actions, Add, Make New Task, CreateNewTask
Menu, AboutMenu, Add, &About, About
Menu, OptionsMenu, Add, &Options, Options
Menu, MyMenuBar, Add, &File, :FileMenu ; Attach the two sub-menus that were created above.
Menu, MyMenuBar, Add, &Actions, :Actions
Menu, MyMenuBar, Add, &Options, :OptionsMenu
Menu, MyMenuBar, Add, A&bout, :AboutMenu
Gui, Menu, MyMenuBar
Gui, Add, Tab, x6 y25 w460 h340, Ideas|Tasks|Thoughts
Gui, Add, Button, gEnterNewIdea x356 y55 w100 h30, Enter New Idea
Gui, Add, Edit, vIdeaContents x16 y55 w330 h30 WantReturn,
Gui, Add, ListBox, vCurrentIdeas x16 y95 w200 h260 HScroll,
Gui, Add, ListBox, vOldIdea x256 y95 w200 h253 HScroll,
Gui, Add, Button, gMakeOldIdea x226 y205 w20 h30, >>
;----TASKS-----
Gui, Tab, Tasks
Gui, Add, Button, gCreateNewTask vCreateNewTask x356 y55 w100 h30, Create New Task
Gui, Add, ListBox, vTasksToDo x16 y105 w220 h260 HScroll VScroll,
Gui, Add, ListBox, vCompletedTasks x236 y105 w220 h260 HScroll VScroll,
Gui, Add, Text, x16 y85 w70 h20, Things to do
Gui, Add, Button, gTaskComplete x86 y85 w80 h20, Task Complete
Gui, Add, Button, gTaskDetailsShow x166 y85 w70 h20, Details
Gui, Add, Text, x236 y85 w100 h20, Things I've done
Gui, Add, Button, gArchive x336 y85 w120 h20, Archive
;----Thoughts-----
Gui, Tab, Thoughts
Gui, Add, Edit, vMyThought x16 y55 w440 h260,
Gui, Add, Button, gRememberThought x246 y325 w100 h30, Remember this
Gui, Add, Button, gShowPastThoughts x356 y325 w100 h30, Past Thoughts
;----------Read information that was saved--------
Loop, Read, %A_ScriptDir%\Ideas\Current_Ideas.ini
{
GuiControl,, CurrentIdeas, %A_LoopReadLine%
}
Loop, Read, %A_ScriptDir%\Ideas\Old_Ideas.ini
{
GuiControl,, OldIdea, %A_LoopReadLine%
}
Loop, Read, %A_ScriptDir%\Tasks\Current_Tasks.ini
{
GuiControl,, TasksToDo, %A_LoopReadLine%
}
Loop, Read, %A_ScriptDir%\Tasks\Old_Tasks.ini
{
GuiControl,, CompletedTasks, %A_LoopReadLine%
}
LinesMax = 0
Loop, Read, %A_ScriptDir%\Thoughts\Past_Thoughts.ini
{
LinesMax += 1
}
FileReadLine, LastThought, %A_ScriptDir%\Thoughts\Past_Thoughts.ini, %LinesMax%
;----------Show Main Gui With "remembered" info--------
Gui, Show, x460 y252 h377 w477, MemoryKeeper
Return
;-------------Create New Task Gui-------------
#c::
CreateNewTask:
GuiControl, 1:Disable, CreateNewTask
Gui, 2:Add, ComboBox, vTaskName x16 y15 w140 h120, TaskName
Gui, 2:Add, Button, x170 y15 w40 h20 gEditTask, Edit
Gui, 2:Add, DropDownList, vMonth x16 y75 w100 h120, Month||Jan|Feb|Mar|Arp|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
Gui, 2:Add, DropDownList, vDay x116 y75 w100 h120, Day||1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
Gui, 2:Add, DropDownList, vHour x216 y75 w100 h120, Hour||0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|
Gui, 2:Add, DropDownList, vMin x316 y75 w100 h120, Min||0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59
Gui, 2:Add, GroupBox, x6 y55 w420 h50, Due Date
Gui, 2:Add, Edit, vTaskDescription x16 y125 w400 h20, TaskDescription
Gui, 2:Add, Edit, vTaskDetail x16 y155 w400 h220, TaskDetail
Gui, 2:Add, Button, gUpdateTasks x16 y385 w140 h30, Create/UpDate This task
Gui, 2:Show, x409 y364 h423 w436, Manager - New Task
ControlGet, TaskListU, List,, ListBox3, MemoryKeeper
Loop, Parse, TaskListU, `n
{
GuiControl, 2:, TaskName, %A_LoopField%
}
Return
;----------Updates Tasks to do list/Creates new task-------------
UpdateTasks:
Gui, 2:Submit
ControlGet, ExistingTasks, List,, ListBox3, MemoryKeeper
If TaskName =
{
MsgBox, 0, NewTask, In order to create a new task it MUST have a name
Goto, NoNewTask
}
IfMsgBox, NO, Goto, NoNewTask
If ExistingTasks contains %TaskName%
{
MsgBox, 4, Task Name Error, That task already exists. Would you like to Overwrite it?
IfMsgBox, NO, Goto NoNewTask
IfMsgBox, YES
{
ControlGet, TaskOV, FindString, %TaskName%, ListBox3, MemoryKeeper
Control, Delete, %TaskOV%, ListBox3, MemoryKeeper
}
}
MsgBox, 4,, Are you sure you want to add %TaskName% to the Tasks-to-do list?
IfMsgBox, NO, Goto, NoNewTask
ControlGet, ExistingTaskList, List,, ComboBox1, Manager - New Task
If ExitingTaskList not contains %TaskName%
{
GuiControl, 2:, TaskName, %TaskName%
}
GuiControl, 1:, TasksToDo, %TaskName%||
IniWrite, %TaskName%|%Month%|%Day%|%Hour%|%Min%|%TaskDescription%|%TaskDetail%, %A_ScriptDir%\Tasks\Details.ini, Details, %TaskName%
NoNewTask:
2GuiClose:
Gui, 2:Destroy
GuiControl, 1:Enable, CreateNewTask
Return
;--------Edits a existing Task-----------
EditTask:
GuiControlGet, TaskToEdit, 2:, TaskName
IniRead, TaskInfo, %A_ScriptDir%\Tasks\Details.ini, Details, %TaskName%
StringSplit, TaskArray, TaskInfo, `|
GuiControl, Text, TaskDescription, %TaskArray6%
GuiControl, Text, TaskDetail, %TaskArray7%
GuiControl, ChooseString, Month, %TaskArray2%
GuiControl, ChooseString, Day, %TaskArray3%
GuiControl, ChooseString, Hour, %TaskArray4%
GuiControl, ChooseString, Min, %TaskArray5%
Return
;---------------Makes a new Idea-------------------
EnterNewIdea:
GuiControlGet, IdeaContents,, IdeaContents
GuiControl,, CurrentIdeas, %IdeaContents%
GuiControl,, IdeaContents,
Return
;----------------Makes a current idea an old idea
MakeOldIdea:
GuiControlGet, CurrentIdeas,, CurrentIdeas
GuiControl,, OldIdea, %CurrentIdeas%
ControlGet, SelectedNewToOldIdea, FindString, %CurrentIdeas%, ListBox1, MemoryKeeper
Control, Delete, %SelectedNewToOldIdea%, ListBox1, MemoryKeeper
Return
;---------------indicates a task has been completed so move it to the completed list--------------
TaskComplete:
GuiControlGet, TasksToDo,, TasksToDo
GuiControl,, CompletedTasks, %TasksToDo%
ControlGet, SelectedNewToOldTask, FindString, %TasksToDo%, Listbox3, MemoryKeeper
Control, Delete, %SelectedNewToOldTask%, ListBox3, MemoryKeeper
Return
;---------About MemoryKeeper--------
About:
MsgBox, 0, About, MemoryKeeper is Free to all... use, edit, destroy, I dont care. enjoy
Return
;-----------Options Gui------------
Options:
MsgBox, 0, Options, If you would like options make them yourself, I fell kinda short on time in this area, sorry.
Return
;---------Shows Details of the selected Task In current tasks
TaskDetailsShow:
GuiControlGet, TasksToDo
IniRead, TaskDetails, %A_ScriptDir%\Tasks\Details.ini, Details, %TasksToDo%
StringSplit, TaskDetailsArray, TaskDetails, `|
MsgBox, 0, %TasksToDo% Details, Task Name: %TaskDetailsArray1% `nDue Date on: %TaskDetailsArray2%, %TaskDetailsArray3% At Hour %TaskDetailsArray4%, Min %TaskDetailsArray5% `nShort Discription: %TaskDetailsArray6% `nFurther Details: %TaskDetailsArray7%
Return
;--------------Archives the completed tasks-----------------
Archive:
ControlGet, TasksToArchive, List,, ListBox4, MemoryKeeper
Loop, Parse, TasksToArchive, `n
{
FileAppend, %A_LoopField%`n, %A_ScriptDir%\Tasks\Archive.ini
ControlGet, ListItem, FindString, %A_LoopField%, ListBox4, MemoryKeeper
Control, Delete, %ListItem%, ListBox4, MemoryKeeper
}
Return
;-------------Saves the thought----------
RememberThought:
GuiControlGet, MyThought
FileAppend, %MyThought%`n, %A_ScriptDir%\Thoughts\Past_Thoughts.ini
Return
;------------Show Past thoughts----------
ShowPastThoughts:
ReadLine = 1
Gui, 3:Add, Edit, vDisplay ReadOnly w300 h300
Gui, 3:Add, Button, gLast y305 x10,Last
Gui, 3:Add, Button, gNext y305 x50,Next
Gui, 3:Show, w320 h340, Past Thoughts
Return
Last:
ReadLine -= 1
If ReadLine < 1
{
ReadLine = 1
}
FileReadLine, Thought, %A_ScriptDir%\Thoughts\Past_Thoughts.ini, %ReadLine%
GuiControl, 3:,Display, %Thought%
Return
Next:
ReadLine += 1
FileReadLine, Thought, %A_ScriptDir%\Thoughts\Past_Thoughts.ini, %ReadLine%
GuiControl, 3:,Display, %Thought%
Return
3GuiClose:
Gui, 3:Destroy
Return
;-----------At Exit Write all contents to disk(save)------------
ExitSub:
Exit:
GuiClose:
MsgBox, 4, Exit, Do you really want to Quit?
IfMsgBox, NO, Return
FileDelete, %A_ScriptDir%\Ideas\Current_Ideas.ini
FileDelete, %A_ScriptDir%\Ideas\Old_Ideas.ini
FileDelete, %A_ScriptDir%\Tasks\Current_Tasks.ini
FileDelete, %A_ScriptDir%\Tasks\Old_Tasks.ini
FileDelete, %A_ScriptDir%\Thoughts\Past_Thoughts.ini
ControlGet, List1, List,, ListBox1, MemoryKeeper
Loop, Parse, List1, `n
{
FileAppend, %A_LoopField%`n, %A_ScriptDir%\Ideas\Current_Ideas.ini
}
ControlGet, List2, List,, ListBox2, MemoryKeeper
Loop, Parse, List2, `n
{
FileAppend, %A_LoopField%`n, %A_ScriptDir%\Ideas\Old_Ideas.ini
}
ControlGet, List3, List,, ListBox3, MemoryKeeper
Loop, Parse, List3, `n
{
FileAppend, %A_LoopField%`n, %A_ScriptDir%\Tasks\Current_Tasks.ini
}
ControlGet, List4, List,, ListBox4, MemoryKeeper
Loop, Parse, List4, `n
{
FileAppend, %A_LoopField%`n, %A_ScriptDir%\Tasks\Old_Tasks.ini
}
GuiControlGet, MyThought
FileAppend, %MyThought%`n, %A_ScriptDir%\Thoughts\Past_Thoughts.ini
ExitApp
|
| Code: |
RestartTip:
Loop
{
WinGetActiveTitle, ActiveTitle
If ActiveTitle = MemoryKeeper
{
MouseGetPos,,,, ControlUnder
If ControlUnder = Edit1
{
Sleep, 1000
ToolTip, Text of new Idea
Loop
{
MouseGetPos,,,, Under
If Under <> Edit1
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = Button1
{
Sleep, 1000
ToolTip, Adds an Idea the to Current Ideas List
Loop
{
MouseGetPos,,,, Under
If Under <> Button1
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = ListBox2
{
Sleep, 1000
ToolTip, Old Idea
Loop
{
MouseGetPos,,,, Under
If Under <> ListBox2
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = Button2
{
Sleep, 1000
ToolTip, Makes Selected Current Idea and Old Idea
Loop
{
MouseGetPos,,,, Under
If Under <> Button2
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = Button3
{
Sleep, 1000
ToolTip, Sets up a New Task
Loop
{
MouseGetPos,,,, Under
If Under <> Button3
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = Button4
{
Sleep, 1000
ToolTip, Makes Selected Current Task to the Completed List
Loop
{
MouseGetPos,,,, Under
If Under <> Button4
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = Button5
{
Sleep, 1000
ToolTip, Shows details of the Selected Task
Loop
{
MouseGetPos,,,, Under
If Under <> Button5
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = ListBox3
{
Sleep, 1000
ToolTip, Current/Incomplete Tasks
Loop
{
MouseGetPos,,,, Under
If Under <> ListBox3
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = ListBox4
{
Sleep, 1000
ToolTip, Completed Tasks
Loop
{
MouseGetPos,,,, Under
If Under <> ListBox4
{
ToolTip
Gosub, RestartTip
}
}
}
If ControlUnder = Button6
{
Sleep, 1000
ToolTip, Clears and Archived the Completed Tasks
Loop
{
MouseGetPos,,,, Under
If Under <> Button6
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = Edit2
{
Sleep, 1000
ToolTip, Edit Box for your Thoughts
Loop
{
MouseGetPos,,,, Under
If Under <> Edit2
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = Button7
{
Sleep, 1000
ToolTip, Saves this thought
Loop
{
MouseGetPos,,,, Under
If Under <> Button7
{
ToolTip
GoSub, RestartTip
}
}
}
If ControlUnder = Button8
{
Sleep, 1000
ToolTip, Shows Archive of Past Thoughts
Loop
{
MouseGetPos,,,, Under
If Under <> Button8
{
ToolTip
GoSub, RestartTip
}
}
}
}
IfWinNotExist, MemoryKeeper
{
ExitApp
}
}
ExitApp |
Sorry they are so messy but you can hack em apart or do what ever it is you do with these danm things _________________ my lame sig  |
|
| Back to top |
|
 |
AGU Guest
|
Posted: Sun Feb 20, 2005 2:51 pm Post subject: |
|
|
Hey man, thanks. Great job.
Hadn't much time this week. But I promise I'll look through all of the lines and try to understand what you did. And of course I'll let you know what I think.
Thanks again for all your work. |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Sun Feb 20, 2005 3:05 pm Post subject: |
|
|
Hey not a problem, But there is some limits to it cus frankly I started getting bored of the task. Example, there is no feature for rightclicking and deleting, editing, move to this other list...etc.
any other odd job you want done, I am kinda laid off right now...so I have some time. I am no expert but I seem to get by _________________ my lame sig 
Last edited by Invalid User on Sun Feb 20, 2005 3:08 pm; edited 1 time in total |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sun Feb 20, 2005 3:06 pm Post subject: |
|
|
@ guys
am I'm right that your system responds AHK's A_ScreenWidth with something > 12.000 p
That post would be unaccesible without using the horizontal scrollbar
"Mr. 800x600" (AFKAR = artist formerly known as Rajat) will be entitled to blame you for that on the next Asian AHK summit  |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Sun Feb 20, 2005 3:10 pm Post subject: |
|
|
Ok I am really confused BoBO, is that post on the right thread? _________________ my lame sig  |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Sun Feb 20, 2005 3:19 pm Post subject: |
|
|
@Invalid:
Nice job, still I have some comments:
- Why do you have all these subdirectories? Only one ini file will be placed in them. I think it is not neccessary to have the subdirectories.
- When you read the ini files you immediately add them to the listboxes, And when you save them you have to use GuiControlGet. The problem is that AGU wants to save more data to the inis then is displayed in the list. And if you want to change the order of the items in the lists, it will be pretty difficult. I would recommend to read the inis into a string first. That string you can assign (or part of it) to the listbox, and do all kind of manipulation on it. So instead of addding a new item to the list directly, you add it to the string and that gets into the listbox. For saving you just put the string into the files 8without loosing the part that isn't shown in the listbox). And you do not have to worry about getting the control content.
Just my 2 cents _________________ Ciao
toralf  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|