Jump to content
Macro Express Forums

PotterHarry

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by PotterHarry

  1. Hi again rberq. It's working fully now.. The issue I was having seems to be Corel related .. here's a thread with the same sort of problem. Perhaps my macro was simulating the same scenario somehow. There seems to be no logical explanation why one brush would work and not another. Lesson learned! https://www.talkgraphics.com/showthread.php?18647-Corel-Painter-won-t-paint Thanks again..
  2. Well I made a very simple version of the main failing macro, which again would not draw. I could draw manually but not by use of the macro. Selecting a bigger brush made it work somehow. I'll try again and report back. Thanks!
  3. I worked it out! It's a function of the brushes I had selected. Picked another type of brush, and it works ???
  4. Hi I've encountered a bit of a puzzle. I'm using Windows 10. I'm drawing a line from one point to another. Mouse down / mouse move / mouse up. In Photoshop this works as I'm able to use Window activate and browse to my Untitled-1 document. In Corel Painter 2017 however, the current document is not listed when I try to browse to it. I see Corel Painter 2017 in the list, but not the document. It's not hidden. I am unable to draw a line - the mouse goes through the sequence, but nothing gets drawn. I've tried a mouse click on the doc to see if that will activate or gain focus, but no. Any suggestions? Thanks
  5. Thankyou. I have re-written some of my small macros using arrays for some variables. They are so much easier to read.. I am using one for pixel coordinates, and a different one for colour samples, and yes they are not that daunting once you give it a try! I've managed to streamline some of my clunky macros.. Thank you and best wishes....
  6. Thanks Cory. I'm reading up on arrays! I can see they are less messy than defining lots of individual variables.. Chief suspect in my original post was perhaps a variable of the wrong type, but I'm going to need some time to reconstruct those macros.
  7. Hi thanks very much for all the informative replies! I take on board what you are saying and I don't feel chastised. I'm going to re-write using a different part of the registry (arrays are a little beyond me if I am honest and my requirements are fairly straightforward) BTW I am using the Pro version.. I have looked for obvious blunders and I can't see any. Anyhow I will post again shortly. Thank you all..
  8. Hi there. I can't work this one out ... A macro creates registry keys and writes mouse coordinates into them: Get Mouse Position into (%N1%, %N99%) Relative to Screen Delay: 100 milliseconds Create Registry Key: HKEY_CLASSES_ROOT\._A ME VARIABLE_N1 Delay: 100 milliseconds Write Registry Value "%N1%" into HKEY_CLASSES_ROOT\._A ME VARIABLE_N1\ Delay: 100 milliseconds Create Registry Key: HKEY_CLASSES_ROOT\._A ME VARIABLE_N2 Delay: 100 milliseconds Write Registry Value "%N99%" into HKEY_CLASSES_ROOT\._A ME VARIABLE_N2 Delay: 100 milliseconds Text Box Display: Another macro reads the variables from the registry: Read Registry Value "HKEY_CLASSES_ROOT\._A ME VARIABLE_N1\" into %N1% Delay: 100 milliseconds Read Registry Value "HKEY_CLASSES_ROOT\._A ME VARIABLE_N2\" into %N2% Delay: 100 milliseconds Read Registry Value "HKEY_CLASSES_ROOT\._A ME VARIABLE_N3\" into %N3% Delay: 100 milliseconds Read Registry Value "HKEY_CLASSES_ROOT\._A ME VARIABLE_N4\" into %N4% Delay: 100 milliseconds Read Registry Value "HKEY_CLASSES_ROOT\._A ME VARIABLE_N5\" into %N5% Delay: 100 milliseconds Read Registry Value "HKEY_CLASSES_ROOT\._A ME VARIABLE_N6\" into %N6% Delay: 100 milliseconds Read Registry Value "HKEY_CLASSES_ROOT\._A ME VARIABLE_N7\" into %N7% Delay: 100 milliseconds Read Registry Value "HKEY_CLASSES_ROOT\._A ME VARIABLE_N8\" into %N8% Delay: 100 milliseconds Text Box Display: This is a typical result: 326 0 482 316 650 501 720 599 The second value is always zero ?? By the way I used N99 to try to solve it .. no joy What could be happening? Thanks Ian
  9. Yes I have managed to confuse things here. Lesson learned ...be a lot more descriptive (perhaps with screenshots) in the initial question. I'm leaving this for the moment to maybe have a go with VbsEdit and take a different tack. The hex editor was a free one, and I simply imported from clipboard, and being the first time I have used one I simply copied and pasted what I saw on screen into my post. It's all a learning curve! Thanks fellas for your help !!!!!
  10. No I did use excel. I created a new workbook, and from cell a1 to a5 I entered the five different numbers. I then selected them and pressed ctrl/c.
  11. The input to the hex editor, and to your macro was a vertical column of numbers in Excel. This is what I meant by a table. In the first instance I just pressed ctrl/c and then pasted into the editor. In the second I used the commands from your macro. I can't get access to my PC just now to follow your suggestions, but in the meantime can I just ask you ... does the definition of an array stipulate that the number of digits in the items in the array must be the same, such that for example 1234 2345 3456 4567 would work, but 1234 234 3456 4567 would not? Thanks.
  12. Thanks Cory. I downloaded a hex editor and in Excel I made a very small table which encompass the full range of values for my mouse coordinates (Approx range = 90 to 1600) The table is: 20 300 1500 95 1000 If I copy/paste this into the hex editor I see 00 32 30 0d 0a 33 30 30 0d 0a 31 35 30 30 0d 0a 39 35 0d 0a 31 30 30 30 0d 0a 20..300..1500..95..1000.. So I see I will need my macro to somehow recognise and separate the numbers between the full stops (periods). These are the boundaries in your last post? I downloaded your macro and when I run it I get this result ... 00 53 53 4e 09 4c 61 73 74 20 4e 61 6d 65 09 46 69 72 73 74 20 4e 61 6d 65 0d 0a 32 30 2d 2d 09 09 0d 0a 33 30 30 2d 2d 09 09 0d SSN.Last Name.First Name..20--....300--... 2a 0a 31 35 30 2d 30 2d 09 09 0d 0a 39 35 2d 2d 09 09 0d 0a 31 30 30 2d 30 2d 09 09 .150-0-....95--....100-0-.. I'm puzzled at the gaps in the large numbers? Thanks for your help, Cory. I just took a look at the split string help file and it looks pretty straight forward (Famous last words) . Running out of time, so will try again tomorrow. Thanks!
  13. Hi Cory I am going to struggle with this without some serious help! I can write a little script that gets the mouse pointer to move to a certain location of the screen. Using variables rather than absolute values. I want to pull the variables from a table in excel, such that the mouse moves to incremental positions. From your article (BTW the link to the download didn't work for me) I gather it's possible to extract a column of data from excel, and then to strip out the tabs. I'm at work now, but will have a go at this later this evening. Thanks Ian
  14. No, I didn't attempt to upload a diagram of a curve Regards Ian
  15. Hi I gather from one of Cory's posts that it is possible to extract values for variables from an excel table. I am trying to construct a macro that will draw curves, or in fact any shape, in a paint program. Wonder if you could help me work out how to implement this, please? I have taken a look at one of cory's links to http://bluepointdesi...ta/Default.aspx This is what I need to figure out. The properties of my curve can be predefined by the numbers in a column in Excel, and I can maybe get the macro to pull the info in an array from excel ? Thanks! Ian
  16. Hi Terry I will post a question to Cory Thanks again for your help !! Ian
  17. Hi again Terry.. Lets just imagine I have drawn a rainbow filling the entire area of an a4 paper. This is my first trial curve. My idea here is to use excel data to populate my x and y coordinates. I have taken a look at one of cory's links to http://bluepointdesign.com/Macros/TabularData/Default.aspx This is what I need to figure out. The properties of my curve can be predefined in Excel, and I can maybe get the macro to pull the info in an array from excel.
  18. http://www.mathopenref.com/quadraticexplorer.html A nice little utility for selecting formulas for various curves !!
  19. Hi Terry, Thanks for taking the time to make such a detailed and helpful reply ... I do have a working macro with more or less a similar structure to yours. I have produced random patterns of various lengths, but the idea of curves and parabolas is very appealing !! BUT it's the implementation that's the issue. I was never that clever at maths. I'll have a go at making my program produce a curve using a formula. That's the obvious first step, and I'll get back !! How do you export your script? Thanks Ian
  20. Thanks! rberq, this is how I draw lines of variable length. The formula suggestion Alan is very interesting .. <VARIABLE SET INTEGER Option="\x05" Destination="%X%" Minimum="%A%" Maximum="%B%"/> <VARIABLE SET INTEGER Option="\x05" Destination="%Y%" Minimum=" %F%" Maximum="%G%"/> <MOUSE SPEED Delay="250"/> <MOUSE MOVE Option="\x01" X="%X%" Y="%Y%" _PROMPT="0x000A"/> <MOUSE SPEED Delay="0"/> <DELAY Flags="\x02" Time="100"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x02" Time="1000"/> <MOUSE LEFT BUTTON DOWN/> <DELAY Flags="\x02" Time="100"/> <VARIABLE SET INTEGER Option="\x05" Destination="%N10%" Minimum="20" Maximum="180"/> <VARIABLE SET INTEGER Option="\x05" Destination="%N11%" Minimum="20" Maximum="180"/> <MOUSE SPEED Delay="250"/> <MOUSE MOVE Option="\x03" X="%N10%" Y="%N11%" _PROMPT="0x000A"/> <MOUSE SPEED Delay="0"/> <DELAY Flags="\x02" Time="100"/> <MOUSE MOVE Option="\x03" X="0" Y="150" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="200"/> <MOUSE LEFT BUTTON UP/> Sorry I can't work out how to export my script as a text file, but basically its move to a random position, mouse down, move to a second random position, mouse up !! I'll have a play with the formula suggestion, but i'm going to have to increment the positions gradually to see a curve. Maybe an array? Thanks again ......
  21. Hi, I just wonder if someone could give me some pointers here, please. I'm trying to automate the drawing of lines on an art program. Straight lines are easy enough, but I've graduated to curves now, and I'm wondering how you would approach this? I will need to specify a coordinate, and then increment its position by small amounts to make a curve. There will most likely be an obvious way to do this that I'm quite likely to overlook .... Thank you !!!
  22. Hi again .. was testing the method above, and moved the mouse pointer 10 pixels in the x direction, paused one second, then returned the pointer -10 pixels to bring it back to its original position. This I did to test if the donut icon moved with it... Anyway, this has solved the problem !! Maybe my initial presumptions were wrong, but I'm happy now ..... thanks!
  23. Alan, thank you for your reply. You have given me the solution. When I click the mouse in the area, and when the program is working out the dimensions and extent of the selected area, there is a spinning "donut" like icon with colours that I can test for at a specific number of pixels away. Will post my code here when I work it out. Thanks again.
  24. Hi, need your help ! My macro is designed to help me colour layers in a graphic program (Manga Studio) The tool palette is similar to photoshop with magic wand, eyedropper and fill tools. The macro selects the magic wand tool for me, I move to the image and select an area, then it moves to the colour palette, I select a colour and it sends the mouse back to my selection and fills it with the colour. If the area is a small one everything works fine, and I have my fill completed for me. However, If the area is a large one it fails. I am assuming the mouse is moving to the eyedropper before the selection has had time to become active. Is there any way to test that the selection process is complete, before the macro moves on ... Why not just put a delay in? Delays don't work too well, as for some reason the selection can take several seconds to complete, and such a long delay would be quite annoying for small repetitive selected areas. Would really appreciate some ideas...
×
×
  • Create New...