Jump to content
AC Tool Forums

All Activity

This stream auto-updates     

  1. Last week
  2. @minimx Ok, I not sure as to why your DivObject definition, that you had created from the AC Tool Object definition, is not working. I don't know if it is because of the coordinates being used. Or if values that is being used for the test. But, I can say that after looking at a screen shot in Object Mapper 2. I was not able to find any of the values, in the exact same series, that you have in your test script for any portion of the Icon for Divide. So, from that point of view. You'll have to recreate the DivObject definition to look for Divide's Icon. So, plz check your PM as I sent you one.
  3. Earlier
  4. Windows 7, I don't know if I am using the Classic Windows theme or just turned off most of the enhancement of the visuals in windows.
  5. I have one question. What Windows are you running it on? And are you using the Classic Windows theme?
  6. are those test being done with Divide's window being smaller than the full screen? Both: full screen and smaller than fullscreen. The image was perfect in both tests. And is the image from the d_screen.bmp or from a screen capture of the window only, from another program? From d_screen.bmp, no other program, just opened the d_screen.bmp (divScreen).
  7. are those test being done with Divide's window being smaller than the full screen? And is the image from the d_screen.bmp or from a screen capture of the window only, from another program?
  8. Printscreen made by me: divScreen opened with paint I see no difference. I made anoother test: I ran my actool to find the scroll icon in divide screen in full screen mode, it found it. then I ran the same code in divide using the fast click to keep it in full screen, and checked the divScreen file, they looked the same, but I displayed the divscreen in slideshow mode and ran the actool to find the scroll icon in the slideshow image it found it! Then I did the same with divide in non a fullscreen mode, ran actool and found it in both. The image made by divide seems to be perfect. But the object is not found by that previous divide code.
  9. Okay, try this. with Divide opened and not Maximized. resize the window so that it is not full screen. The redo the test and see if you can see a difference. And go ahead and post the full image here.
  10. If you compare what you see in the image. Is it the same as what you actually see on the desktop with Divide's window?
  11. The imagefrom: divScreen file. If I did something wrong or unclear tell because I am a noob! But really happy to assist.
  12. First test: It looks fine to me, don't know about the bottom part, it is a little bit fuzzier, but not that bad Second test looks just like the first one, I can post if you want, it is good, even on the edges.
  13. Update: Okay after testing v0.4.2 and trying to find Divide's own icon. I had found a few issues. I fixed the issue of using SetActiveWindow causing Divide's Maximized window, and quite possibly others, to return to Normal window state. I fixed a problem/error with the CreateObject that I had fond. And in the process made it better with code that I was working on for the next version. And I think that I found what the problem is with the IsObject. And I have corrected it. Well, I think I did anyways. Now, I have to ask you do some for me. I need you to run your test code, from before, for a test. (Actually, I need to do two tests.) And yes, I do need you to perform the tests in the version of Divide that you have. The first test: Once Divide is running, load in, or type in, the script from before. From the menu select Script > Test Mode and click on Save Bitmaps from Color Commands. If you were to look at this option again, it should be checked. Run your script as it. Don't worry if Divide is not Maximized. Go to the directory that you have Divide installed in. In this directory, there should be a bmp file with the name of d_screen.bmp (or d_screen if you can't see file extensions). I need you to look at this image. In Windows 7 you can view the image by Right-clicking on it, and selecting Preview. I am not sure on how to do it in Windows 8.x or 10. Examine Divide's window in the image. Does the window look okay? Do you see everything for the window? Including it's borders around the window? Jot down what problems, if any, that you see. The second test: Keeping the window with the d_screen.bmp image open. Maximize Divide's window. Run your script again. Return Divide's window to normal. Bring the window showing d_screen.bmp. Examine Divide's window in the image. Does the window look okay? Do you see everything for the window? Including it's borders around the window? At this point, I need you to tell me what problems, if any, that you have seen in the image for both tests. You do not need to post the image. Just describe to me what you see. It shouldn't take you more than a few minutes to do this. I'll be logged into the forums until about 1AM MTD (UTC -6) tonite. So, I'll be available until then.
  14. No problem, that's what betas are for, take your time and if I can help in anyway just say it! Thank you so much!
  15. Alright, I don't what's going with the IsObject and CreateObject. But, I am working on them right now.
  16. In the last macro I was searching for a piece of the icon of divide, to do a test in it's own window, to make it more simple. Braveland is a steam game and has it own window.
  17. okay. Now the object that you are looking for in the script above. Is it in the game itself? Or is it someplace on the web browser?
  18. I want to know how to write in Divide and how much faster it would do a search in the screen looking for an object. The game is Braveland heroes. and some silly browser games. I want to find objects in a board. So I can make a virutal map with enemies and my own creatures
  19. Okay, I have to ask. what game is this for? And what exactly are you trying to find? Are you trying to find it in the game? or in something else?
  20. Divide macro: uses Classes,divide; var d: TDivObject; procedure dd // 4x4 0, 0 begin d := TDivObject.Create; with d do begin Def.Add('107=0,0|107=0,2|107=0,4'); Def.Add('107=2,0|107=2,2|190=2,4'); Def.Add('107=4,0|198=4,2|239=4,4'); end; end; begin SetActiveWindow(2308); MousePos(1326, 11); // when the setactivewindow is activated it changes the divide screen from the fullscreen, this mousepos + click sets it back to fullscreen Delay(2, 'sec'); leftclick; Delay(2, 'sec'); dd; if IsObject(d, 0, 0) then begin timestamp ('cave'); delay (9000); end else begin timestamp ('notcave'); delay (3000); end; end; It gives me a negative response, 'delay 3000 and notcave' even if the object is there. Ac tool macro: Object d // 0,0 4x4 107=0,0|107=0,2|107=0,4 107=2,0|107=2,2|190=2,4 107=4,0|198=4,2|239=4,4 End SetActiveWindow 2760 delay 2000 MousePos 75, 395 leftclick delay 2000 IsObject d at 0,0 delay 20000 Else pause End It gives me a positive answer: delays 20 sec.
  21. First of all, the test coordinates are not the same as what you had in your original code that you posted. There you had: if IsObject('d', 1041, 123) then And Second, in AC Tool, unless you are checking for an object that is on your desktop. You have to set the window for the Application/Game as the active window. Before you check for any objects. It is the same for Divide. Unless you are checking for something on your Windows Desktop. You have to set the Application's/Game's window as the active window. Then you check for the object. Example: Uses Classes, Divide; var MyObject: TDivObject procedure initMyObject; begin // code to initialize the object goes here. end; begin { Initialize the object } MyObject; { set the window as the active window } SetActiveWindow('Window Name/Title'); { Delay for 2 seconds to allow the window to become the active window. This delay is necessary, because even on the same system. It can take from a fraction of a second to 2 seconds for the window to be brought forward and become the active window. And the amount of time is different each time. } Delay(2, 'sec'); { No we test for the object } if IsObject(SomeObject, 0, 0) then TimeStamp('Object found.') else TimeStamp('Object not found'); end;
  22. But I don't seem to get a positive response, even when it should. I created an object using divide screen, a part of the scroll icon. In divide macro it doens't find and in a similar AC tool macro it finds the object. Divide macro uses Classes,divide; var d: TDivObject; procedure dd // 4x4 11, 11 begin d := TDivObject.Create; with d do begin Def.Add('218=0,0|253=0,2|246=0,4'); Def.Add('218=2,0|253=2,2|247=2,4'); Def.Add('225=4,0|253=4,2|248=4,4'); end; end; begin dd; if IsObject(d, 11, 11) then begin timestamp ('cave'); delay (20000); end else begin timestamp ('notcave'); delay (3000); end; end; It gives me a negative response, 'delay 3000 and notcave' even if the object is there. Ac tool code: Object d // 11, 11 4x4 218=0,0|253=0,2|246=0,4 218=2,0|253=2,2|247=2,4 225=4,0|253=4,2|248=4,4 End IsObject d at 11, 11 delay 20000 Else pause End It gives me a positive answer: delays 20 sec.
  23. To help show you the proper coding style. I edited your script to the following: uses Classes, Divide; var d: TDivObject; procedure dd begin d := TDivObject.Create; with d do begin Def.Add('128=0,0|128=0,2|128=0,4'); Def.Add('212=2,0|212=2,2|212=2,4'); Def.Add('128=4,0|128=4,2|128=4,4'); end; end; begin dd; if IsObject(d, 1041, 123) then begin timestamp ('cave'); delay (3000); end else begin timestamp ('notcave'); delay (3000); end; end; Other than that, I don't see anything wrong. And since you said it works. I didn't bother to do more than a glance at it.
  24. It works! uses Classes,divide; var d: TDivObject; procedure dd begin d := TDivObject.Create; with d do begin Def.Add('128=0,0|128=0,2|128=0,4'); Def.Add('212=2,0|212=2,2|212=2,4'); Def.Add('128=4,0|128=4,2|128=4,4'); end; end; begin dd; if IsObject(d, 1041, 123) then begin timestamp ('cave'); delay (3000); end else begin timestamp ('notcave'); delay (3000); end; end;
  25. @minimxWell, I hope that the new information will help you.
  26. There is a couple of problems with the code. And both problems are because of the information given in the help file. Problem 1: Even though the information to declare and initialize the DivObject is present. You had failed to initialize the DivObject. Solve 1: See Objects in Divide in the Help file. The information given here is not complete. But, it does give you the information to properly initialize the DivObject. Problem 2: The syntax given in the Help file for the IsObject function is wrong. And the code given in the Example should be better than what's there. Solve 2: I have been working on the Help file for that last several weeks. Trying to catch problems like this. And to make it better by giving better examples. Examples that actually work if you copy and paste the code into Divide. Although I had not gotten to redoing the IsObject page in the Help file. I went ahead and done so, so that I can post the proper information here for you. IsObject: IsObject Description: IsObject is a function that will check to see if a object, defined in a DivObject, is present on the screen. Then it will return a value of True or False as to whether or not the object was found. More information on how to use Object in Divide. See Objects In Divide Syntax: IsObject(objectName: TDivObject, XCoord: Integer, YCoord: Integer):ReturnValue; Parameters: Parameter Description ObjectName The name of the TDivObject to search for. X Is the X coordinate to start searching for the DivObject at. Y Is the Y coordinate to start searching for the DivObject at. Return value: Value Description Boolean True = the DivObject was found. False = the DivObject was not found. Examples: Example 1 uses Classes, Divide; var objMyTestObject: TDivObject; //declaration of the TDivObject { the procedure to initialize the object that we will be using. } procedure InitMyTestObject; begin objMyTestObject := TDivObject.Create; with objMyTestObject do begin Def.Add('128=0,0|128=0,2|128=0,4'); Def.Add('212=2,0|212=2,2|212=2,4'); Def.Add('128=4,0|128=4,2|128=4,4'); end; end; begin { call the InitMyTestObject procedure to initialize the objMyTestObject so that we can use it. } InitMyTestObject; { Now lets check to see if we can find the object. } if IsObject(objMyTestObject, 583, 256) then TimeStamp('The Object was found.') else TimeStamp('The Object was not found.'); end; Although the example code is complete, proper and will run without any errors. You will not see the TimeStamp in the True block of the if statement. That is because the values used in the definition of the DivObject was just thrown together. But, it is code that you can look at and see the proper way of doing things.
  27. That is what this post is for, you are amazing and we are here for the long road! Thank you soo much!
  1. Load more activity

Announcements

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.