ReadMyFlexFile()
WinWait, Search - Windows Internet Explorer,
IfWinNotActive, Search - Windows Internet Explorer, , WinActivate, Search - Windows Internet Explorer,
WinWaitActive, Search - Windows Internet Explorer,
MouseClick, left, 296, 46
Sleep, 100
Send, {TAB}{TAB}{TAB}{TAB}
Sleep, 100
Send, {TAB}{TAB}{TAB}{TAB}
Sleep, 100
Send, {TAB}{TAB}{TAB}{TAB}
Sleep, 100
Send, co{TAB}{TAB}{TAB}{TAB}
Sleep, 100
Send, {TAB}{TAB}{TAB}{TAB}{TAB}
Sleep, 100
Send, %line%
Send, {TAB}
Send, {ENTER}
ReadMyFlexFile() {
Global
;Read First line of file
FileReadLine, line, %A_MyDocuments%\AHK\FlexSell\FlexSellFile.txt, 1
;Deletes First Line
fileread, text_list, %A_MyDocuments%\AHK\FlexSell\FlexSellFile.txt
RegExMatch(text_list, ".+?\v", oVar) ; stores first line in oVar
text_list := RegExReplace(text_list, ".+?\v", "", "", 1) ; deletes the first line and stores what's left in the var text_list
filedelete, %A_MyDocuments%\AHK\FlexSell\FlexSellFile.txt
fileappend, %text_list%, %A_MyDocuments%\AHK\FlexSell\FlexSellFile.txt ;recreates the file
;Clean Up - Empty Spaces
SetWorkingDir, %A_MyDocuments%\AHK\FlexSell\ ;path to directory here
File = FlexSellFile.txt ;file name here
FileRead, text, %File%
FileDelete, %File%
FileAppend, % SubStr(text, 2), %File% ;deletes the 2 spaces left behind from
}
Return
Exit