ikodan Posted October 24, 2016 Report Share Posted October 24, 2016 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. Quote Link to comment Share on other sites More sharing options...
rberq Posted October 24, 2016 Report Share Posted October 24, 2016 In Macro Express 3 (not Pro), "N" variables are reserved for integers. Are you using N[1] to store text, at first, and later to receive pixel color? Is it possible that ME is confused as to which type of variable it is, causing the GET PIXEL line to fail? Quote Link to comment Share on other sites More sharing options...
ikodan Posted October 24, 2016 Author Report Share Posted October 24, 2016 Interesting idea ! But no, I use T and N for temporary variables, but it's interesting, I try with other name to see... I edit. And I use ME pro. Edit : same problem with other variable name %N[1]% > %temp_int%. Quote Link to comment Share on other sites More sharing options...
ikodan Posted October 24, 2016 Author Report Share Posted October 24, 2016 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. Quote Link to comment Share on other sites More sharing options...
rberq Posted October 24, 2016 Report Share Posted October 24, 2016 What is the initial value of %bleu_invitation%, which is used to set integer N[1]? Quote Link to comment Share on other sites More sharing options...
ikodan Posted October 24, 2016 Author Report Share Posted October 24, 2016 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. Quote Link to comment Share on other sites More sharing options...
rberq Posted October 24, 2016 Report Share Posted October 24, 2016 OK, I'm out of ideas. You could open a case with the vendor Insight. Quote Link to comment Share on other sites More sharing options...
Samrae Posted October 24, 2016 Report Share Posted October 24, 2016 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. 1 Quote Link to comment Share on other sites More sharing options...
ikodan Posted October 25, 2016 Author Report Share Posted October 25, 2016 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 . Quote Link to comment Share on other sites More sharing options...
rberq Posted October 25, 2016 Report Share Posted October 25, 2016 Been there, done that. Good catch, Sam... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.