Function vs Indicator, is there a difference in execution
Posted: Dec 30 2015
Hello
I wrote some code line to erase specific text on screen
The code was written in an indicator and in a Function
When the code is executed in Indicator, all the selected text on screen is erased
When the code is executed in Function, only one Text is erased at the time. i need to click somewhere else on the screen and then reclick on the button to erase the next Text
The code is the same in the function and in the Indicator but it look a lot slower when executed in the function
Martin
Text Valid function
I wrote some code line to erase specific text on screen
The code was written in an indicator and in a Function
When the code is executed in Indicator, all the selected text on screen is erased
When the code is executed in Function, only one Text is erased at the time. i need to click somewhere else on the screen and then reclick on the button to erase the next Text
The code is the same in the function and in the Indicator but it look a lot slower when executed in the function
Martin
Code: Select all
Var:
ValToShow (-1),
Text_ID (-1);
ValToShow = GVSetNamedInt("Filename_B",0);
Text_ID = Text_Getfirst(3);
While Text_ID <> -2 begin;
//Print ("All ID: ", Text_ID:0:0);
// Print ("Text_ID: ", Text_ID:0:0, " TEX_ID_New: ", Text_ID_New:0:0);
//Print("Border: ", text_getBorder(Text_ID), " font name: ", text_Getfontname(Text_ID), " color: ", Text_Getcolor(Text_ID):0:0);
if A_Valid_Note_Number (text_ID)then begin
Print (Text_Id:0:0);
Text_delete(Text_ID);
end;
Text_ID = Text_GetNext(Text_ID,3);
end;
Code: Select all
Input:
Text_ID (NumericSimple);
A_Valid_Note_Number = False;
//Print ("Border: ", text_getBorder(Text_ID), " Font Name: ", text_Getfontname(Text_ID), " Color: ", Text_Getcolor(Text_ID):0:0);
if text_getBorder(Text_ID) = True and text_Getfontname(Text_ID) = "Verdana" and Text_Getcolor(Text_ID) = darkbrown then begin
//Print ("Valid: ", Text_ID:0:0);
A_Valid_Note_Number = True;
end;