
superbosu
Active Members-
Posts
37 -
Joined
-
Last visited
superbosu's Achievements

Seeker (1/7)
0
Reputation
-
unavailability in minutes from txt of the month
superbosu replied to superbosu's topic in AutoIt General Help and Support
perfect! it works with all my logs tnx again for all! Can I ask you a question jdelaney ? how mutch time did you spend to generate this code? cause I think a code like this thaks a lot of time.... realy a good work Now I will add some gui for month selection, when is ready I will share the code maybe somebody will need the same thing ... -
superbosu reacted to a post in a topic: unavailability in minutes from txt of the month
-
unavailability in minutes from txt of the month
superbosu replied to superbosu's topic in AutoIt General Help and Support
HI jdelaney this did the job only one thing I don't understand why the last row give me a wrong result: for example with : Unavailable 18.01.2013 18:36:35 - 21.01.2013 01:38:22 Available 21.01.2013 01:38:30 - 30.01.2013 19:58:04 Unavailable 30.01.2013 19:58:15 - 30.01.2013 20:14:52 Available 30.01.2013 20:15:51 - 01.02.2013 15:57:58 the result is: 18.01.2013 process unavailable for 323 minutes ok 19.01.2013 process unavailable for 1440 minutes ok 20.01.2013 process unavailable for 1440 minutes ok 21.01.2013 process unavailable for 98 minutes ok 30.01.2013 process unavailable for 33 minutes ??? should be 16.62 minutes or 17 minutes with round -
superbosu reacted to a post in a topic: unavailability in minutes from txt of the month
-
unavailability in minutes from txt of the month
superbosu replied to superbosu's topic in AutoIt General Help and Support
jdelaney !!! realy impressive it works like a charm! you worked so hard to help me, tnx a lot again. the only thing that I have to fix is the unavailable time that is not reported: how the log works: If the service notices that the last update to ‘available.log’ is older than 60 secs (e.g. due to computer shutdown), it will always start a new line in ‘available.log’, for example you may see: Unavailable 09.12.2012 10:21:10 - 09.12.2012 10:53:25 Unavailable 09.12.2012 11:39:53 - 09.12.2012 12:38:53 Unavailable 09.12.2012 15:42:33 - 09.12.2012 15:42:49 instead of Unavailable 09.12.2012 10:21:10 – 09.12.2012 15:42:49 I think that a possible way is to read the available.txt file with _FileReadToArray before start the script and join the concatenates unavailable date in one (Unavailable 09.12.2012 10:21:10 – 09.12.2012 15:42:49)But I think that also this thing is not so easy to do ... -
superbosu reacted to a post in a topic: unavailability in minutes from txt of the month
-
unavailability in minutes from txt of the month
superbosu replied to superbosu's topic in AutoIt General Help and Support
WOW jdelaney you did it so fast!!! tnx a lot for your time! I tested your script with the file attached with only one month, but I think that in this case didn't works at 100% For example with one month (new attached file) the result is: 09.12.2012 process unavailable for 91.52 minutes 15.12.2012 process unavailable for 0.55 minutes The script did the job but didn't work when there are more then one unavailable before an available: Unavailable 09.12.2012 04:47:58 - 09.12.2012 04:47:58 -> _DateDiff = 0 s Available 09.12.2012 04:49:44 - 09.12.2012 10:20:46 Unavailable 09.12.2012 10:21:10 - 09.12.2012 10:53:25 -> _DateDiff = 1935 s Unavailable 09.12.2012 11:39:53 - 09.12.2012 12:38:53 -> _DateDiff = 3540 s but there is also to add 2788s (10:53:25 - 11:39:53) Unavailable 09.12.2012 15:42:33 - 09.12.2012 15:42:49 -> _DateDiff = 16s also there is missing 11020s (12:38:53 -15:42:33) Available 09.12.2012 15:43:00 - 15.12.2012 11:02:57 so for day 09.12.2012 the result should be: 09.12.2012 process unavailable for 321,65 minutes (0 + 1935+2788+ 3540 +11020 + 16 = 19299s/60= 321,65 minutes) there are problems also when the unavailable duration is more then 1 day : Unavailable 21.12.2012 18:12:14 - 23.12.2012 09:52:01 Available 23.12.2012 09:53:01 - 31.01.2013 17:37:11 the script unfortunately didn't write the result for this case: it would be nice if it exceeds 24 hours also the day after it will be written. in this case: 21.12.2012 process unavailable for 347,77 minutes diff(21.12.2012 18:12:14 - 22.12.2012 00:00:00) 22.12.2012 process unavailable for 1440 minutes diff (22.12.2012 00:00:00 - 23.12.2012 00:00:00) 23.12.2012 process unavailable for 592,02 minutes diff (23.12.2012 00:00:00 - 23.12.2012 09:52:01) is this impossible to do? :S for me it is... I'm in your hand experts available.txt -
Hi all, I have a big question and I need some help. in the attached file there are the data when a process has gone down. I need to take for a specific month (for example december 2012), day by day, the number of minutes that the process is unavailable and put them into a new txt file in the following way: 09.12.2012 process unavailable for 420 minutes 15.12.2012 process unavailable for "??" minutes 21.12.2012 process unavailable for "??" minutes 22.12.2012 process unavailable for "??" minutes 23.12.2012 process unavailable for "??" minutes ....... Yes I know, this is difficult exercise and maybe I'm asking too much but I hope that someone can help me. thanks in advance available.txt
-
Find value > 3600 on a txt and print the line
superbosu replied to superbosu's topic in AutoIt General Help and Support
Hi UEZ I tried your code with a file and it works too! tnx for the help -
superbosu reacted to a post in a topic: Find value > 3600 on a txt and print the line
-
superbosu reacted to a post in a topic: Find value > 3600 on a txt and print the line
-
superbosu reacted to a post in a topic: Find value > 3600 on a txt and print the line
-
Find value > 3600 on a txt and print the line
superbosu replied to superbosu's topic in AutoIt General Help and Support
it works! tnx a lot MELBA23 Number 1! I realy love this forum! quick answers for everything you need. -
Find value > 3600 on a txt and print the line
superbosu replied to superbosu's topic in AutoIt General Help and Support
Hi Melba23 and tnx for the reply. I tried your code with the file but the output was the same as the original file.txt without the top header lines: Workprocess Table Wed Jan 23 16:03:53 2013 ================= No Type Pid Status Cause Start Rstr Err Time Program Cl User SemR SemL ------------------------------------------------------------------------------------------ right? I think something is missing... any ideas? -
Hi all! I have a file.txt with all info about process running and I want to print out only lines / rows that have a value bigger then 3600 under "Time" So for example if I have the attacched file, I have to print the line or lines: 29 DIA 11440 Run yes no 1 5699 SAPDBKDF 150 U818BARONC is this easy to do? I think I should use _FileReadToArray and then loop something but don't know what. tnx for reply file.txt
-
remove text from line when string found
superbosu replied to superbosu's topic in AutoIt General Help and Support
Hi all and tnx for the solution! I executed this and works like a charm: #include <array.au3> #include <File.au3> Global $aArray _FileReadToArray("c:\check\st22_UNAME.txt", $aArray) $file2 = FileOpen("c:\check\st22_UNAME.txt",2) For $i = 0 To UBound($aArray, 1) - 1 $iPos = StringInStr($aArray[$i], "AP", 1) If $iPos > 0 Then FileWriteLine($file2, StringLeft($aArray[$i], $iPos - 1)& @CRLF ) Next FileClose($file2) tnx a lot !! -
Hi all I have this problem to ask you: I have a file.txt with n line like: hello_allAP123 haksjdhk kahsdjkhas hiall_!!AP09w8e09r809wer how_are_youAPiuwyeirkkwjekrh stringAPsomething...... my question is if is possible to have in file only with these strings and remove AP..... from the line hello_all hiall_!! how_are_you string
-
put text files in html table
superbosu replied to superbosu's topic in AutoIt General Help and Support
WOOOOW jdelaney it works!! TNX a lot for helping me with this script. It does exactly what I needed. :thumbsup: -
put text files in html table
superbosu replied to superbosu's topic in AutoIt General Help and Support
tnx for the quick reply all! I tring to read the 3 files with the array function and i created 3 arrays _FileReadToArray("D:\file1.txt", $Array1) _FileReadToArray("D:\file2.txt", $Array2) _FileReadToArray("D:\file3.txt", $Array3) but I don't know how to use the loop of these 3 arrays to write in the new file concatenated rows like these: $file = FileOpen("D:\final.txt", 1) FileWriteLine($file,'<tr>') FileWriteLine($file,'<td>'& row 1 &'</td>') ; how to put there the first value of the array1 ? FileWriteLine($file,'<td>'& row 1b &'</td>') ; how to put there the first value of the array2 ? FileWriteLine($file,'<td>'& row 1c &'</td>') ; how to put there the first value of the array3 ? FileWriteLine($file,'</tr>') I have to use 3 arrays? -
Hi all, I'm new with autoit and I trying to do a script that read from 3 txt files and put all rows in a html file as a table for example: file1.txt have this data row 1 row 2 row 3 row 4 ... row n file2.txt have this data: row 1b row 2b row 3b row 4b .... row nb file3.txt have this data: row 1c row 2c row 3c row 4c .... row nc my question is if is possible in autoit to put this 3 files in a final.html file in a table like this: row 1 row 1b row 1c row 2 row 2b row 2c row 3 row 3b row 3c row 4 row 4b row 4c ... ..... ....... row n row nb row nc Can somebody help with this script? I'know how to read the files but I don't know how to join all together in a table Tnx for your precious help and sorry for my bad english.
-
How to fill a textarea on a webpage
superbosu replied to superbosu's topic in AutoIt General Help and Support
Hi PsaltyDS, I don't know how to use _IEErrorHandlerRegister() and see the errors. but I did many tests and finaly it works in that way: $chiusura = FileRead("D:\repe\chiusura.txt") $oForm = _IEFormGetObjByName ($oIE, "ITALY_HD_CALL_EDIT") $oText = _IEFormElementGetObjByName ($oForm, "sys_tasklog") _IEFormElementSetValue ($oText, $chiusura) _IEFormSubmit ($oForm) _IEAction ($oIE, "back") _IELoadWait ($oIE) $oForm = _IEFormGetObjByName ($oIE, "ITALY_HD_CALL_EDIT") $oSubmit = _IEGetObjByName ($oIE, "whocares") _IEAction ($oSubmit, "click") so when i use _IEFormSubmit ($oForm) and go back with _IEAction ($oIE, "back") on the TEXTAREA I can see the txt donno why but it works...