Jump to content
Macro Express Forums

clyc84

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by clyc84

  1. I was surprized I was able to use the "or" command in the manner.. Here, I recreated the script:

    <REP3:08:000002:000001:0001:1:01:T1><WAITKEY2:000010:000000:23><OR><WAITKEY2:000010:000000:25><TBOX4:T:1:CenterCenter000278000200:000:Either X or Z has been pressed.><ENDREP>

     

    the script waits for either of the key but the same action will be executed, whereas I need to script it to be doing different action upon each key is pressed.

     

     

    My thought was to just have two separate macros--one waiting for "Z" and one wiating for "Y."

    This would avoid having to deal with the "OR" command. You might not ba able to do this though, there are rules about not having multiple macros going at the same time.

     

    What about have two separate non-looping macros that are activated with Hotkeys???

     

    Alt-x to click 'here'

    Alt-z to click 'there'

     

    -steve

     

    I thought of that too but I will not be able to run 2 macros concurrently, I will need it to be waiting for either of the 3 keys for some time therefore need it to be looping.

     

    thanks for the advice and testing :)

  2. This is a good challenge...

    I've been tinkering, but haven't figured it out. Let me confirm your meaning though:

    You want it to wait until Z *or* X is pressed--step one.

    If Z it pressed it clicks "here."

    If X is pressed it clicks "there."

    Either pressing Z or X completes step one.

    Once step one is completed any key can be pressed...

     

    Question: Once the last key is pressed, the macro stops? or it continues to loop?

    From you post it sounds like it continues to loop...

     

    If it continues to loop, maybe you don't need the, third, 'any' key.

    Just continue pressing X or Z (?)

    If this were the case though, you'd have to have a kill command to tell MacExp when you're done and want to stop looping.

     

    I was experimenting and tried:

    -Loop until T1 <>T1

    -Wait for key press Z

    --OR-

    -Wait for key press X

    -Display text box "Z or X pressed"

    -End Loop.

     

    This was syntactically correct, and if I pressed either X or Z I'd get the text box, but it was a continual loop. The macro kept running until I aborted it.

     

    I then tried:

    -Loop until T1 <>T1

    -Wait for key press Z

    -Display text box "Z pressed"

    --OR-

    -Wait for key press X

    -Display text box "X pressed"

    -End Loop.

     

    The debugger told me this is an incorrect use of "OR."

     

    It seems like you could capture a keypress and send it straight to a variable, then use logic to compare the variable.

    (If this then that) I can't see how to do this without the use of a GUI dialog box though... Maybe others have an idea. steveK

    Question: Once the last key is pressed, the macro stops? or it continues to loop?

    From you post it sounds like it continues to loop...

    it will continue to loop, and thats what i wanted it to be

    and yes my concept is to let it wait for any key press after 'Z' or 'X' or 'C' is pressed

    but currently after 'Z' is pressed it will wait for 'X' to be pressed, pressing on 'Z' or 'C' it will not response

    Question: how did u manage to run the macro with the OR operator, I am unable to even save it.

  3. trying to create a macro to wait for multiple key press to left click once activated, created one below but it will wait for the next key press after the first one:

     

    macroih1.jpg

     

    question: how can I let it wait for any key once x is pressed or z is pressed, meaning to go back to the start of the loop once any key is pressed.

×
×
  • Create New...