Jump to content
Macro Express Forums

I never successfuly use "repeat until not egal"


Recommended Posts

successfully*

 

Hello,

 

For exemple this code is my only problem :

 

<COMMENT Value="Accepte l'invitation."/>
<VARIABLE SET INTEGER Option="\x00" Destination="%N[1]%" Value="%bleu_invitation%"/>
<REPEAT UNTIL Variable="%N[1]%" Condition="\x01" Value="%bleu_invitation%"/>
<MOUSE MOVE Option="\x01" X="%pos_accepter_invitation[1]%" Y="%pos_accepter_invitation[2]%" _PROMPT="0x000A"/>
<MOUSE LEFT CLICK/>
<COMMENT/>
<TEXT BOX DISPLAY Title="débug :" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1036{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs36 %pos_accepter_invitation[1]%,%pos_accepter_invitation[2]%,%pos_inte_invitation[1]%,%pos_inte_invitation[2]%,%N[1]%,%bleu_invitation%\r\n\\par }\r\n" Left="Left" Top="Bottom" Width="278" Height="300" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
<COMMENT/>
<DELAY Flags="\x01" Time="500"/>
<MOUSE MOVE Option="\x01" X="0" Y="0" _PROMPT="0x000A"/>
<DELAY Flags="\x02" Time="500"/>
<GET PIXEL COLOR Option="\x01" Rel_To_Screen="TRUE" X="%pos_inte_invitation[1]%" Y="%pos_inte_invitation[2]%" Destination="%N[1]%"/>
<COMMENT/>
<TEXT BOX DISPLAY Title="débug :" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1036{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs36 bip.\r\n\\par }\r\n" Left="Left" Top="Bottom" Width="278" Height="300" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
<TEXT BOX DISPLAY Title="débug :" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1036{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs36 %pos_accepter_invitation[1]%,%pos_accepter_invitation[2]%,%pos_inte_invitation[1]%,%pos_inte_invitation[2]%,%N[1]%,%bleu_invitation%\r\n\\par }\r\n" Left="Left" Top="Bottom" Width="278" Height="300" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/>
<COMMENT/>
<COMMENT Value="Calibrage debug."/>
<VARIABLE SET DECIMAL Option="\x00" Destination="%bug_zone%" Value="1.7"/>
<MACRO RUN Use_ID="FALSE" Name="- CALIBRAGE # - auto-debug." ID="-1" Wait="TRUE"/>
<END REPEAT/>
<VARIABLE SET DECIMAL Option="\x00" Destination="%bug_counter%" Value="0"/>

I created 2 debugs to know where is the problem, it's just here :

<GET PIXEL COLOR Option="\x01" Rel_To_Screen="TRUE" X="%pos_inte_invitation[1]%" Y="%pos_inte_invitation[2]%" Destination="%N[1]%"/>
The macro just gets stuck at this exact moment, all after is not done, and the loops stops, and I don't know what is the problem. I have this only with "not egal" condition.
Link to comment
Share on other sites

the moment of the bug :

<GET PIXEL COLOR Option="\x01" Rel_To_Screen="TRUE" X="%pos_inte_invitation[1]%" Y="%pos_inte_invitation[2]%" Destination="%N[1]%"/>

 

is the moment where %N[1]% become different of %bleu_invitation% (the condition of the repeat). And it bugs.

Link to comment
Share on other sites

Just before the bug (with the TEXT BOX DISPLAY debuger) :

%pos_accepter_invitation[1]% = 1218

%pos_accepter_invitation[2]% = 651

%pos_inte_invitation[1]% = 1002

%pos_inte_invitation[2]% = 603

%N[1]% = 16754480

%bleu_invitation% = 16754480

 

I know it bug exactly at <GET PIXEL COLOR Option="\x01" Rel_To_Screen="TRUE" X="%pos_inte_invitation[1]%" Y="%pos_inte_invitation[2]%" Destination="%N[1]%"/> because the text box just after not displays.

Link to comment
Share on other sites

Others can better help you if you post your macro in a form that can be copied (as you did) and in a form that can be read, like this:

// Accepte l'invitation.
Variable Set Integer %N[1]% to %bleu_invitation%
Repeat Until %N[1]% Does not Equal "%bleu_invitation%"
  Mouse Move: %pos_accepter_invitation[1]%, %pos_accepter_invitation[2]% Relative to Screen
  Mouse Left Click
   
  Text Box Display: débug :
   
  Delay: 500 seconds
  Mouse Move: 0, 0 Relative to Screen
  Delay: 500 milliseconds
  Get Pixel Color at (%pos_inte_invitation[1]%, %pos_inte_invitation[2]%) Relative to Screen into %N[1]%
   
  Text Box Display: débug :
   
  // Calibrage debug.
  Variable Set Decimal %bug_zone% to 1.7
  Macro Run: - CALIBRAGE # - auto-debug.
End Repeat
Variable Set Decimal %bug_counter% to 0

You can copy your macro in a readable format by highlighting the macro commands, right-clicking your mouse and choosing "Copy Command Text".

 

Looking at your macro in a format that we can read it shows that you have a delay of 500 seconds. That is more than 8 minutes.

  • Like 1
Link to comment
Share on other sites

Yes, I asked to the support, and Stan Jones aswered me very fast the same thing.... A fail ! It happened to me sometimes, but this time I not saw it !! Crazy... I spent few hours to debug it...

 

Thank you to you two. And ok for the copy paste.

 

Everytimes I use delays, I check it, but everytime I use "not egal" on repeat, I have this kind of problem, so this time I not checked delays. Strange coincidence, because I done a really big macro, 3000 line codes, 15 parts, config ini file, calibrage system, very stable, dynamic, optimised, I'm not a noob :(.

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