Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2012-02-23_03-53-57

  • Loading branch information...
commit 3818d0d6b56de595ef56fb560710c75c7e304466 1 parent 13d2351
@camerb authored
View
19 FireflyFeesBot.ahk
@@ -1,5 +1,6 @@
#include FcnLib.ahk
#include firefly-FcnLib.ahk
+#singleinstance force
assignGlobals()
bot:=true
@@ -12,7 +13,7 @@ iniFolder:=GetPath("FireflyIniFolder")
FireflyCheckin("Bot", "Started/Chillin")
;REMOVEME before moving live
-;addtotrace("started bot")
+addtotrace("started bot")
;displayableIniFolder(inifolder)
;SleepMinutes(99)
@@ -27,7 +28,10 @@ Loop, parse, uiSections, CSV
{
thisFee:=A_LoopField
+ FireflyCheckin("Bot", "Working")
+
;checking if already added
+ ;addtotrace("checking if fee is already added")
if IsFeeAddedCorrectly(thisReferenceNumber, thisFee)
continue
@@ -35,24 +39,33 @@ Loop, parse, uiSections, CSV
;if ( Mod(feesAddedCountSoFar, 5) == 0)
RefreshLogin()
ArrangeWindows()
+ ;addtotrace("opening ref num")
OpenReferenceNumber(thisReferenceNumber)
+ ;addtotrace("getting fees")
GetFees()
;checking if already added
+ ;addtotrace("checking if fee is already added")
if IsFeeAddedCorrectly(thisReferenceNumber, thisFee)
continue
+ addtotrace("looking at new fee - grey line")
+ addtotrace(thisreferencenumber)
+ addtotrace(thisfee)
+ addtotrace("adding the fee")
+
;add the friggin fee!
thisKeySubmitted=DesiredFees-%thisFee%
desiredAmount:=IniFolderRead(iniFolder, thisReferenceNumber, "DesiredFees-" . thisFee)
AddFees(thisFee, desiredAmount)
IniFolderWrite(iniFolder, thisReferenceNumber, "BotAddedFee-" . thisFee, desiredAmount)
+ addtotrace("getting fees")
GetFees()
feesAddedCountSoFar++
- ;msg=Added %feesAddedCountSoFar% fees so far
- ;AddToTrace(msg)
+ msg=Added %feesAddedCountSoFar% fees so far
+ AddToTrace(msg)
;iniPP("Bot Is Working")
;checkin
View
BIN  ForceReloadAll.exe
Binary file not shown
View
4 Lynx-ProcedureParts.ahk
@@ -67,7 +67,8 @@ SendLogsHome()
;try to send it back using MS-ftp
joe := GetLynxPassword("ftp")
- ftpFilename=ftp.scr
+ ftpFilename=ftp.txt
+
ftpfile=
(
open lynx.mitsi.com
@@ -78,6 +79,7 @@ put %logFileFullPath2% %reasonForScript%_logs/%timestamp%-checkdb.txt
put %logFileFullPath3% %reasonForScript%_logs/%timestamp%-installall.txt
quit
)
+
FileCreate(ftpfile, ftpFilename)
ret:=CmdRet_RunReturn("ftp -s:" . ftpFilename)
;notify("finished ftp connection")
View
18 Persistent.ahk
@@ -719,6 +719,13 @@ if (A_ComputerName = "BAUSTIANVM" and Mod(A_Sec, 5)==0)
VerifyFireflyCheckin("Helper")
Sleep, 1200
}
+
+;getting some info about the AHK processes that are running currently
+if (A_ComputerName = "BAUSTIANVM" and A_Sec=42)
+{
+ HowManyAhks()
+ SleepSeconds(1)
+}
;}}}
;{{{ Continual backups
@@ -758,8 +765,8 @@ VerifyFireflyCheckin(whoIsCheckingIn)
{
;if bot or helper haven't said hi within a certain period of time, kill them and restart them
- FailedCheckinTime := CurrentTime() - 1000
- ;FailedCheckinTime := CurrentTime() - 500
+ ;FailedCheckinTime := CurrentTime() - 1000
+ FailedCheckinTime := CurrentTime() - 500
;FailedCheckinTime := CurrentTime() - 200
;addtotrace(currenttime())
;addtotrace(failedcheckintime)
@@ -770,17 +777,18 @@ VerifyFireflyCheckin(whoIsCheckingIn)
if (lastCheckin < FailedCheckinTime)
{
- debugmsg:="killing unresponsive bot 2m w exitapp"
+ debugmsg:="killing unresponsive bot"
iniPP(debugmsg)
addtotrace(debugmsg)
+ HowManyAhks()
;SaveScreenShot("FireflyBotFroze", "dropbox") ;UNCOMMENTME before moving live
;TODO figure out exactly what works best here...
; seems like we can't reboot the compy all the friggin time
;Run, restart.ahk
- ;Run, ForceReloadAll.exe
+ Run, ForceReloadAll.exe
;CloseAllAhks("", "AutoHotkey.ahk")
- CloseAllAhks("AutoHotkey.ahk") ;seemed ok, but gave a lot of dead processes
+ ;CloseAllAhks("AutoHotkey.ahk") ;seemed ok, but gave a lot of dead processes
Reload
Sleep, 5000
View
12 cliprun.ahk
@@ -1,9 +1,5 @@
-#include FcnLib.ahk
-
-205.6
-217
-219
-201.4
-
-
+#include FcnLib.ahk
+
+2668598
+
~esc::ExitApp
View
47 firefly-FcnLib.ahk
@@ -638,6 +638,13 @@ DisplayableIniFolder(iniFolder)
Loop, parse, keys, CSV
{
thisKey := A_LoopField
+
+ if NOT thisKey
+ {
+ ;FIXME what the heck!? the key should never be null... make this less ghetto
+ ;errord("notimeout", iniFolder, thisSection, thisKey)
+ continue
+ }
;blah
value := IniFolderRead(iniFolder, thisSection, thisKey)
IniWrite(destIni, thisSection, thisKey, value)
@@ -707,6 +714,8 @@ IniFolderListAllSections(iniFolder)
returned .= IniListAllSections(thisIniFile)
}
+ ;TODO remove duplicates
+
return returned
}
@@ -729,8 +738,46 @@ IniFolderListAllKeys(iniFolder, section="") ;defaults to all sections
;haystack=\((%notParen%+)\)\-\(%notParen%+\)
;returned := RegExReplace(returned, haystack, "$1")
;returned := RegExReplace(returned, "\-(value|timestamp)$")
+
+ ;FIXME make this a little less ghetto, so that I can use "-value" and "-timestamp" in my keys
returned := RegExReplace(returned, "\-(value|timestamp)")
+ ;TODO remove duplicates
+
return returned
}
;}}}
+
+;{{{ debugging to see how many ahks are running
+HowManyAhks()
+{
+ DetectHiddenWindows On ; Allows a script's hidden main window to be detected.
+ SetTitleMatchMode 2 ; Avoids the need to specify the full path of the file below.
+
+ ;returned:=false
+ WinGet, id, LIST, - AutoHotkey
+ Loop, %id%
+ {
+ count++
+ thisID:=id%A_Index%
+ ahkIdStr=ahk_id %thisID%
+ title:=wingettitle(ahkIdStr)
+
+ allTitles .= "`n" . title
+ ;regexmatch(title, "([A-Za-z0-9]*\.ahk)", smalltitle)
+ ;pid := WinGet("pid", ahkIdStr)
+
+ ;if NOT InStr(title, A_ScriptName) AND NOT RegExMatch(title, ExcludeRegEx)
+ ;{
+ ;returned:=true
+ ;if InStr(options, "graceful")
+ ;WinClose, %ahkIdStr%
+ ;if InStr(options, "forceful")
+ ;Process, Close, %pid%
+ ;}
+ }
+ ;debug("this many ahks", count, allTitles)
+ msg=found %count% ahks running
+ addToTrace(msg, allTitles)
+}
+;}}}
View
8 fireflyButtons.ahk
@@ -68,17 +68,13 @@ Gui, +LastFound -Caption +ToolWindow +AlwaysOnTop
;Gui, Color, 000032
Gui, Add, Button, , Reload Queue
Gui, Add, Button, , Change Queue
-;Gui, Add, Button, , Add Scorecard Entry-fcn
-;Gui, Add, Button, , Add Scorecard Entry-st
-;Gui, Add, Button, , Add Scorecard Entry-mf
-;Gui, Add, Button, , Add Scorecard Entry-sc
;Gui, Add, Button, , Add Scorecard Entry-new
-Gui, Add, Button, , Add Scorecard Entry-fw
+;Gui, Add, Button, , Add Scorecard Entry-fw
Gui, Add, Button, , Add Scorecard Entry-yn
Gui, Add, Button, , Refresh Login
Gui, Add, Button, , Load Reference Number
Gui, Add, Button, , Add Fees
-Gui, Add, Button, , Fetch RefNums Csv
+;Gui, Add, Button, , Fetch RefNums Csv
Gui, Add, Button, x10 y230, Record for Cameron
Gui, Add, Button, x10 y260, Test Something
View
6 scheduled/BAUSTIAN-09PC/Finished/20120222090036.ahk
@@ -0,0 +1,6 @@
+#include FcnLib.ahk
+
+
+SaveScreenShot("RemoteRequest")
+#include FcnLib.ahk
+FileMove("C:\Dropbox\AHKs\scheduled\BAUSTIAN-09PC\Running\20120222090036.ahk", "C:\Dropbox\AHKs\scheduled\BAUSTIAN-09PC\Finished\20120222090036.ahk")
View
6 scheduled/BAUSTIAN-09PC/Finished/20120222090346.ahk
@@ -0,0 +1,6 @@
+#include FcnLib.ahk
+
+
+savescreenshot("RemoteRequest")
+#include FcnLib.ahk
+FileMove("C:\Dropbox\AHKs\scheduled\BAUSTIAN-09PC\Running\20120222090346.ahk", "C:\Dropbox\AHKs\scheduled\BAUSTIAN-09PC\Finished\20120222090346.ahk")
View
6 scheduled/BAUSTIAN-09PC/Finished/20120222090816.ahk
@@ -0,0 +1,6 @@
+#include FcnLib.ahk
+
+
+savescreenshot("RemoteRequest")
+#include FcnLib.ahk
+FileMove("C:\Dropbox\AHKs\scheduled\BAUSTIAN-09PC\Running\20120222090816.ahk", "C:\Dropbox\AHKs\scheduled\BAUSTIAN-09PC\Finished\20120222090816.ahk")
View
3  scheduled/PHOSPHORUS/Finished/20120222135733.ahk
@@ -0,0 +1,3 @@
+MsgBox Hotkey Timer!!! Ring, ring!`ntea time
+#include FcnLib.ahk
+FileMove("C:\Dropbox\AHKs\scheduled\PHOSPHORUS\Running\20120222135733.ahk", "C:\Dropbox\AHKs\scheduled\PHOSPHORUS\Finished\20120222135733.ahk")
View
3  scheduled/PHOSPHORUS/Finished/20120222174009.ahk
@@ -0,0 +1,3 @@
+MsgBox Hotkey Timer!!! Ring, ring!`ngo to church
+#include FcnLib.ahk
+FileMove("C:\Dropbox\AHKs\scheduled\PHOSPHORUS\Running\20120222174009.ahk", "C:\Dropbox\AHKs\scheduled\PHOSPHORUS\Finished\20120222174009.ahk")
View
1  temporary9.ahk
@@ -1,6 +1,7 @@
#include FcnLib.ahk
#include Firefly-FcnLib.ahk
+HowManyAhks()
iniFolder:=GetPath("FireflyIniFolder")
DisplayableIniFolder(iniFolder)
Please sign in to comment.
Something went wrong with that request. Please try again.