Jump to content
AC Tool Forums

The WABBIT

Moderators
  • Content Count

    548
  • Joined

  • Last visited

1 Follower

About The WABBIT

  • Rank
    Forum Master
  • Birthday 02/03/1966

Profile Information

  • Gender
    Not Telling
  • Location
    Denver, Colorado

Contact Methods

  • Yahoo
    The_WABBIT1@yahoo.com

Recent Profile Visitors

15,276 profile views
  1. @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.
  2. I have one question. What Windows are you running it on? And are you using the Classic Windows theme?
  3. 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?
  4. 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.
  5. 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?
  6. 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.
  7. Alright, I don't what's going with the IsObject and CreateObject. But, I am working on them right now.
  8. 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?
  9. 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?
  10. 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;
  11. 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.
  12. @minimxWell, I hope that the new information will help you.
  13. 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.
  14. Although I checked the forums multiple of times yesterday. I just now seen your post. So my response is... Okay, after just looking at the code I can see what the problem is. But, running the script verified my findings. And it gave me the chance to post what the error message you should have been getting. And to explain it. When you ran the script above. You should have been getting the RunTime Error shown in the image below: This is one of the Standard RunTime Error messages. As you can see it has a lot of information. But the information that you will need from this error message, is the file/library name, the method/command, and where in the source code to find the problem code. These three things can be found in the following: The file/library name can be found on the second line after 'File Library'. The method/command can be found on the fourth line, It is toward the end of the line surrounded by single quotes (') just before the closing parentheses. And you get the placement in the source code, by looking at the sixth line "Source position". This has the line number and character position of the code causing the problem within the file/library named in the second line. And line five can give you a hint as to what is wrong. And sometimes it doesn't make sense. So, with the above information. We can try to figure out the problem with your script. Okay, so have have a problem with IsObject command/method on line #23 of the Unit1 file/library. And from what it looks like from line five. A parameter being used in IsObject is empty (Null, or nil). And sure enough looking at the code that you have posted. You are passing a wrong parameter to IsObject. But, the problem isn't because of a mistake on your part. It is a mistake on my part. Because after looking at the Help file. For what I have for the IsObject function. I have found that I had given the wrong information. This one is on me. So, I'll post the information in the next post.
  15. @EgoYou might want to read the OP and the rest of the thread again.
×
×
  • Create New...

Important Information

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