Jump to content

qaguy

Members
  • Posts

    8
  • Joined

  • Last visited

qaguy's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Done, thanks. I ended up using Richard script, I just changed one while loop condition: Instead of While $line <> -1 .. While $line = -1 did the trick But wordpad ant notepad can work on it, that's what keeps me with hope. It's possible to give FileOpen the ability to open the file and allow others to write on it at the same time? Something like: FileOpen(filename, FileAccess.Read, FileShare.ReadWrite) I know that FileOpen only takes 2 arguments, filename and mode, but can I specify the fileshare? as a power of two on the read argument?
  2. LOL, sorry, no doubt that the title doesn't reflect what I had in mind, who should I ask to change it? As you may have already noticed, English is not my native language Richard, thanks a lot, I'm going to try it and I'll be posting the results here. Yes, you're right, fortunately the size is not a problem, the log doesn't get bigger than 3-5MB That's what worries me most, also I can't stop the service, I'm working with a SIPPhone that receives calls from an Asterisk server and killing the phone on every call would be painful. Ok, I'm going back to work, thanks all for your time and help. Lets see what comes out of this.
  3. Ok, the problem is that I can't read a file that is being in use by another app. FileOpen() always returns -1 I can't find a workaround with FileOpen(), is this possible with autoit?
  4. Thanks! So far I have this. ParseFile("mylog.log") Func ParseFile($file_to_parse) $file_size = FileGetSize($file_to_parse) $file_handle = FileOpen($file_to_parse, 0) FileSetPos($file_handle, 0, 2) While 1 $file_pos = FileGetPos($file_handle) $line = FileReadLine($file_handle) If $line <> -1 Then Sleep(5) FileSetPos($file_handle, 0, $file_pos) Else ConsoleWrite($line) EndIf WEnd EndFunc I think it's related to what you are telling me to do Richard. I just translated pseudocode to autoit but it doesn't work. Need more coffee...
  5. Hi, Is there any way to monitor a file and keep sending the last line to a variable? I can't afford reading the entire file each time, I need to match some log lines and if two events happen at the same time, launch a ControlClick and so on. Thanks in advance.
  6. It's not the approach I wanted to take but ControlSend() works ok. Thanks and sorry for the late response.
  7. Can you think of any workaround? Thanks for the answer!
  8. Hi all, I'm trying to access to some buttons inside a toolbar with no luck. Maybe i'm with the wrong approach or I didn't understand how I can achive this correctly. I know that If I have a toolbar on a GTK application (eG: gVim), I can access to it's items by getting the handle. Something like: #include <GUIToolbar.au3> $handle = ControlGetHandle("Myapp", "", "[CLASS:someclass; INSTANCE:someinstance]") _GUICtrlToolbar_ClickIndex($handle, 4) Most of the win32 apps let me work this way without problems. Now I have to automate a new tool and I can't find the way to access the buttons. The toolbar looks like this: >>>> Window <<<< Title: MyApp Class: ThunderRT6FormDC Position: -4, -4 Size: 1374, 746 Style: 0x17CF0000 ExStyle: 0x00000100 Handle: 0x0004025C >>>> Control <<<< Class: Afx:8640000:8:10003:0:0 Instance: 4 ClassnameNN: Afx:8640000:8:10003:0:04 Advanced (Class): [CLASS:Afx:8640000:8:10003:0:0; INSTANCE:4] ID: Text: Standard Position: 1, 23 Size: 540, 27 ControlClick Coords: 213, 18 Style: 0x56000100 ExStyle: 0x00000000 Handle: 0x00050262 >>>> Mouse <<<< Position: 214, 60 Cursor ID: 0 Color: 0xDEDBD6 None of the _GUICtrlToolbar_Click* seem to work, all I get is a click on the upper left of the app. How would you normally automate this case? What would you try and why? All help is welcome, Thanks in advance!
×
×
  • Create New...