Out of system resources

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Out of system resources

Post by teyoh » Tue Jun 17, 2014 3:25 pm

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.

fightcancer
Macro Veteran
Posts: 250
Joined: Fri Apr 15, 2005 8:32 am

Re: Out of system resources

Post by fightcancer » Tue Jun 17, 2014 6:18 pm

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.

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Re: Out of system resources

Post by teyoh » Tue Jun 17, 2014 8:23 pm

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.

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
Memory and processor are barely used.

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Re: Out of system resources

Post by teyoh » Tue Jun 17, 2014 9:02 pm

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.

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

PaulSR
Pro Scripter
Posts: 65
Joined: Mon Aug 05, 2013 2:58 pm
Location: Edinburgh/Peterborough

Re: Out of system resources

Post by PaulSR » Wed Jun 18, 2014 7:54 am

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

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Re: Out of system resources

Post by teyoh » Wed Jun 18, 2014 11:55 am

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?

PaulSR
Pro Scripter
Posts: 65
Joined: Mon Aug 05, 2013 2:58 pm
Location: Edinburgh/Peterborough

Re: Out of system resources

Post by PaulSR » Wed Jun 18, 2014 1:19 pm

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?

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Re: Out of system resources

Post by teyoh » Wed Jun 18, 2014 2:26 pm

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.

PaulSR
Pro Scripter
Posts: 65
Joined: Mon Aug 05, 2013 2:58 pm
Location: Edinburgh/Peterborough

Re: Out of system resources

Post by PaulSR » Wed Jun 18, 2014 3:28 pm

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 :wink:

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.

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Re: Out of system resources

Post by teyoh » Wed Jun 18, 2014 3:50 pm

So far you been tremendously helpful, only if helping me over forums is tiresome for you I'd end it. :D

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. :wink: I'm still puzzled how I get this error once and not the other time, when using same process of using image recognition wizard. :?:

PaulSR
Pro Scripter
Posts: 65
Joined: Mon Aug 05, 2013 2:58 pm
Location: Edinburgh/Peterborough

Re: Out of system resources

Post by PaulSR » Thu Jun 19, 2014 7:52 am

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

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Re: Out of system resources

Post by teyoh » Thu Jun 19, 2014 9:54 am

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:

Code: Select all

FindImagePos>%BMP_DIR%\image_1.bmp,%TEMP_DIR%\screenrect.bmp,WINDOW:Something,0.7,1,XArr,YArr,NumFound,CCOEFF

PaulSR
Pro Scripter
Posts: 65
Joined: Mon Aug 05, 2013 2:58 pm
Location: Edinburgh/Peterborough

Re: Out of system resources

Post by PaulSR » Thu Jun 19, 2014 10:20 am

Ah ok - so if you do your standard image recognition you get something like this :

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
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

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
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.
Last edited by PaulSR on Mon Jun 23, 2014 11:14 am, edited 1 time in total.

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Re: Out of system resources

Post by teyoh » Thu Jun 19, 2014 10:34 am

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

teyoh
Newbie
Posts: 16
Joined: Tue Jun 17, 2014 3:18 pm

Re: Out of system resources

Post by teyoh » Fri Jun 20, 2014 9:16 am

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. :(

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts