Jump to content

AC130

Active Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by AC130

  1. What excellent customer service.
  2. How do you stop a long period of sleep? For instance: Sleep(5000) What If I want to interrupt that sleep? I tried Sleep(1), but that didn't work. Maybe I can put sleep in a Do/Loop and declare a function that stops the loop? It would work, but I think there maybe other ways to achieve my goal. Any ideas?
  3. I don't even care anymore... Just patch it eventually, please. I would like to use it sometime or later.
  4. I've made progress... Turns out you don't use the Shade/Step/Handle parameters. It will result in the errors above, so this is the only thing I've gotten to work: Public Declare Function AU3_PixelSearch Lib "AutoItX3" (ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer, ByVal Color As Integer) As Integer However, I think there may be a problem with the Color parameter. I've tried normal colors such as &HFDF3C8,&HFFFFFF, &HFFCCCC, and they all resulted in some sort of P/Invoke error. I then tried &H0 and no errors occured - at all. Any ideas?
  5. You're right, it isn't, but I've tried every other possible declaration... Public Declare Function AU3_WinGetHandle Lib "AutoItX3" (ByVal Title As String, ByVal Text As String, ByVal szText As String, ByVal BufferSize As Integer) As Integer Public Declare Function AU3_PixelSearch Lib "AutoItX3" (ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer, ByVal Color As Integer, ByVal Shade As Integer, ByVal Skip As Integer, ByVal Handle As IntPtr) As Integer Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim szHandle As Char = CChar(CStr(256)) Dim Handle = AU3_WinGetHandle("Untitled - Notepad", "", szHandle, 128) AU3_PixelSearch(1, 1, 1024, 768, &H0, 0, 1,CType(Handle, IntPtr)) End Sub Error: The runtime has encountered a fatal error. The address of the error was at 0x6f063688, on thread 0x1954. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
  6. And, I'm not bashing AutoIt. I'm saying I've tried every possible declaration and it still won't work. Public Declare Function AU3_PixelSearch Lib "AutoItX3" (ByVal nLeft As Integer, ByVal nTop As Integer, ByVal nRight As Integer, ByVal nBottom As Integer, ByVal nCol As Integer, Optional ByVal nVar As Integer = 0, Optional ByVal nStep As Integer = 1, Optional ByVal LPPOINT As IntPtr = Nothing) As Integer Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Do AU3_PixelSearch(1, 1, 1024, 768, &H0) Loop End Sub Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. If I'm doing something wrong, then show me. How can you say I don't know what I'm doing if you don't even know me? I sure as hell know how to call a damn function, hince why ALL THE OTHER FUNCTIONS WORK FINE.
  7. Is all this necessary? I'm not even the only one having this problem.
  8. Thus far, I only can't get PixelSearch working. I have yet to try error, and Send works great. I used to have a problem with MouseClick; it also wouldn't work, but I tried using an older DLL, and it worked. (I was using the latest version). I tried swapping DLL's numerous amounts of times to try PixelSearch, but none worked. I posted the declarations above. Edit: Oh yeah, I gave up on WinGetHandle. So, that too.
  9. Yes, PixelSearch just will not work in AutoItX. We've both referenced it correctly. I tried using older/newer DLL's, but still no success.
  10. Yes, I know the VB.NET equivalent's for AutoIt; SendWait for Send, GetPixel for PixelSearch, and I don't really need an error return. Just let me know when you get everything setup, please. It just really irritates me that only one function won't work!
  11. I only have three functions left that I need to import from AutoItX: AU3_API void WINAPI AU3_PixelSearch(long nLeft, long nTop, long nRight, long nBottom, long nCol, /*default 0*/long nVar, /*default 1*/long nStep, LPPOINT pPointResult); AU3_API void WINAPI AU3_Send(const char *szSendText, /*[in,defaultvalue(0)]*/long nMode); AU3_API long AU3_error(void); I've tried PixelSearch as stated above, and it's not working. I thought I had tried error, but it turns out the reason it wasn't working was because PixelSearch wasn't working, thus the error I was receiving was from PixelSearch, not error. It will probably work once I get PixelSearch working. I haven't tried send yet, because I like to go in order, but I'm fairly sure it will work. I'm starting to think that the problem is in AutoItX itself, and not API/VB.NET. Do you mind posting your declarations in C#, since that what's your familiar with? I'll probably have a better chance that way. Thank you for taking the time to help.
  12. The thread is in C# and doesn't have the WinGetHandle declaration. I think that's the thread you're referring to, anyway... Owell, just one last problem then. What's up with pixelsearch? I know this declaration is correct, but results in the same error as what we were experiencing with WinGetHandle: Public Declare Sub AU3_PixelSearch Lib "AutoItX3" (ByVal nLeft As Integer, ByVal nTop As Integer, ByVal nRight As Integer, ByVal nBottom As Integer, ByVal nCol As Integer, Optional ByVal Shade As Integer = 0, Optional ByVal nStep As Integer = 1, Optional ByVal hWnd As String = "") I tried "hWnd" with IntPtr instead of string, but still the same error. It's probably because I may be calling it wrong. AU3_PixelSearch(1,1,1,1,&HFFFFFF) I also tried setting the PixelCoordMode, but no success. My only guess is the color is wrong. AI uses Hex, but VB.NET uses RGB. This should really be the last problem I'm having.
  13. Edit: It's a different error now... Actually, two. The runtime has encountered a fatal error. The address of the error was at 0x5e41a520, on thread 0x1518. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. After I press continue... Exception of type 'System.ExecutionEngineException' was thrown.
  14. I copied it exactly as you have posted, and it resulted in error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  15. Public Declare Function AU3_WinGetHandle Lib "AutoItX3" (ByVal Title As String, Optional ByVal Text As String = "", Optional ByVal szText As String = "", Optional ByVal Buffer As Integer = 256) As Char
  16. Stil not working...
  17. So, (ByVal szText As Char)... I'll give it a try. What should I put as the szText and buffer if I just want to use Calculator as the 3rd party program?
  18. Ok, let's scrap that question for now. Are these the correct paramters for WinGetHandle? AU3_API void WINAPI AU3_WinGetHandle(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPWSTR szRetText, int nBufSize); (ByVal Title As String, ByVal Text As String, ByVal szText As String, ByVal Buffer As Integer) As Integer In the original AutoIt language, there are only two parameters; the last two don't exist, so I'm not sure on what to put for "szText". From google, I understand the buffer size, and 256 seems to be efficient. What should I put for sztext?
  19. Why should I have to do that? All the other functions work fine, thus far. The paramter in c++ is (void), that means "nothing" in VB.NET. I should only have to change the parameters, but none work.
  20. I don't entirely understand. AU3_Error As Integer... (No paramaters) Results in error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  21. In the exported functions list for AutoIt: AU3_API long AU3_error(void); It's in the same spot as the rest of the API. Right?
  22. I see. Owell, I got it working. Now I'm only having problems with AU3_Error. I used: (ByVal Value As Integer) As Integer I call it like this: (AU3_Error(0)) I receive error: Unable to find an entry point named 'AU3_Error' in DLL 'AutoItX3'. My guess is the declaration is incorrect. I tried removing the ByVal, but that resulted in the same error. Any tips?
  23. I just need help with one declaration... After that, I'll be able to look at why my declarations didn't work and fix the others. C'mon, help! You know you want to.
  24. Any other ideas... Anyone? I'm going to get a bad grade lol...
  25. Ugh, that didn't work, either. I don't understand how some functions work and some don't.
×
×
  • Create New...