The_Noob Posted November 16, 2006 Share Posted November 16, 2006 (edited) expandcollapse popupHotKeySet("^s", "Save") Local $line $count = 0 $lastcount = 0 While 1 Sleep(100) $count =ControlCommand ("Map of Llirrem (English Province) You're at RestartNearTown" , "" , "RichTextWndClass1","GetLineCount") if $count > $lastcount Then For $i = $lastcount to $count $line = $line & ControlCommand ("Map of Llirrem (English Province) You're at RestartNearTown" , "" , "RichTextWndClass1", "GetLine",$i) ;tooltip($line) Next $Date = @YEAR & "." & @MON & "." & @MDAY $Time = @HOUR & "." & @MIN & "." & @SEC $File = FileOpen("QuestAutoLog-" & $Date & ".txt", 1) FileWrite($File, $line) FileClose($File) $count =ControlCommand ("Map of Llirrem (English Province) You're at RestartNearTown" , "" , "RichTextWndClass1","GetLineCount") $line = "" endif $lastcount = $count ; tooltip("", 0,0) WEnd Func Save() Local $line $count =ControlCommand ("Map of Llirrem (English Province) You're at RestartNearTown" , "" , "RichTextWndClass1","GetLineCount") For $i = 1 to $count $line = $line & ControlCommand ("Map of Llirrem (English Province) You're at RestartNearTown" , "" , "RichTextWndClass1", "GetLine",$i) & @lf ;tooltip($line) Next $Date = @YEAR & "." & @MON & "." & @MDAY $Time = @HOUR & "." & @MIN & "." & @SEC $File = FileOpen("QuestChatLog-" & $Date & "-" & $Time & ".txt", 1) FileWrite($File, $line & @CRLF & $Date & @CRLF) FileClose($File) MsgBox(0, "Success!", "Saved log",5) EndFunc Ok thats what i got... Im tryin to make it detect when theres a new line of chat, and log it to a file. easy enough? wrong. When this is running i cant double click. Dont know why. Somone please help! -edit- Ok so i tried upping the wait time to a second, and i can double click again, but i still have a problem with the chat log seems to get weird... lemme post some of it so u can see what i mean. [2:16:58 PM] <NOOBILATOR> man i hate this program [2:16:59 PM] <Amaruak> other then* [2:17:03 PM] <NOOBILATOR> its a pain in the butt to work with [2:17:04 PM] <kyoko> yes, express your frustration [2:16:32 PM] <freeedr> You dodn't count [2:16:35 PM] <freeedr> *don't [2:16:35 PM] <kyoko> I got 100 mil tops [2:16:47 PM] <freeedr> I have 14 oranges [2:16:50 PM] <Amaruak> only person methinks would have somewhere near that on toehr tehn meh is nooblet So u can see there if chat happens at the same time, it shows with no line seperating it.... if i could prevent that from happening i wouldnt mind making it wait a second.... any ideas? Edited November 16, 2006 by The_Noob Link to comment Share on other sites More sharing options...
The_Noob Posted November 20, 2006 Author Share Posted November 20, 2006 (edited) Ok so its been a while, and i wasnt sure what was causing the prog to not allow me to double click...thought the sleep wasnt long enough, or maybe having the file open or somthing.... so i remade most of the program... Opt("OnExitFunc", "endscript") Local $line $count = 0 $lastcount = 0 $date = 0 $time = 0 $log = "" ;$File = FileOpen("QuestAutoLog-" & $Date & ".txt", 2) While 1 $count = ControlCommand ("Map of Llirrem (English Province) You're at RestartNearTown" , "" , "RichTextWndClass1","GetLineCount") if $count > $lastcount Then For $i = $lastcount to $count-1 $line = ControlCommand ("Map of Llirrem (English Province) You're at RestartNearTown" , "" , "RichTextWndClass1", "GetLine",$i) if $line <> "" Then $log = $log & $line EndIf Next $count =ControlCommand ("Map of Llirrem (English Province) You're at RestartNearTown" , "" , "RichTextWndClass1","GetLineCount") $line = "" endif $lastcount = $count sleep(5000) WEnd Func endscript() $File = FileOpen("QuestAutoLog-" & $Date & ".txt", 2) FileWrite($File, $Log) FileClose($File) EndFunc I got the line thing working, so its all showing up line of text after the other, no blank spaces, and i took out most of what i dont need for now, but it still wont allow me to double click. Whats going on? Why cant i double click with this prog running? Edited November 20, 2006 by The_Noob Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now