Jump to content

alexrotaru

Members
  • Posts

    12
  • Joined

  • Last visited

alexrotaru's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I found this post. I would like to know if there is a way to do the same thing using OnEventMode?
  2. Hello, I created a Tree View control and several Items for it. For each item I defined a Context Menu control with 2 options: Edit and Delete. When I click on Edit/Delete I would like to be able to edit/delete the value of the Tree View Item. Is there a way to know on which control the user right-clicked, and then use this info? Thanks, Alex
  3. Thanks a lot. I just tried it and it works really nice Alex
  4. Hi, When I make my exe files, their version is set to the version of the AutoIt compiler. Is it possible to specify the file version when compiling the scripts? Thanks, Alex
  5. Thanks for the fast reply . I am going to modify the function as you said, and then give it another try. I thought that the reserved memory space is released when the function exits, but it seems that I was wrong . Thanks again for your help, Alex
  6. Hello, I am using the _ScreenCap_Capture function from Auto3Lib to take screen shots of what my script is doing, and after almost 5000 screen shots taken the following error message is generated: "_API_CreateCompatibleDC.The operation completed successfully." When I tried to take a screen shot with this error message (using Print Screen), another error is displayed: "Insufficient memory to create bitmap. Close one or more applications to increase available." After I closed the error message I was able to take screen shots without any problem. I have taken 2 photos with my mobile phone, but I don't know how to upload them to this post :-(. I tried to reproduce it to my laptop, but without any luck. I wrote a small script, and run it on the computer where it appeared. I opened the Task Manager, and took screen shots with it. After 4979 pictures take the error appeared again. #include <A3LScreenCap.au3> Local $_stepNumber $_stepNumber = 1 While 1 If MouseGetPos(0) == 280 Then MouseMove(380, 203) Else MouseMove(280, 203) EndIf MouseClick("left") _ScreenCap_Capture("Test_" & $_stepNumber & "_" & @HOUR & "-" & @MIN & "-" & @SEC & ".jpg") Sleep(5000) $_stepNumber += 1 WEnd The same behavior appears on 3 computers that had the same OS image. If you need any other info about this please let me know. Thanks, Alex
  7. hello, I'm having a little problem with the MouseMove command when I am connected through a Remote Desktop Connection. The problem is that it does nothing.... The mouse position is not changed at all. Initialy I thought it might be due to the beta version I was using (124-beta), but I also tried with the 117-beta, and with v3 stable version, and I got the same results. the code I tried is: Run ("C:\Program Files\Internet Explorer\iexplore.exe about:blank") Sleep (5000) MouseMove (5, 600) Sleep (5000) thanks
  8. I would like to get the object of a newly opened Internet Explorer webpage, but if I call it like this: $Obj = ObjGet ("", "InternetErplorer.Application") it returns the first object from this class that was created. If I have only one IE opened, there is no problem, but if I have more than one IE windows opened, then the returned object is not always the one I expect. I would like to know if there might be a way to select the object that corresponds to an exact IE window (for example if I use the WMI....).
  9. now I feel realy stupid :-(. I found the problem. it was nothing wrong...i was printing page info for debug pupose, and because the new application needed some time to load, autoit was retreiving information of the current active window (scite, or totoal commander). :-( thanks a lot for you time.
  10. you were right, the problem was not in scite. i run the .exe file and this time it showed me information about total commnander . one of my functions does something nasty, but i don't know exactly where this happens. i will try to look again. what i find strange is that this does not happen every time.... thanks a lot for your help. if you have any other ideeas about why this is happenning....
  11. thanks for your observation. i forgot to change the descriptor :-). although this has not solved my problem. strange that autoit did not say anything about using a file descriptor that did not exist. i forgot to say that I am using Scite editor, and I start the script from the editor using the F5 key. I think that it might have to do with it (it shows the file opened by the editor).
  12. hy, i have a problem with one of my scripts: sometimes (usually the first time i run the script) i find in my log the script code. sometimes the code is not only once written, but for 3 or 4 times. i don't know why this is happening. it always happens in the same place. to write in the log file I have created my own function (not using the one that comes with autoit): ;=====================================================================; ; Description: writes in the log file ; Syntax: writeInLog ($_LogFileDesc, $_LogText, $_Flag) ; Parameter(s): $_LogFileDesc - the file descriptor of the log file ; $_LogText - the text that will be written in the log file ; $_Flag - the flag that specifies if this is a regular message or the beginning/end of the log ; (0 = beginning/end of log; 1 = regular message) ; Requirement(s): None ; Return Value(s): On Success - Nothing ; On Failure - a message box appears informing that it was not possible to write in the log, and then the script exits ; Author(s): Alexandru ; Note(s): ; ;===================================================================== Func writeInLog ($_LogFileDesc, $_LogText, $_Flag) Dim $_WriteFile ; if $_Flag is zero, then this is the first/last time we are writing in the log file If $_Flag == 0 Then $_WriteFile = FileWrite ($_LogFileDesc,"-----------------" & @CRLF & _ @MON & "/" & @MDAY & "/" & @YEAR & " " & _ @HOUR & ":" & @MIN & ":" & @SEC & " " & _ $_LogText & @CRLF & _ "-----------------" & @CRLF _ ) ; if $_Flag is not zero, then this is not the first time we are writing in the log file Else $_WriteFile = FileWrite ($_LogFileDesc, @MON & "/" & @MDAY & "/" & @YEAR & " " & _ @HOUR & ":" & @MIN & ":" & @SEC & " " & $_LogText & @CRLF _ ) EndIf ; checking to see if it was possible to write in the log file If $_WriteFile == 0 Then MsgBox (0, "script error message", "unable to write to the log file") Exit EndIf EndFunc ; ==> writeInLog i was wandering if anyone else has encountered the same problem. i have attached two log files: - log.txt is a "good" log, this means that the code is not present in the log - log_old2.txt is a "bad" log, this means that the code is present in the log if you need any more info, please tell me and I will provide it as soon as possible. thanks log.txt log_old2.txt
×
×
  • Create New...