Jump to content
Macro Express Forums

Repeating macro with adding up value


Recommended Posts

<DELAY Flags="\x03" Time="300"/>
<MOUSE MOVE Option="\x01" X="3593" Y="196" _PROMPT="0x000A"/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<CTRL>a"/>
<DELAY Flags="\x03" Time="300"/>

here I want to enter a value from 12760 until 12778 (the rest of the script should be repeated everytime, also the part above here)

<DELAY Flags="\x03" Time="700"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<DELAY Flags="\x03" Time="1000"/>
<MOUSE MOVE Option="\x01" X="2272" Y="232" _PROMPT="0x000A"/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE MOVE Option="\x01" X="2272" Y="294" _PROMPT="0x000A"/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="3000"/>
<MOUSE MOVE Option="\x01" X="2339" Y="306" _PROMPT="0x000A"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="1000"/>
<MOUSE MOVE Option="\x01" X="2038" Y="461" _PROMPT="0x000A"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="z"/>
<DELAY Flags="\x03" Time="500"/>
<TEXT TYPE Action="0" Text="<KEYP0>"/>
<DELAY Flags="\x03" Time="100"/>
<TEXT TYPE Action="0" Text="<KEYP0>"/>
<DELAY Flags="\x03" Time="100"/>
<TEXT TYPE Action="0" Text="<KEYP1>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<DELAY Flags="\x03" Time="750"/>
<MOUSE MOVE Option="\x01" X="2038" Y="491" _PROMPT="0x000A"/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="z"/>
<DELAY Flags="\x03" Time="500"/>
<TEXT TYPE Action="0" Text="<KEYP0>"/>
<DELAY Flags="\x03" Time="100"/>
<TEXT TYPE Action="0" Text="<KEYP0>"/>
<DELAY Flags="\x03" Time="100"/>
<TEXT TYPE Action="0" Text="<KEYP1>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<DELAY Flags="\x03" Time="750"/>
<MOUSE MOVE Option="\x01" X="2038" Y="517" _PROMPT="0x000A"/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="500"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="z"/>
<DELAY Flags="\x03" Time="500"/>
<TEXT TYPE Action="0" Text="<KEYP0>"/>
<DELAY Flags="\x03" Time="100"/>
<TEXT TYPE Action="0" Text="<KEYP0>"/>
<DELAY Flags="\x03" Time="100"/>
<TEXT TYPE Action="0" Text="<KEYP1>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<DELAY Flags="\x03" Time="750"/>
<MOUSE MOVE Option="\x01" X="2038" Y="545" _PROMPT="0x000A"/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="500"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="z"/>
<DELAY Flags="\x03" Time="500"/>
<TEXT TYPE Action="0" Text="<KEYP0>"/>
<DELAY Flags="\x03" Time="100"/>
<TEXT TYPE Action="0" Text="<KEYP0>"/>
<DELAY Flags="\x03" Time="100"/>
<TEXT TYPE Action="0" Text="<KEYP1>"/>
<DELAY Flags="\x03" Time="300"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<DELAY Flags="\x03" Time="750"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<MOUSE MOVE Option="\x01" X="2060" Y="202" _PROMPT="0x000A"/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="3000"/>
<MOUSE MOVE Option="\x01" X="2120" Y="202" _PROMPT="0x000A"/>
<DELAY Flags="\x03" Time="300"/>
<MOUSE LEFT BUTTON DOWN/>
<MOUSE LEFT BUTTON UP/>
<DELAY Flags="\x03" Time="2500"/>



I have this code which clicks through my SAP system.
The only thing I am asking you is to read my comment (in the 9th line between my code).
I want to add the value 12760, then execute the complete macro and then enter 12761 and so on, until 12778 (or any other 2 start and end values i can enter somewhere)

Link to comment
Share on other sites

Maybe something like this?

 

<MULTIPLE CHOICE MENU Style="\x00" Result="\x00" Dest="%Choice%" Title="Choose a value" Prompt="Here are the choices" Options="12760\r\n12761\r\n12762\r\n12763\r\n12764\r\n12765\r\n12766\r\n12767\r\n12768\r\n12769\r\n12770\r\n12771\r\n12772\r\n12773\r\n12774\r\n12775\r\n12776\r\n12777\r\n12778\r\n\r\n1277" Left="727" Top="341" Monitor="0" Width="506" Height="465" OnTop="TRUE" Columns="Auto"/>

 

Link to comment
Share on other sites

Or this?

 

<VARIABLE SET INTEGER Option="\x01" Destination="%MinValue%" Prompt="What is the minimum value?" Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0" Lines="\x00"/>
<VARIABLE SET INTEGER Option="\x01" Destination="%MaxValue%" Prompt="What is the maximum value?" Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0" Lines="\x00"/>
<COMMENT/>
<VARIABLE MODIFY INTEGER Option="\x01" Destination="%NumberOfRepeats%" Value1="%MaxValue%" Value2="%MinValue%"/>
<REPEAT START Start="1" Step="1" Count="%NumberOfRepeats%" Save="FALSE"/>
<COMMENT Value="Do something"/>
<END REPEAT/>
<COMMENT/>

Variable Set Integer %MinValue%: Prompt
Variable Set Integer %MaxValue%: Prompt
 
Variable Modify Integer: %NumberOfRepeats% = %MaxValue% - %MinValue%
Repeat Start (Repeat %NumberOfRepeats% times)
// Do something
End Repeat
 

 

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