Jump to content
Macro Express Forums

Working with Variables


MBone

Recommended Posts

I am working on adding check to the macro i am using. I want to get away from it being just built around time and sometimes the internet is a little slower as everyone knows. i have been looking and i cant seem to find the Get color variable command. Is there a list of what all the "IF Variables" are and how to program them. Right now i am trying to work the color ones into the program.

 

Thanks

 

MBone

Link to comment
Share on other sites

THe Get Pixel Color is in the System Category. When you "get" the pixel color, MacEx converts it to an integer. Figure out the number for you target color using the Menu>Tools>Mouse Locator. FOr example this smiley's ;) color is 2287359. I can create a loop to continue assessing the pixel in this location by saving it's color to N1 and then using IF N1 = 2287359, THEN ...

 

Also, if you can figure out how to use the Wait For Web Page command, it might be better, because then you won't have to build a loop. Wait for Ping might be an option, but I don't know because I've never used it....

 

Let us know if you are able to solve your dilemma :P

Link to comment
Share on other sites

THe Get Pixel Color is in the System Category. When you "get" the pixel color, MacEx converts it to an integer. Figure out the number for you target color using the Menu>Tools>Mouse Locator. FOr example this smiley's ;) color is 2287359. I can create a loop to continue assessing the pixel in this location by saving it's color to N1 and then using IF N1 = 2287359, THEN ...

 

Also, if you can figure out how to use the Wait For Web Page command, it might be better, because then you won't have to build a loop. Wait for Ping might be an option, but I don't know because I've never used it....

 

Let us know if you are able to solve your dilemma :P

 

This should work. I was looking for it and could not find it. I did find out what color i needed. Thanks for the help.

 

MBone

Link to comment
Share on other sites

Also, if you can figure out how to use the Wait For Web Page command, it might be better, because then you

won't have to build a loop.

 

This is what I'd recommend, too, but that will only work with IE (and even then it sometimes doesn't work right

with IE 7 + Vista 32 - possibly other systems, as well, but I've never had a problem with IE 6 + XP Prof, nor

IE 7 + XP Home with SP2 or SP3).

 

If you don't use IE, the next best thing would be "Wait for Window Title to Appear".

Link to comment
Share on other sites

This is what I'd recommend, too, but that will only work with IE (and even then it sometimes doesn't work right

with IE 7 + Vista 32 - possibly other systems, as well, but I've never had a problem with IE 6 + XP Prof, nor

IE 7 + XP Home with SP2 or SP3).

 

If you don't use IE, the next best thing would be "Wait for Window Title to Appear".

 

 

Thanks for the help so far. Can some one explain the "The End if, Else, And, OR and XOr commands"

 

<IVAR2:01:01:5066061>

<MMS2:1008,983>

<DELAY:15>

<REP3:08:000001:000002:0002:1:01:N1>

<DELAY:2>

<GETPX:2:S:001008:000983>

<IFVAR2:5:02:1:N1>

<ENDIF>

<ENDREP>

 

I set this one up with some time testing it and i think i have got it work right. I have the color from the place i use to see if i am on the right screen and then put it in as N1 and then sample with N2 and then check every 2 seconds to see if it has loaded right. After that i move on to the next task.

What i dont understand and cant seem to find the correct info is how to use the ELSE, and , OR and the XOr commands. I have tried to test them out but since i am new i am not 100% that i have got it right. Any links to examples or newsgroups is great. And the getting color command was what was holding me up. Many thanks

 

MBone

Link to comment
Share on other sites

Thanks for the help so far. Can some one explain the "The End if, Else, And, OR and XOr commands"

 

<IVAR2:01:01:5066061>

<MMS2:1008,983>

<DELAY:15>

<REP3:08:000001:000002:0002:1:01:N1>

<DELAY:2>

<GETPX:2:S:001008:000983>

<IFVAR2:5:02:1:N1>

<ENDIF>

<ENDREP>

 

I set this one up with some time testing it and i think i have got it work right. I have the color from the place i use to see if i am on the right screen and then put it in as N1 and then sample with N2 and then check every 2 seconds to see if it has loaded right. After that i move on to the next task.

What i dont understand and cant seem to find the correct info is how to use the ELSE, and , OR and the XOr commands. I have tried to test them out but since i am new i am not 100% that i have got it right. Any links to examples or newsgroups is great. And the getting color command was what was holding me up. Many thanks

 

MBone

 

Did you read the Help? I think it's pretty clear and comprehensive. For example, under Help > Index > Else there are:

- detailed descriptions of all commands

- the Sample macro link at the bottom gives a simple but useful example

- the See Also... link provides further detail

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Did you read the Help? I think it's pretty clear and comprehensive. For example, under Help > Index > Else there are:

- detailed descriptions of all commands

- the Sample macro link at the bottom gives a simple but useful example

- the See Also... link provides further detail

 

--

Terry, East Grinstead, UK

 

No i didnt see it. I was looking to hard at the forest to see the trees. thanks setting me back on the right path, I didnt see the example but now i am learning.

 

The else function is quite nice that i found how to use it.

 

 

Many thanks

 

MBone

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...