Out of system resources
Moderators: Dorian (MJT support), JRL
Out of system resources
Hi,
I come to this program since it seams like it's very capable and easier to use then others I came upon. Hopefully I'll lern it well and start using it for daily repetitive tasks. Right now I started testing with some image recognition (came to MS cause I noticed how well wizzard is made), and in first tests it worked ok (find picture and click on it), but then I started getting this error and I can't seam to move onto learning it further until I get this fixed.
Edit:
After the error when I stop the script and lower the window in tray it says the script is still running. Also MS got no problem running sample scripts without this error.
I come to this program since it seams like it's very capable and easier to use then others I came upon. Hopefully I'll lern it well and start using it for daily repetitive tasks. Right now I started testing with some image recognition (came to MS cause I noticed how well wizzard is made), and in first tests it worked ok (find picture and click on it), but then I started getting this error and I can't seam to move onto learning it further until I get this fixed.
Edit:
After the error when I stop the script and lower the window in tray it says the script is still running. Also MS got no problem running sample scripts without this error.
-
- Macro Veteran
- Posts: 249
- Joined: Fri Apr 15, 2005 8:32 am
Re: Out of system resources
Sorry for the trouble you're having with the error. You're right about MS being very capable!
I'm not sure what the "Out of system resources" error means. Is it a MS error or a Windows error? How much RAM does your PC have? OS? How much memory is free (under Task Manager | Performance)?
As for stopping the running script(s), the default key combo is Shift + Esc.
I'm not sure what the "Out of system resources" error means. Is it a MS error or a Windows error? How much RAM does your PC have? OS? How much memory is free (under Task Manager | Performance)?
As for stopping the running script(s), the default key combo is Shift + Esc.
Re: Out of system resources
PC SPECS: AMD Phenom II X4 955 Black Editon; Gigabyte 870A-UD3; DDR3 2x2GB OCZ; Gigabyte GTX 460 1Gb, Win 7
It is MacroScheduler error. As said, other scripts work fine, this one did too at start, but then only errors, even when I remake it.
Memory and processor are barely used.
It is MacroScheduler error. As said, other scripts work fine, this one did too at start, but then only errors, even when I remake it.
Code: Select all
The script is really the most basic there is:
ScreenCapture>993,635,635,884,%TEMP_DIR%\screenrect.bmp
//Find and Left Click Center of >>PICTUREGOESHERE<<
FindImagePos>C:\Users\Workstation\Documents\Macro Scheduler 14\adm test\image_1.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>{%XArr_0%+993},{%YArr_0%+635}
LClick
Endif
Re: Out of system resources
I uninstalled the program, the script was still saved and gave same error. I deleted both of them completely and started a new one.
This time this one worked, but I'm still wondering why old one did not, so I avoid happening again.
This time this one worked, but I'm still wondering why old one did not, so I avoid happening again.
Code: Select all
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
ScreenCapture>493,491,943,933,%TEMP_DIR%\screenrect.bmp
//Find and Left Click Center of >>PICTURE GOES HERE<<
FindImagePos>%BMP_DIR%\image_1.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>{%XArr_0%+493},{%YArr_0%+491}
LClick
Endif
Re: Out of system resources
I think it might be related to you grabbing a screencapture then using it as your haystack image (this is stored in the clipboard as well - if you are going down that route you might want to put a WaitClipboard in front of the ScreenCapture command. I always use the default locations offered by the wizard when I'm doing image recognition and have the haystack specified as an onscreen window rather than an image I've captured. I always use the image recognition wizard if I can (in order to capture the needle image and make it easier to grab the window name).
Code: Select all
//Find and Left Click Center of >>>NEEDLE IMAGE<<<
FindImagePos>%BMP_DIR%\NEEDLEIMAGE.BMP,WINDOW:Macro Scheduler,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Endif
Re: Out of system resources
Hm I don't think I understood you well enough. So every time I see %TEMP_DIR% in it's path it means it is not saved in default path but clipboard? When I see %BMP_DIR% then it's ok? But how does that happen when I use image recognition wizzard every time and take a picture every time? What part am I doing wrong?
Re: Out of system resources
I haven't used that command but reading the notes it stores it at the path location AND in the clipboard. Somebody more technically inclined would be better placed to answer your question but I'm guessing this is probably an issue with memory or maybe even a full drive/location that has no room to store your images?
I'm not sure what you're trying to do with the screencapture and subsequent findimage which makes it hard to know a possible better way of doing it. Are you trying to identify and click elements that are within a window on the screen? Can you not use the wizard to setup the image you are looking for (by scraping it from the window using the wizard tool) and to identify the window you're looking for it in?
I'm not sure what you're trying to do with the screencapture and subsequent findimage which makes it hard to know a possible better way of doing it. Are you trying to identify and click elements that are within a window on the screen? Can you not use the wizard to setup the image you are looking for (by scraping it from the window using the wizard tool) and to identify the window you're looking for it in?
Re: Out of system resources
Got plenty of room on HDD and my memory and processor is not even 10% used and RAM is usually on stable 1.5/4GB.
I'm trying the ScreenCapture cause I know where the image will pop up, so I though telling MS just to focus on one part of screen is easier (faster) for it. But the task I was testing it on is really the most basic one I posted 1st time, just to see how image recognition works.
I'm trying the ScreenCapture cause I know where the image will pop up, so I though telling MS just to focus on one part of screen is easier (faster) for it. But the task I was testing it on is really the most basic one I posted 1st time, just to see how image recognition works.
Re: Out of system resources
Ah I see your logic now.
I would still recommend just using the image recognition wizard and not bothering to section off a bit of the screen - the screen recognition for a specific window is quite fast anyway
I can't help you with the specific error but if you raise a ticket with the support guys they will get back to you very quickly and help to identify the problem.
I would still recommend just using the image recognition wizard and not bothering to section off a bit of the screen - the screen recognition for a specific window is quite fast anyway
I can't help you with the specific error but if you raise a ticket with the support guys they will get back to you very quickly and help to identify the problem.
Re: Out of system resources
So far you been tremendously helpful, only if helping me over forums is tiresome for you I'd end it.
There might be a case when same picture might appear on several places but I need to click only one (something like in video tutorial with twitter), then I guess screen capture might be useful so it's handy for me to learn to use it. I'm still puzzled how I get this error once and not the other time, when using same process of using image recognition wizard.
There might be a case when same picture might appear on several places but I need to click only one (something like in video tutorial with twitter), then I guess screen capture might be useful so it's handy for me to learn to use it. I'm still puzzled how I get this error once and not the other time, when using same process of using image recognition wizard.
Re: Out of system resources
It's no problem - I've had plenty of help out of the forum so it's nice to be able to put a bit back.
In an instance where I have multiple very similar issues I've sometimes expanded the needle image to include some small detail either side of the main image in order to make that image unique from the other. Then I've used the {%XArr_0%+??} which I see you're already familiar with to ensure I click the right part of the image.
Best to just have a play with the image recognition - there's a handy script that will show you what it sees that was written by somebody here - have a look in scripts & tips folder.
edit: This is the thread/code in question : http://www.mjtnet.com/forum/viewtopic.php?f=9&t=7883
In an instance where I have multiple very similar issues I've sometimes expanded the needle image to include some small detail either side of the main image in order to make that image unique from the other. Then I've used the {%XArr_0%+??} which I see you're already familiar with to ensure I click the right part of the image.
Best to just have a play with the image recognition - there's a handy script that will show you what it sees that was written by somebody here - have a look in scripts & tips folder.
edit: This is the thread/code in question : http://www.mjtnet.com/forum/viewtopic.php?f=9&t=7883
Re: Out of system resources
Oh boy, seams like I'm far from understanding such script yet. What you said about including side of image to make it recognize it's position is something I already using, although I think I'll have to mess with some tolerance too in some cases. The {%XArr_0%+??} is something that Wizard implemented by itself when using ScreenCapture command, although I do not understand the difference why it does something like that instead of MouseMove>XArr_0,YArr_0, or what both of those tell it exactly what to do. Just wondering if MS can use both search inside the window and screen capture?
Something like this:
Something like this:
Code: Select all
FindImagePos>%BMP_DIR%\image_1.bmp,%TEMP_DIR%\screenrect.bmp,WINDOW:Something,0.7,1,XArr,YArr,NumFound,CCOEFF
Re: Out of system resources
Ah ok - so if you do your standard image recognition you get something like this :
This will click the exact middle of the image_1.bmp when it finds it in the "window select from the wizard".
When you use the {%XArr_0%+??} type stuff i.e
What you are doing is telling MS to offset the cursor position (after it has been positioned to the center of the image) by 25 pixels on both X&Y axis. If you play about with the wizard enough this stuff will start to click.
Don't worry about the complexity of that script I lined to frankly it's witchcraft to me as well - just drop it into MS, run it and watch how it works then play about with your own windows and images and you should begin to form a picture of how it all works.
Code: Select all
FindImagePos>%BMP_DIR%\image_1.bmp,A Window you've selected from the wizard,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Endif
When you use the {%XArr_0%+??} type stuff i.e
Code: Select all
FindImagePos>%BMP_DIR%\image_1.bmp,A Window you've selected from the wizard,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>{%XArr_0%+25},{%YArr_0%+25}
LClick
Endif
Don't worry about the complexity of that script I lined to frankly it's witchcraft to me as well - just drop it into MS, run it and watch how it works then play about with your own windows and images and you should begin to form a picture of how it all works.
Last edited by PaulSR on Mon Jun 23, 2014 11:14 am, edited 1 time in total.
Re: Out of system resources
I think since we going offtopic here, we rather continue this on other topic I started
http://www.mjtnet.com/forum/viewtopic.php?f=3&t=8310
http://www.mjtnet.com/forum/viewtopic.php?f=3&t=8310
Re: Out of system resources
I can confirm now that error was caused by using ScreenCapture, however I'm still unsure of why and still get it often when using screencapture option.