Skip to content

Commit

Permalink
2011-09-16_03-53-15
Browse files Browse the repository at this point in the history
  • Loading branch information
camerb committed Sep 16, 2011
1 parent c25d61c commit dd067bf
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 73 deletions.
3 changes: 2 additions & 1 deletion DebuggerCommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -576,4 +576,5 @@ cmd 1: {C:\code\epms\script\property_importers}, 2: {perl colonial.pl C:\import_
cmd 1: {C:\code\epms\script}, 2: {perl user_auth_expression_new.pl 3351 3369 3351}
cmd 1: {C:\code\epms\script\property_importers}, 2: {perl homeproperties.pl C:\import_files\prop\home_2011-08.csv 0 > C:\code\report.txt}
cmd 1: {C:\code\epms\script\employee_importers}, 2: {perl homeproperties.pl C:\import_files\empl\home_2011-08.csv 0 > C:\code\report.txt}
EPMS
EPMS
cmd 1: {C:\code\epms\script\employee_importers}, 2: {perl sequoia.pl > C:\code\report.txt}
30 changes: 18 additions & 12 deletions FcnLib.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -419,17 +419,25 @@ Click(xCoord, yCoord, options="Left Mouse")

;TODO write
;Closes a window as gracefully as possible
;TODO allow access by process?
CloseWindowGracefully(title, text="", xClickToClose="", yClickToClose="")
{
;Check if winexist each time (then return)

}

CurrentTime(options="")
{
FormatTime, time,, yyyyMMddHHmmss
returned := FormatTime(time, options)
return returned
}

;TODO enable slashes or colons?
;Gets the current time (unique, increasing)
; pass in a FormatTime-style string to customize your format
; or use one of the custom styles already thought up like hyphendate and slashdate
CurrentTime(options="")
FormatTime(time, options="")
{
;use flags
; date time datetime
Expand All @@ -453,28 +461,26 @@ CurrentTime(options="")
time:=true

if InStr(options, "slashdate")
FormatTime, returned,, MM/dd/yyyy
FormatTime, returned, %time%, MM/dd/yyyy
else if InStr(options, "hyphenated")
FormatTime, returned,, yyyy-MM-dd_HH-mm-ss
FormatTime, returned, %time%, yyyy-MM-dd_HH-mm-ss
else if InStr(options, "hyphendate")
FormatTime, returned,, yyyy-MM-dd
FormatTime, returned, %time%, yyyy-MM-dd
else if InStr(options, "wordsdate")
FormatTime, returned, %time%, MMMM d, yyyy
else if InStr(options, "month")
FormatTime, returned,, MM
FormatTime, returned, %time%, MM
else if InStr(options, "year")
FormatTime, returned,, yyyy
FormatTime, returned, %time%, yyyy
else if options
FormatTime, returned,, %options%
FormatTime, returned, %time%, %options%
else
FormatTime, returned,, yyyyMMddHHmmss
FormatTime, returned, %time%, yyyyMMddHHmmss

;got forced into using this
return returned
}

;FormatTime()
;{
;}

;TESTME
DeFormatTime(timestamp)
{
Expand Down
59 changes: 59 additions & 0 deletions ProcessAhkArticles.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#include FcnLib.ahk

;TODO make this work so that the files are stuffed into a template for formatting
;TODO make a central index file that keeps track of filename, title, subtitle
;TODO process the rest using REFP
Loop, C:\Dropbox\Public\camerb-ahk-net\raw-articles\*
{
thisFile := A_LoopFileFullPath

thisShortFile := A_LoopFileName
thisShortFile := StringTrimRight(thisShortFile, 4)
destHtml=C:\Dropbox\Public\camerb-ahk-net\%thisShortFile%.html
;debug(destHtml, thisfile)

thisTitle := FileReadLine(thisFile, 1)
thisSubTitle := FileReadLine(thisFile, 2)

;TODO process list items, save them to the index
listItem=`n<li><a href="%thisShortFile%.html">%thisTitle% - %thisSubTitle%</a></li>

index=0
Loop, read, %thisFile%
{
index++
thisLine := A_LoopReadLine

if (index <= 2)
continue

;debug(thisLine)

if (mod(index, 3) == 0)
continue
if (mod(index, 3) == 1)
{
addition=`n<h2>%thisLine%</h2>
articleText .= addition
}
if (mod(index, 3) == 2)
{
addition=`n<p>`n%thisLine%`n</p>
articleText .= addition
}

;debug(articleText)
}

modifiedDate:=FileGetTime(thisFile)
prettyDate:=FormatTime(modifiedDate, "wordsdate")

header=<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">`n<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">`n`n<meta name="description" content="Camerb's AHK site - %thisTitle%">`n<title>Camerb's AHK site - %thisTitle%</title>`n<link href="default.css" rel="stylesheet" type="text/css" media="all">`n</head>`n<body>`n`n<center>`n<table width="700px"><tr><td>`n`n<h1>%thisTitle%</h1>`n`n<p>%thisSubtitle%</p>`n<a href="index.html">Back to the home page</a>`n
footer=`n`n<br>`n<hr>`n<p><i>Last updated: %prettyDate%</i></p>`n`n</td>`n</tr>`n</table>`n</center>`n`n</body></html>

wholeFile=%header%%articleText%%footer%
FileCreate(wholeFile, destHtml)
}
ExitApp

Esc::ExitApp
2 changes: 1 addition & 1 deletion SelfDestruct.ahk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Sleep 100
FileDelete, C:\Dropbox\AHKs\Scheduled-20110912111245.ahk
FileDelete, C:\Dropbox\AHKs\Scheduled-20110915172908.ahk
38 changes: 36 additions & 2 deletions cliprun.ahk
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
#include FcnLib.ahk
#include FcnLib.ahk

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, Force
CoordMode, Mouse, Screen
blah:=72

In future reports, please use the agent's name, rather than "leasing agent."
k::InputBox, blah
j::circle(200, blah) ; segs = how many sides
l::move(100, blah) ; segs = angle



move(dis=32, ang=0)
{
;~ static
MouseGetPos, mx, my
ang:=-ang*(3.141592653589793/180)
mx:=dis*Cos(ang), my:=dis*Sin(ang)
;~ list.=mx " --- " my "`n"
;~ Clipboard = %list%
MouseMove, %mx%, %my%, 0, R
}


circle(rad=100, seg=36, speed=200, offset=90)
{
loop, %seg%
{
move(rad/10, A_Index*(360/seg)+offset)
sleep, speed/seg
}
}





~esc::ExitApp
5 changes: 4 additions & 1 deletion ircClient.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ ws2_asyncselect(socket,"dataprocess")

;choose nick
changenick(nick())
send("USER " . nick() . " * * :the camerb irc client, made by camerb")
;send("USER " . nick() . " * * :the camerb irc client, made by camerb")
send("JOIN " . channel())

Gui, +LastFound -Caption +ToolWindow
Gui, Add, Edit, r10 w500 vOut ReadOnly
Gui, Add, Edit, w500 vInputText
Gui, Add, Button, Default, Run
Expand Down Expand Up @@ -99,6 +100,8 @@ appendToScrollback(textToAppend)
global chatScrollback
chatScrollback .= "`n" . textToAppend
GuiControl, Text, Edit1, %chatScrollback%
PostMessage, 0xB1, -2, -1, Edit1, A
PostMessage 0xB7, , , Edit1, A
}

send(data){
Expand Down
52 changes: 0 additions & 52 deletions temporary6.ahk
Original file line number Diff line number Diff line change
@@ -1,55 +1,3 @@
#include FcnLib.ahk


Loop, C:\Dropbox\Public\camerb-ahk-net\raw-articles\*
{
thisFile := A_LoopFileFullPath

thisShortFile := A_LoopFileName
thisShortFile := StringTrimRight(thisShortFile, 4)
destHtml=C:\Dropbox\Public\camerb-ahk-net\%thisShortFile%.html
;debug(destHtml, thisfile)

thisTitle := FileReadLine(thisFile, 1)
thisSubTitle := FileReadLine(thisFile, 2)

;TODO process list items
listItem=`n<li><a href="%thisShortFile%.html">%thisTitle% - %thisSubTitle%</a></li>

index=0
Loop, read, %thisFile%
{
index++
thisLine := A_LoopReadLine

if (index <= 2)
continue

;debug(thisLine)

if (mod(index, 3) == 0)
continue
if (mod(index, 3) == 1)
{
addition=`n<h2>%thisLine%</h2>
articleText .= addition
}
if (mod(index, 3) == 2)
{
addition=`n<p>`n%thisLine%`n</p>
articleText .= addition
}

;debug(articleText)
}

;TODO make prettyDate
header=<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">`n<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">`n`n<meta name="description" content="Camerb's AHK site - %thisTitle%">`n<title>Camerb's AHK site - %thisTitle%</title>`n<link href="default.css" rel="stylesheet" type="text/css" media="all">`n</head>`n<body>`n`n<center>`n<table width="700px"><tr><td>`n`n<h1>%thisTitle%</h1>`n`n<p>%thisSubtitle%</p>`n<a href="index.html">Back to the home page</a>`n
footer=`n`n<br>`n<hr>`n<p><i>Last updated: %prettyDate%</i></p>`n`n</td>`n</tr>`n</table>`n</center>`n`n</body></html>

wholeFile=%header%%articleText%%footer%
FileCreate(wholeFile, destHtml)
}
ExitApp

Esc::ExitApp
4 changes: 0 additions & 4 deletions thirdParty/Functions.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ FileSelectFolder(StartingFolder = "", Options = "", Prompt = "") {
FileSelectFolder, v, %StartingFolder%, %Options%, %Prompt%
Return, v
}
FormatTime(YYYYMMDDHH24MISS = "", Format = "") {
FormatTime, v, %YYYYMMDDHH24MISS%, %Format%
Return, v
}
GetKeyState(WhichKey , Mode = "") {
GetKeyState, v, %WhichKey%, %Mode%
Return, v
Expand Down

0 comments on commit dd067bf

Please sign in to comment.