01-11-2015, 04:03 AM
In the time between creating my last help thread and posting this one, I have been messing around with some of the simple stuff in QM and reading the manual like it were a bible. Anyways, I'm just wondering if anybody can guide me in the right direction for understanding a few major key elements that QM is equipped with.
I'm not going to try to explain what I need to learn, instead I'm going to use noob code in order to try and explain what I'm trying to learn. Also, I don't know if I'm looking at it the right way, but I was wondering if it's a good idea to create functions with have "steps" of a macro. So, thank you for checking out this thread and all the help you provide me with will make me a better QM scripter.
if image.isFound(); then
click image;
wait for newImage;
else if newImage.isfound(); then
click newImage;
etc. Basically, what I'm trying to learn is how you can use if and else with finding an image on the screen. And instead of writing a big long list which the macro runs through, you could split up the list into separate functions? So instead of writing a long list, you would put each step of the macro within a function then the main macro would consist of only those functions perhaps. Another noob code of what im talking about:
new function isAtHome {
if image.isFound(); then
return true;
else
wait for image
return; }
new function step2 {
blah blah blah will contain the second portion which is completely identical to the first, simple looking for an image and when its found either click it drag it etc
MAIN MACRO:
if isAtHome = true then {
function step2
Again, I really appreciate help. And also, thank you for understanding the learning process and helping.
I'm not going to try to explain what I need to learn, instead I'm going to use noob code in order to try and explain what I'm trying to learn. Also, I don't know if I'm looking at it the right way, but I was wondering if it's a good idea to create functions with have "steps" of a macro. So, thank you for checking out this thread and all the help you provide me with will make me a better QM scripter.
if image.isFound(); then
click image;
wait for newImage;
else if newImage.isfound(); then
click newImage;
etc. Basically, what I'm trying to learn is how you can use if and else with finding an image on the screen. And instead of writing a big long list which the macro runs through, you could split up the list into separate functions? So instead of writing a long list, you would put each step of the macro within a function then the main macro would consist of only those functions perhaps. Another noob code of what im talking about:
new function isAtHome {
if image.isFound(); then
return true;
else
wait for image
return; }
new function step2 {
blah blah blah will contain the second portion which is completely identical to the first, simple looking for an image and when its found either click it drag it etc
MAIN MACRO:
if isAtHome = true then {
function step2
Again, I really appreciate help. And also, thank you for understanding the learning process and helping.