Messages - Ryan_S [ switch to compact view ]

Pages: [1] 2next
1
I don't have a problem with that.  :D

2
You might want to check where you added that code.

1 should be added as it's own subroutine. check that where you added it is below the calls at the top. it should be between "Gosub, wait" and "Showwindow:" approx line 46.

2 should be added to the READINI subroutine, the actual line is about 321, and the code should be between the READINI:
 and Return

3 should be added to the WRITEINI subroutine, the line is about 341, as above the code should be between WRITEINI: and Return

The "Gosub, WRITEINI" is just the call to that subroutine. If you add it where you did it will not be called every time that subroutine runs. That probably explains your problems.

3
N.A.N.Y. 2009 / Re: NANY 2009 Release: JustCloseSomeTasks
« on: January 21, 2009, 08:37 PM »
Found it's way to Lifehacker!

Good work!  :D

4
Finished Programs / Re: JustToDoIt - Fast ToDo lister
« on: January 17, 2009, 10:15 AM »
This script is doing what Axem used to do where it adds a separator after the 'Refresh' menu item every time it is opened. How did you fix it in Axem?

5
I wrote some code for starting scripts when Axem launches. It will save the checked scripts to the .ini file, when Axem is reloaded it will read the .ini file and restart all of the scripts that were running before.

I didn't have much time to test it so let me know what you think  :D
I'd like to add functionality to close the running subroutines when you exit Axem, didn't have time to get to this this morning.


Add "GoSub, RunStartup" after "GoSub, ShowWindow"

Add the RunStartup subroutine...
Code: AutoIt [Select]
  1. RunStartup:
  2.         ;--- StartupScripts ---
  3.         ;--- loops through the array and starts scripts if they are found ---
  4.         Loop %StartupScriptsCount% {
  5.                 scriptText = % StartupScripts%A_Index%
  6.                 ; --- search through list to find matches ---
  7.                 Loop % LV_GetCount() {
  8.                         LV_GetText(RetrievedText, A_Index)
  9.                         If InStr(RetrievedText, scriptText) {
  10.                                 LV_Modify(A_Index, "Check")  ; Check each row whose first field contains the filter-text.
  11.                         }
  12.                 }
  13.         }

Add the following code to the "READINI" subroutine...   
Code: AutoIt [Select]
  1. ;--- StartupScripts ---
  2.         StartupScriptsCount = 0
  3.         ;loop through ini and read in scripts
  4.         Loop {
  5.                 StartupScriptsCount += 1
  6.                 IniRead, StartupScripts%StartupScriptsCount%, %IniFile%, Startup, %A_Index%, -1
  7.                 If StartupScripts%StartupScriptsCount% = -1
  8.                         break
  9.         }

And add the following code to the "WRITEINI" subroutine...   
Code: AutoIt [Select]
  1. ;--- StartupScripts ---
  2.         IniDelete, %IniFile%, Startup   ;clear section to rewrite
  3.         ;--- create array with script text of all checked scripts ---
  4.         StartupScriptsCount = 0
  5.         Loop {
  6.                 RowNumber := LV_GetNext(RowNumber, "Checked")  ; Resume the search at the row after that found by the previous iteration.
  7.                 if not RowNumber  ; The above returned zero, so there are no more selected rows.
  8.                         break
  9.                 LV_GetText(Text, RowNumber)
  10.                 StartupScriptsCount += 1
  11.                 StartupScripts%StartupScriptsCount% = %Text%
  12.         }
  13.         ;--- loop through scripts and write list to ini file ---
  14.         Loop %StartupScriptsCount% {
  15.                 scriptText = % StartupScripts%A_Index%
  16.                 IniWrite, %scriptText%, %IniFile%, Startup, %A_Index%          
  17.         }

Pages: [1] 2next
Go to full version