Leaderboard
Popular Content
Showing content with the highest reputation on 06/25/2013 in all areas
-
Description: PreExpand expands constant and enum variables in an AutoIt script. The reluctance users have to using constant or enum variables, is because you're using additional variables, sometimes Global. Though in all honesty using constants is a preferred approach for most programmers, as it provides easier to read code and means to debug quicker. It's also a way of eliminating magic numbers. But enough about that, have a look at the following examples to get a better idea. Before: Local Const $CONST_VAR_1 = @ScriptDir, $CONST_VAR_2 = True, $CONST_VAR_3 = @ScriptDir Const $CONST_VAR_4 = True, $CONST_VAR_5 = @ScriptDir, $CONST_VAR_6 = "Some String Number 6" Local Const $CONST_VAR_7 = False Const $CONST_VAR_8 = 929 Global Const $CONST_VAR_9 = 933, $CONST_VAR_10 = 769.665784479817 Local Const $CONST_VAR_11 = @ScriptDir, $CONST_VAR_12 = True, $CONST_VAR_13 = "Some String Number 13" Local Const $CONST_VAR_14 = "Some String Number 14", $CONST_VAR_15 = "Some String Number 15", $CONST_VAR_16 = @ScriptDir Local Const $CONST_VAR_17 = False, $CONST_VAR_18 = @ScriptDir Local Const $CONST_VAR_19 = "Some String Number 19", $CONST_VAR_20 = "Some String Number 20" Const $CONST_VAR_21 = True, $CONST_VAR_22 = 228.61349680461 Local Const $CONST_VAR_23 = "Some String Number 23", $CONST_VAR_24 = @ScriptDir, $CONST_VAR_25 = False Global Const $CONST_VAR_26 = True, $CONST_VAR_27 = 171.124138467945 Global Const $CONST_VAR_28 = @ScriptDir, $CONST_VAR_29 = @ScriptDir, $CONST_VAR_30 = @ScriptDir Global Const $CONST_VAR_31 = 308, $CONST_VAR_32 = 659.485720483586 Const $CONST_VAR_33 = "Some String Number 33", $CONST_VAR_34 = @ScriptDir, $CONST_VAR_35 = @ScriptDir, $CONST_VAR_36 = False, $CONST_VAR_37 = False Local Const $CONST_VAR_38 = 994.699117473094 Global Const $CONST_VAR_39 = 345.137656846782, $CONST_VAR_40 = @ScriptDir, $CONST_VAR_41 = @ScriptDir, $CONST_VAR_42 = "Some String Number 42", $CONST_VAR_43 = @ScriptDir Const $CONST_VAR_44 = @ScriptDir Global Const $CONST_VAR_45 = 21.8916724964511, $CONST_VAR_46 = @ScriptDir, $CONST_VAR_47 = 400 Local Const $CONST_VAR_48 = @ScriptDir, $CONST_VAR_49 = "Some String Number 49" Const $CONST_VAR_50 = True, $CONST_VAR_51 = 694, $CONST_VAR_52 = "Some String Number 52", $CONST_VAR_53 = "Some String Number 53" Global Const $CONST_VAR_54 = 69.0704407929443, $CONST_VAR_55 = "Some String Number 55" Local Const $CONST_VAR_56 = False, $CONST_VAR_57 = @ScriptDir, $CONST_VAR_58 = True, $CONST_VAR_59 = 469.03752424242 Local Const $CONST_VAR_60 = "Some String Number 60", $CONST_VAR_61 = 672.557973664952, $CONST_VAR_62 = 980.679561085301 Local Const $CONST_VAR_63 = 638.447331566829 Const $CONST_VAR_64 = "Some String Number 64", $CONST_VAR_65 = 335 Global Const $CONST_VAR_66 = True, $CONST_VAR_67 = True Local Const $CONST_VAR_68 = False Const $CONST_VAR_69 = "Some String Number 69", $CONST_VAR_70 = @ScriptDir Global Const $CONST_VAR_71 = @ScriptDir, $CONST_VAR_72 = "Some String Number 72", $CONST_VAR_73 = @ScriptDir Global Const $CONST_VAR_74 = 231, $CONST_VAR_75 = "Some String Number 75", $CONST_VAR_76 = @ScriptDir Global Const $CONST_VAR_77 = True Global Const $CONST_VAR_78 = 50.2678008952644, $CONST_VAR_79 = True, $CONST_VAR_80 = "Some String Number 80" Local Const $CONST_VAR_81 = 941.841832005186, $CONST_VAR_82 = @ScriptDir, $CONST_VAR_83 = "Some String Number 83" Local Const $CONST_VAR_84 = @ScriptDir, $CONST_VAR_85 = 222.873421458993, $CONST_VAR_86 = @ScriptDir Const $CONST_VAR_87 = False, $CONST_VAR_88 = True, $CONST_VAR_89 = True Local Const $CONST_VAR_90 = @ScriptDir, $CONST_VAR_91 = "Some String Number 91" Local Const $CONST_VAR_92 = False Global Const $CONST_VAR_93 = "Some String Number 93", $CONST_VAR_94 = False Global Const $CONST_VAR_95 = 112 Const $CONST_VAR_96 = False, $CONST_VAR_97 = True, $CONST_VAR_98 = True, $CONST_VAR_99 = "Some String Number 99", $CONST_VAR_100 = False Global Const $CONST_VAR_101 = "Some String Number 101" Local Const $CONST_VAR_102 = True, $CONST_VAR_103 = @ScriptDir Const $CONST_VAR_104 = @ScriptDir, $CONST_VAR_105 = "Some String Number 105", $CONST_VAR_106 = "Some String Number 106", $CONST_VAR_107 = @ScriptDir Const $CONST_VAR_108 = @ScriptDir, $CONST_VAR_109 = @ScriptDir, $CONST_VAR_110 = @ScriptDir, $CONST_VAR_111 = False, $CONST_VAR_112 = False Global Const $CONST_VAR_113 = @ScriptDir Const $CONST_VAR_114 = @ScriptDir, $CONST_VAR_115 = "Some String Number 115", $CONST_VAR_116 = 569 Global Const $CONST_VAR_117 = "Some String Number 117", $CONST_VAR_118 = 817, $CONST_VAR_119 = True Local Const $CONST_VAR_120 = @ScriptDir, $CONST_VAR_121 = "Some String Number 121", $CONST_VAR_122 = True Global Const $CONST_VAR_123 = True Const $CONST_VAR_124 = 972.01836516778, $CONST_VAR_125 = @ScriptDir, $CONST_VAR_126 = "Some String Number 126", $CONST_VAR_127 = @ScriptDir Global Const $CONST_VAR_128 = False, $CONST_VAR_129 = 102.34518263978, $CONST_VAR_130 = 247, $CONST_VAR_131 = 485, $CONST_VAR_132 = @ScriptDir Global Const $CONST_VAR_133 = @ScriptDir, $CONST_VAR_134 = False, $CONST_VAR_135 = 185, $CONST_VAR_136 = @ScriptDir Local Const $CONST_VAR_137 = "Some String Number 137", $CONST_VAR_138 = @ScriptDir, $CONST_VAR_139 = 684.853763477178, $CONST_VAR_140 = "Some String Number 140", $CONST_VAR_141 = "Some String Number 141" Const $CONST_VAR_142 = 15, $CONST_VAR_143 = 894, $CONST_VAR_144 = @ScriptDir, $CONST_VAR_145 = @ScriptDir, $CONST_VAR_146 = "Some String Number 146" Global Const $CONST_VAR_147 = True, $CONST_VAR_148 = "Some String Number 148" Const $CONST_VAR_149 = "Some String Number 149", $CONST_VAR_150 = 685, $CONST_VAR_151 = 876, $CONST_VAR_152 = False, $CONST_VAR_153 = @ScriptDir Const $CONST_VAR_154 = "Some String Number 154", $CONST_VAR_155 = 346, $CONST_VAR_156 = True Const $CONST_VAR_157 = @ScriptDir, $CONST_VAR_158 = 428.429060575552, $CONST_VAR_159 = "Some String Number 159" Const $CONST_VAR_160 = @ScriptDir, $CONST_VAR_161 = 465, $CONST_VAR_162 = True, $CONST_VAR_163 = "Some String Number 163" Local Const $CONST_VAR_164 = False, $CONST_VAR_165 = 905.929007398197, $CONST_VAR_166 = "Some String Number 166", $CONST_VAR_167 = False, $CONST_VAR_168 = False Local Const $CONST_VAR_169 = @ScriptDir, $CONST_VAR_170 = True Const $CONST_VAR_171 = "Some String Number 171" Global Const $CONST_VAR_172 = False, $CONST_VAR_173 = 745, $CONST_VAR_174 = True, $CONST_VAR_175 = "Some String Number 175" Global Const $CONST_VAR_176 = False, $CONST_VAR_177 = 129, $CONST_VAR_178 = True Const $CONST_VAR_179 = "Some String Number 179", $CONST_VAR_180 = "Some String Number 180", $CONST_VAR_181 = "Some String Number 181" Local Const $CONST_VAR_182 = "Some String Number 182", $CONST_VAR_183 = "Some String Number 183" Global Const $CONST_VAR_184 = @ScriptDir, $CONST_VAR_185 = 187.73177490104 Const $CONST_VAR_186 = 352.337569564348 Const $CONST_VAR_187 = 311.494611016707, $CONST_VAR_188 = 270 Local Const $CONST_VAR_189 = @ScriptDir, $CONST_VAR_190 = "Some String Number 190", $CONST_VAR_191 = "Some String Number 191", $CONST_VAR_192 = 174.566120439675 Local Const $CONST_VAR_193 = "Some String Number 193" Const $CONST_VAR_194 = True, $CONST_VAR_195 = "Some String Number 195", $CONST_VAR_196 = @ScriptDir Local Const $CONST_VAR_197 = "Some String Number 197", $CONST_VAR_198 = @ScriptDir Const $CONST_VAR_199 = "Some String Number 199" Const $CONST_VAR_200 = "Some String Number 200", $CONST_VAR_201 = @ScriptDir Local Const $CONST_VAR_202 = "Some String Number 202", $CONST_VAR_203 = "Some String Number 203", $CONST_VAR_204 = "Some String Number 204" Local Const $CONST_VAR_205 = False, $CONST_VAR_206 = @ScriptDir, $CONST_VAR_207 = @ScriptDir Const $CONST_VAR_208 = 883.095158747165, $CONST_VAR_209 = @ScriptDir, $CONST_VAR_210 = @ScriptDir, $CONST_VAR_211 = True Const $CONST_VAR_212 = "Some String Number 212", $CONST_VAR_213 = "Some String Number 213", $CONST_VAR_214 = True Const $CONST_VAR_215 = True, $CONST_VAR_216 = True Local Const $CONST_VAR_217 = @ScriptDir Global Const $CONST_VAR_218 = "Some String Number 218", $CONST_VAR_219 = "Some String Number 219", $CONST_VAR_220 = @ScriptDir, $CONST_VAR_221 = "Some String Number 221", $CONST_VAR_222 = False Local Const $CONST_VAR_223 = "Some String Number 223", $CONST_VAR_224 = @ScriptDir Const $CONST_VAR_225 = "Some String Number 225" Global Const $CONST_VAR_226 = True Const $CONST_VAR_227 = @ScriptDir, $CONST_VAR_228 = @ScriptDir, $CONST_VAR_229 = 124, $CONST_VAR_230 = False, $CONST_VAR_231 = "Some String Number 231" Local Const $CONST_VAR_232 = 536.685596249066, $CONST_VAR_233 = "Some String Number 233", $CONST_VAR_234 = @ScriptDir, $CONST_VAR_235 = False, $CONST_VAR_236 = False Const $CONST_VAR_237 = "Some String Number 237", $CONST_VAR_238 = 658.447164270561, $CONST_VAR_239 = @ScriptDir Const $CONST_VAR_240 = 140, $CONST_VAR_241 = 790, $CONST_VAR_242 = "Some String Number 242", $CONST_VAR_243 = 848.363330695312, $CONST_VAR_244 = True Const $CONST_VAR_245 = 153.434925925918, $CONST_VAR_246 = 750.900167408632 Global Const $CONST_VAR_247 = False, $CONST_VAR_248 = True, $CONST_VAR_249 = 908.597750271671, $CONST_VAR_250 = True Const $CONST_VAR_251 = 654.769560016459, $CONST_VAR_252 = True Global Const $CONST_VAR_253 = True, $CONST_VAR_254 = "Some String Number 254", $CONST_VAR_255 = 785, $CONST_VAR_256 = @ScriptDir, $CONST_VAR_257 = "Some String Number 257" Global Const $CONST_VAR_258 = "Some String Number 258", $CONST_VAR_259 = 966, $CONST_VAR_260 = "Some String Number 260", $CONST_VAR_261 = @ScriptDir Local Const $CONST_VAR_262 = "Some String Number 262", $CONST_VAR_263 = @ScriptDir, $CONST_VAR_264 = False, $CONST_VAR_265 = "Some String Number 265" Const $CONST_VAR_266 = 410.872590442421, $CONST_VAR_267 = @ScriptDir, $CONST_VAR_268 = @ScriptDir Const $CONST_VAR_269 = "Some String Number 269", $CONST_VAR_270 = 76, $CONST_VAR_271 = @ScriptDir, $CONST_VAR_272 = 285, $CONST_VAR_273 = 498 Global Const $CONST_VAR_274 = @ScriptDir, $CONST_VAR_275 = True, $CONST_VAR_276 = @ScriptDir, $CONST_VAR_277 = False, $CONST_VAR_278 = False Global Const $CONST_VAR_279 = "Some String Number 279", $CONST_VAR_280 = @ScriptDir ConsoleWrite($CONST_VAR_1 & @CRLF) ConsoleWrite($CONST_VAR_2 & @CRLF) ConsoleWrite($CONST_VAR_3 & @CRLF) ConsoleWrite($CONST_VAR_4 & @CRLF) ConsoleWrite($CONST_VAR_5 & @CRLF) ConsoleWrite($CONST_VAR_6 & @CRLF) ConsoleWrite($CONST_VAR_7 & @CRLF) ConsoleWrite($CONST_VAR_8 & @CRLF) ConsoleWrite($CONST_VAR_9 & @CRLF) ConsoleWrite($CONST_VAR_10 & @CRLF) ConsoleWrite($CONST_VAR_11 & @CRLF) ConsoleWrite($CONST_VAR_12 & @CRLF) ConsoleWrite($CONST_VAR_13 & @CRLF) ConsoleWrite($CONST_VAR_14 & @CRLF) ConsoleWrite($CONST_VAR_15 & @CRLF) ConsoleWrite($CONST_VAR_16 & @CRLF) ConsoleWrite($CONST_VAR_17 & @CRLF) ConsoleWrite($CONST_VAR_18 & @CRLF) ConsoleWrite($CONST_VAR_19 & @CRLF) ConsoleWrite($CONST_VAR_20 & @CRLF) ConsoleWrite($CONST_VAR_21 & @CRLF) ConsoleWrite($CONST_VAR_22 & @CRLF) ConsoleWrite($CONST_VAR_23 & @CRLF) ConsoleWrite($CONST_VAR_24 & @CRLF) ConsoleWrite($CONST_VAR_25 & @CRLF) ConsoleWrite($CONST_VAR_26 & @CRLF) ConsoleWrite($CONST_VAR_27 & @CRLF) ConsoleWrite($CONST_VAR_28 & @CRLF) ConsoleWrite($CONST_VAR_29 & @CRLF) ConsoleWrite($CONST_VAR_30 & @CRLF) ConsoleWrite($CONST_VAR_31 & @CRLF) ConsoleWrite($CONST_VAR_32 & @CRLF) ConsoleWrite($CONST_VAR_33 & @CRLF) ConsoleWrite($CONST_VAR_34 & @CRLF) ConsoleWrite($CONST_VAR_35 & @CRLF) ConsoleWrite($CONST_VAR_36 & @CRLF) ConsoleWrite($CONST_VAR_37 & @CRLF) ConsoleWrite($CONST_VAR_38 & @CRLF) ConsoleWrite($CONST_VAR_39 & @CRLF) ConsoleWrite($CONST_VAR_40 & @CRLF) ConsoleWrite($CONST_VAR_41 & @CRLF) ConsoleWrite($CONST_VAR_42 & @CRLF) ConsoleWrite($CONST_VAR_43 & @CRLF) ConsoleWrite($CONST_VAR_44 & @CRLF) ConsoleWrite($CONST_VAR_45 & @CRLF) ConsoleWrite($CONST_VAR_46 & @CRLF) ConsoleWrite($CONST_VAR_47 & @CRLF) ConsoleWrite($CONST_VAR_48 & @CRLF) ConsoleWrite($CONST_VAR_49 & @CRLF) ConsoleWrite($CONST_VAR_50 & @CRLF) ConsoleWrite($CONST_VAR_51 & @CRLF) ConsoleWrite($CONST_VAR_52 & @CRLF) ConsoleWrite($CONST_VAR_53 & @CRLF) ConsoleWrite($CONST_VAR_54 & @CRLF) ConsoleWrite($CONST_VAR_55 & @CRLF) ConsoleWrite($CONST_VAR_56 & @CRLF) ConsoleWrite($CONST_VAR_57 & @CRLF) ConsoleWrite($CONST_VAR_58 & @CRLF) ConsoleWrite($CONST_VAR_59 & @CRLF) ConsoleWrite($CONST_VAR_60 & @CRLF) ConsoleWrite($CONST_VAR_61 & @CRLF) ConsoleWrite($CONST_VAR_62 & @CRLF) ConsoleWrite($CONST_VAR_63 & @CRLF) ConsoleWrite($CONST_VAR_64 & @CRLF) ConsoleWrite($CONST_VAR_65 & @CRLF) ConsoleWrite($CONST_VAR_66 & @CRLF) ConsoleWrite($CONST_VAR_67 & @CRLF) ConsoleWrite($CONST_VAR_68 & @CRLF) ConsoleWrite($CONST_VAR_69 & @CRLF) ConsoleWrite($CONST_VAR_70 & @CRLF) ConsoleWrite($CONST_VAR_71 & @CRLF) ConsoleWrite($CONST_VAR_72 & @CRLF) ConsoleWrite($CONST_VAR_73 & @CRLF) ConsoleWrite($CONST_VAR_74 & @CRLF) ConsoleWrite($CONST_VAR_75 & @CRLF) ConsoleWrite($CONST_VAR_76 & @CRLF) ConsoleWrite($CONST_VAR_77 & @CRLF) ConsoleWrite($CONST_VAR_78 & @CRLF) ConsoleWrite($CONST_VAR_79 & @CRLF) ConsoleWrite($CONST_VAR_80 & @CRLF) ConsoleWrite($CONST_VAR_81 & @CRLF) ConsoleWrite($CONST_VAR_82 & @CRLF) ConsoleWrite($CONST_VAR_83 & @CRLF) ConsoleWrite($CONST_VAR_84 & @CRLF) ConsoleWrite($CONST_VAR_85 & @CRLF) ConsoleWrite($CONST_VAR_86 & @CRLF) ConsoleWrite($CONST_VAR_87 & @CRLF) ConsoleWrite($CONST_VAR_88 & @CRLF) ConsoleWrite($CONST_VAR_89 & @CRLF) ConsoleWrite($CONST_VAR_90 & @CRLF) ConsoleWrite($CONST_VAR_91 & @CRLF) ConsoleWrite($CONST_VAR_92 & @CRLF) ConsoleWrite($CONST_VAR_93 & @CRLF) ConsoleWrite($CONST_VAR_94 & @CRLF) ConsoleWrite($CONST_VAR_95 & @CRLF) ConsoleWrite($CONST_VAR_96 & @CRLF) ConsoleWrite($CONST_VAR_97 & @CRLF) ConsoleWrite($CONST_VAR_98 & @CRLF) ConsoleWrite($CONST_VAR_99 & @CRLF) ConsoleWrite($CONST_VAR_100 & @CRLF) ConsoleWrite($CONST_VAR_101 & @CRLF) ConsoleWrite($CONST_VAR_102 & @CRLF) ConsoleWrite($CONST_VAR_103 & @CRLF) ConsoleWrite($CONST_VAR_104 & @CRLF) ConsoleWrite($CONST_VAR_105 & @CRLF) ConsoleWrite($CONST_VAR_106 & @CRLF) ConsoleWrite($CONST_VAR_107 & @CRLF) ConsoleWrite($CONST_VAR_108 & @CRLF) ConsoleWrite($CONST_VAR_109 & @CRLF) ConsoleWrite($CONST_VAR_110 & @CRLF) ConsoleWrite($CONST_VAR_111 & @CRLF) ConsoleWrite($CONST_VAR_112 & @CRLF) ConsoleWrite($CONST_VAR_113 & @CRLF) ConsoleWrite($CONST_VAR_114 & @CRLF) ConsoleWrite($CONST_VAR_115 & @CRLF) ConsoleWrite($CONST_VAR_116 & @CRLF) ConsoleWrite($CONST_VAR_117 & @CRLF) ConsoleWrite($CONST_VAR_118 & @CRLF) ConsoleWrite($CONST_VAR_119 & @CRLF) ConsoleWrite($CONST_VAR_120 & @CRLF) ConsoleWrite($CONST_VAR_121 & @CRLF) ConsoleWrite($CONST_VAR_122 & @CRLF) ConsoleWrite($CONST_VAR_123 & @CRLF) ConsoleWrite($CONST_VAR_124 & @CRLF) ConsoleWrite($CONST_VAR_125 & @CRLF) ConsoleWrite($CONST_VAR_126 & @CRLF) ConsoleWrite($CONST_VAR_127 & @CRLF) ConsoleWrite($CONST_VAR_128 & @CRLF) ConsoleWrite($CONST_VAR_129 & @CRLF) ConsoleWrite($CONST_VAR_130 & @CRLF) ConsoleWrite($CONST_VAR_131 & @CRLF) ConsoleWrite($CONST_VAR_132 & @CRLF) ConsoleWrite($CONST_VAR_133 & @CRLF) ConsoleWrite($CONST_VAR_134 & @CRLF) ConsoleWrite($CONST_VAR_135 & @CRLF) ConsoleWrite($CONST_VAR_136 & @CRLF) ConsoleWrite($CONST_VAR_137 & @CRLF) ConsoleWrite($CONST_VAR_138 & @CRLF) ConsoleWrite($CONST_VAR_139 & @CRLF) ConsoleWrite($CONST_VAR_140 & @CRLF) ConsoleWrite($CONST_VAR_141 & @CRLF) ConsoleWrite($CONST_VAR_142 & @CRLF) ConsoleWrite($CONST_VAR_143 & @CRLF) ConsoleWrite($CONST_VAR_144 & @CRLF) ConsoleWrite($CONST_VAR_145 & @CRLF) ConsoleWrite($CONST_VAR_146 & @CRLF) ConsoleWrite($CONST_VAR_147 & @CRLF) ConsoleWrite($CONST_VAR_148 & @CRLF) ConsoleWrite($CONST_VAR_149 & @CRLF) ConsoleWrite($CONST_VAR_150 & @CRLF) ConsoleWrite($CONST_VAR_151 & @CRLF) ConsoleWrite($CONST_VAR_152 & @CRLF) ConsoleWrite($CONST_VAR_153 & @CRLF) ConsoleWrite($CONST_VAR_154 & @CRLF) ConsoleWrite($CONST_VAR_155 & @CRLF) ConsoleWrite($CONST_VAR_156 & @CRLF) ConsoleWrite($CONST_VAR_157 & @CRLF) ConsoleWrite($CONST_VAR_158 & @CRLF) ConsoleWrite($CONST_VAR_159 & @CRLF) ConsoleWrite($CONST_VAR_160 & @CRLF) ConsoleWrite($CONST_VAR_161 & @CRLF) ConsoleWrite($CONST_VAR_162 & @CRLF) ConsoleWrite($CONST_VAR_163 & @CRLF) ConsoleWrite($CONST_VAR_164 & @CRLF) ConsoleWrite($CONST_VAR_165 & @CRLF) ConsoleWrite($CONST_VAR_166 & @CRLF) ConsoleWrite($CONST_VAR_167 & @CRLF) ConsoleWrite($CONST_VAR_168 & @CRLF) ConsoleWrite($CONST_VAR_169 & @CRLF) ConsoleWrite($CONST_VAR_170 & @CRLF) ConsoleWrite($CONST_VAR_171 & @CRLF) ConsoleWrite($CONST_VAR_172 & @CRLF) ConsoleWrite($CONST_VAR_173 & @CRLF) ConsoleWrite($CONST_VAR_174 & @CRLF) ConsoleWrite($CONST_VAR_175 & @CRLF) ConsoleWrite($CONST_VAR_176 & @CRLF) ConsoleWrite($CONST_VAR_177 & @CRLF) ConsoleWrite($CONST_VAR_178 & @CRLF) ConsoleWrite($CONST_VAR_179 & @CRLF) ConsoleWrite($CONST_VAR_180 & @CRLF) ConsoleWrite($CONST_VAR_181 & @CRLF) ConsoleWrite($CONST_VAR_182 & @CRLF) ConsoleWrite($CONST_VAR_183 & @CRLF) ConsoleWrite($CONST_VAR_184 & @CRLF) ConsoleWrite($CONST_VAR_185 & @CRLF) ConsoleWrite($CONST_VAR_186 & @CRLF) ConsoleWrite($CONST_VAR_187 & @CRLF) ConsoleWrite($CONST_VAR_188 & @CRLF) ConsoleWrite($CONST_VAR_189 & @CRLF) ConsoleWrite($CONST_VAR_190 & @CRLF) ConsoleWrite($CONST_VAR_191 & @CRLF) ConsoleWrite($CONST_VAR_192 & @CRLF) ConsoleWrite($CONST_VAR_193 & @CRLF) ConsoleWrite($CONST_VAR_194 & @CRLF) ConsoleWrite($CONST_VAR_195 & @CRLF) ConsoleWrite($CONST_VAR_196 & @CRLF) ConsoleWrite($CONST_VAR_197 & @CRLF) ConsoleWrite($CONST_VAR_198 & @CRLF) ConsoleWrite($CONST_VAR_199 & @CRLF) ConsoleWrite($CONST_VAR_200 & @CRLF) ConsoleWrite($CONST_VAR_201 & @CRLF) ConsoleWrite($CONST_VAR_202 & @CRLF) ConsoleWrite($CONST_VAR_203 & @CRLF) ConsoleWrite($CONST_VAR_204 & @CRLF) ConsoleWrite($CONST_VAR_205 & @CRLF) ConsoleWrite($CONST_VAR_206 & @CRLF) ConsoleWrite($CONST_VAR_207 & @CRLF) ConsoleWrite($CONST_VAR_208 & @CRLF) ConsoleWrite($CONST_VAR_209 & @CRLF) ConsoleWrite($CONST_VAR_210 & @CRLF) ConsoleWrite($CONST_VAR_211 & @CRLF) ConsoleWrite($CONST_VAR_212 & @CRLF) ConsoleWrite($CONST_VAR_213 & @CRLF) ConsoleWrite($CONST_VAR_214 & @CRLF) ConsoleWrite($CONST_VAR_215 & @CRLF) ConsoleWrite($CONST_VAR_216 & @CRLF) ConsoleWrite($CONST_VAR_217 & @CRLF) ConsoleWrite($CONST_VAR_218 & @CRLF) ConsoleWrite($CONST_VAR_219 & @CRLF) ConsoleWrite($CONST_VAR_220 & @CRLF) ConsoleWrite($CONST_VAR_221 & @CRLF) ConsoleWrite($CONST_VAR_222 & @CRLF) ConsoleWrite($CONST_VAR_223 & @CRLF) ConsoleWrite($CONST_VAR_224 & @CRLF) ConsoleWrite($CONST_VAR_225 & @CRLF) ConsoleWrite($CONST_VAR_226 & @CRLF) ConsoleWrite($CONST_VAR_227 & @CRLF) ConsoleWrite($CONST_VAR_228 & @CRLF) ConsoleWrite($CONST_VAR_229 & @CRLF) ConsoleWrite($CONST_VAR_230 & @CRLF) ConsoleWrite($CONST_VAR_231 & @CRLF) ConsoleWrite($CONST_VAR_232 & @CRLF) ConsoleWrite($CONST_VAR_233 & @CRLF) ConsoleWrite($CONST_VAR_234 & @CRLF) ConsoleWrite($CONST_VAR_235 & @CRLF) ConsoleWrite($CONST_VAR_236 & @CRLF) ConsoleWrite($CONST_VAR_237 & @CRLF) ConsoleWrite($CONST_VAR_238 & @CRLF) ConsoleWrite($CONST_VAR_239 & @CRLF) ConsoleWrite($CONST_VAR_240 & @CRLF) ConsoleWrite($CONST_VAR_241 & @CRLF) ConsoleWrite($CONST_VAR_242 & @CRLF) ConsoleWrite($CONST_VAR_243 & @CRLF) ConsoleWrite($CONST_VAR_244 & @CRLF) ConsoleWrite($CONST_VAR_245 & @CRLF) ConsoleWrite($CONST_VAR_246 & @CRLF) ConsoleWrite($CONST_VAR_247 & @CRLF) ConsoleWrite($CONST_VAR_248 & @CRLF) ConsoleWrite($CONST_VAR_249 & @CRLF) ConsoleWrite($CONST_VAR_250 & @CRLF) ConsoleWrite($CONST_VAR_251 & @CRLF) ConsoleWrite($CONST_VAR_252 & @CRLF) ConsoleWrite($CONST_VAR_253 & @CRLF) ConsoleWrite($CONST_VAR_254 & @CRLF) ConsoleWrite($CONST_VAR_255 & @CRLF) ConsoleWrite($CONST_VAR_256 & @CRLF) ConsoleWrite($CONST_VAR_257 & @CRLF) ConsoleWrite($CONST_VAR_258 & @CRLF) ConsoleWrite($CONST_VAR_259 & @CRLF) ConsoleWrite($CONST_VAR_260 & @CRLF) ConsoleWrite($CONST_VAR_261 & @CRLF) ConsoleWrite($CONST_VAR_262 & @CRLF) ConsoleWrite($CONST_VAR_263 & @CRLF) ConsoleWrite($CONST_VAR_264 & @CRLF) ConsoleWrite($CONST_VAR_265 & @CRLF) ConsoleWrite($CONST_VAR_266 & @CRLF) ConsoleWrite($CONST_VAR_267 & @CRLF) ConsoleWrite($CONST_VAR_268 & @CRLF) ConsoleWrite($CONST_VAR_269 & @CRLF) ConsoleWrite($CONST_VAR_270 & @CRLF) ConsoleWrite($CONST_VAR_271 & @CRLF) ConsoleWrite($CONST_VAR_272 & @CRLF) ConsoleWrite($CONST_VAR_273 & @CRLF) ConsoleWrite($CONST_VAR_274 & @CRLF) ConsoleWrite($CONST_VAR_275 & @CRLF) ConsoleWrite($CONST_VAR_276 & @CRLF) ConsoleWrite($CONST_VAR_277 & @CRLF) ConsoleWrite($CONST_VAR_278 & @CRLF) ConsoleWrite($CONST_VAR_279 & @CRLF) ConsoleWrite($CONST_VAR_280 & @CRLF)After: ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 6" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(929 & @CRLF) ConsoleWrite(933 & @CRLF) ConsoleWrite(769.665784479817 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 13" & @CRLF) ConsoleWrite("Some String Number 14" & @CRLF) ConsoleWrite("Some String Number 15" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 19" & @CRLF) ConsoleWrite("Some String Number 20" & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(228.61349680461 & @CRLF) ConsoleWrite("Some String Number 23" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(171.124138467945 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(308 & @CRLF) ConsoleWrite(659.485720483586 & @CRLF) ConsoleWrite("Some String Number 33" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(994.699117473094 & @CRLF) ConsoleWrite(345.137656846782 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 42" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(21.8916724964511 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(400 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 49" & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(694 & @CRLF) ConsoleWrite("Some String Number 52" & @CRLF) ConsoleWrite("Some String Number 53" & @CRLF) ConsoleWrite(69.0704407929443 & @CRLF) ConsoleWrite("Some String Number 55" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(469.03752424242 & @CRLF) ConsoleWrite("Some String Number 60" & @CRLF) ConsoleWrite(672.557973664952 & @CRLF) ConsoleWrite(980.679561085301 & @CRLF) ConsoleWrite(638.447331566829 & @CRLF) ConsoleWrite("Some String Number 64" & @CRLF) ConsoleWrite(335 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite("Some String Number 69" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 72" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(231 & @CRLF) ConsoleWrite("Some String Number 75" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(50.2678008952644 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 80" & @CRLF) ConsoleWrite(941.841832005186 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 83" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(222.873421458993 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 91" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite("Some String Number 93" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(112 & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 99" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite("Some String Number 101" & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 105" & @CRLF) ConsoleWrite("Some String Number 106" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 115" & @CRLF) ConsoleWrite(569 & @CRLF) ConsoleWrite("Some String Number 117" & @CRLF) ConsoleWrite(817 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 121" & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(972.01836516778 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 126" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(102.34518263978 & @CRLF) ConsoleWrite(247 & @CRLF) ConsoleWrite(485 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(185 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 137" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(684.853763477178 & @CRLF) ConsoleWrite("Some String Number 140" & @CRLF) ConsoleWrite("Some String Number 141" & @CRLF) ConsoleWrite(15 & @CRLF) ConsoleWrite(894 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 146" & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 148" & @CRLF) ConsoleWrite("Some String Number 149" & @CRLF) ConsoleWrite(685 & @CRLF) ConsoleWrite(876 & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 154" & @CRLF) ConsoleWrite(346 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(428.429060575552 & @CRLF) ConsoleWrite("Some String Number 159" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(465 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 163" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(905.929007398197 & @CRLF) ConsoleWrite("Some String Number 166" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 171" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(745 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 175" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(129 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 179" & @CRLF) ConsoleWrite("Some String Number 180" & @CRLF) ConsoleWrite("Some String Number 181" & @CRLF) ConsoleWrite("Some String Number 182" & @CRLF) ConsoleWrite("Some String Number 183" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(187.73177490104 & @CRLF) ConsoleWrite(352.337569564348 & @CRLF) ConsoleWrite(311.494611016707 & @CRLF) ConsoleWrite(270 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 190" & @CRLF) ConsoleWrite("Some String Number 191" & @CRLF) ConsoleWrite(174.566120439675 & @CRLF) ConsoleWrite("Some String Number 193" & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 195" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 197" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 199" & @CRLF) ConsoleWrite("Some String Number 200" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 202" & @CRLF) ConsoleWrite("Some String Number 203" & @CRLF) ConsoleWrite("Some String Number 204" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(883.095158747165 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 212" & @CRLF) ConsoleWrite("Some String Number 213" & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 218" & @CRLF) ConsoleWrite("Some String Number 219" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 221" & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite("Some String Number 223" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 225" & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(124 & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite("Some String Number 231" & @CRLF) ConsoleWrite(536.685596249066 & @CRLF) ConsoleWrite("Some String Number 233" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite("Some String Number 237" & @CRLF) ConsoleWrite(658.447164270561 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(140 & @CRLF) ConsoleWrite(790 & @CRLF) ConsoleWrite("Some String Number 242" & @CRLF) ConsoleWrite(848.363330695312 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(153.434925925918 & @CRLF) ConsoleWrite(750.900167408632 & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(908.597750271671 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(654.769560016459 & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite("Some String Number 254" & @CRLF) ConsoleWrite(785 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 257" & @CRLF) ConsoleWrite("Some String Number 258" & @CRLF) ConsoleWrite(966 & @CRLF) ConsoleWrite("Some String Number 260" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 262" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite("Some String Number 265" & @CRLF) ConsoleWrite(410.872590442421 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite("Some String Number 269" & @CRLF) ConsoleWrite(76 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(285 & @CRLF) ConsoleWrite(498 & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(True & @CRLF) ConsoleWrite(@ScriptDir & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite(False & @CRLF) ConsoleWrite("Some String Number 279" & @CRLF) ConsoleWrite(@ScriptDir & @CRLF)Before: #include <Constants.au3> Example() Func Example() Local Const $MB_SYSTEMMODAL = 4096 Local Const $sVar = 'SomeVar', $iConsty = 1000, $sConstyVar = 'SomeConst', $iControlID = ConsoleWrite('This won''t be expanded.') Local Enum $eVar_1 = 1, $eVar_2, $eVar_3, $eVar_4 #forceref $eVar_1, $eVar_2, $eVar_3 MsgBox($MB_SYSTEMMODAL, $sVar, 'Enum Var_4: ' & $eVar_4 & @TAB & @TAB) MsgBox($MB_SYSTEMMODAL, 'Enum Var_2: ' & $eVar_2, $sConstyVar & @TAB & @TAB) EndFunc ;==>Example After: #include <Constants.au3> Example() Func Example() Local Const $iControlID = ConsoleWrite('This won''t be expanded.') MsgBox(4096, 'SomeVar', 'Enum Var_4: ' & 4 & @TAB & @TAB) MsgBox(4096, 'Enum Var_2: ' & 2, 'SomeConst' & @TAB & @TAB) EndFunc ;==>Example An example of why I use Enum: #include <MsgBoxConstants.au3> Example() Func Example() Local Enum $eAPI_FilePath, $eAPI_FileDate, $eAPI_FileData, $eAPI_Max Local $aAPI[$eAPI_Max] $aAPI[$eAPI_FilePath] = @ScriptFullPath ; It's easier to understand that this item is hold the file path date ; string, instead of using $aAPI[1]. Also if I decided to change what index ; holds what, then I only have to change the order of the Enum declaration. $aAPI[$eAPI_FileDate] = FileGetTime($aAPI[$eAPI_FilePath], Default, 1) MsgBox($MB_SYSTEMMODAL, '', $aAPI[$eAPI_FilePath] & @CRLF & _ $aAPI[$eAPI_FileDate]) EndFunc ;==>Example Download v1.4.0.0: PreExpand.zip Changelog: Thanks to everyone who tested over the last year or so. Sorry for the delay in releasing a stable version. I will admit the last change I made to the code was the 29th August 2014, though everything I wanted to add/fix had been completed before then, hence why I left it this long (waiting for people to report a bug etc.) Limitations (for now): See Readme,txt2 points
-
Advanced Pixel Search Library
robertocm reacted to FastFrench for a topic
As I was too limited by what was feasible with PixelSearch in Autoit, I wrote an optimized DLL in C++ for searching pixels on the screen. The most basic function allows you to find the pixel in a given color - as PixelSearch - but instead of returning the first found, it returns the closest to a given point. It can go much further: - Search for 'spot' the closest (NxN square containing P pixels that meet the criteria of color mentioned) - Maintains a list containing up to 1024 colors (search pixels with one color in this list) - Manages up to 1024 exclusion rectangles. We can define precisely the search pattern that you want (with a rectangle from which you "substract" several "exclusion rectangles"). You can have up to 1024 exclusion rectangles. - You can also set a 'shade variation' (same idea as with PixelSearch). - Can work on several 'snapshots' (screen captures) in memory. It is possible to retain up to 1024 snapshots simultaneously (of course, each capture consumes memory, so only use the "slots" you really need). - Works on full screen or specific window (HWND optionnal parameter) or part of it. - Also includes functions to identify the changes between two SnapShots (minimum rectangle containing all changes + number of pixels that have changed). Useful to detect movement on the screen, object state changes... - Fairly sophisticated tools provided for debugging are also included in the UDF. You can choose the type of logs you want, including the ability to view on screen the detected areas (most useful during development phasis) and record the transaction details in a log file. - For even more performance, you can capture the content of a screen memory (SnapShot, takes about the same time as or PixelSearch PixelGetColor) then do all the research you want in this snapshots (very fast functions : nearly 1000 times as fast as the native PixelGetColor). - [v1.4] : find the "best spot" - meaning the spot that has the best number of "right" colors. - [v1.4] : now provided with a tool, FFShowPixels.exe, to find colors, manage color lists, show all occurences of them on the Captured Window, and... automatically generates AutoIt or C++ code. - [v1.6] : Saves SnapShots on BitMaps (BMP and JPG supported) - [v1.6] : Modifies SnapShots with "filters" (Keep only some colors or only pixels that have changes. All other pixels can be turned to black). - [v1.7] : Can change pixels colors on SnapShots (SetPixel) - [v1.7] : Can access the Raw pixel data of SnapShots (GetRawData) - [v1.7] : Can draw back SnapShots on Screen. - [v1.8] : Bug fixes. Deleted - [v1.8.1] : Bug fixes (FastFind.au3). - [v1.8.2] : Bug fixes (FastFind.au3). - [v1.8.3] : Bug fixes (FastFind.au3). Deleted - [v1.8.4] : Should now run on early XP and Windows 2000 OS. - [v2.0] : Documentation file in english (FastFind.chm), several new functions and new feature on some old functions. - [v2.1] : Bug fixes (removed those nasty errors in message boxes) - [v2.2] : Bug fix Included in the archive: both the 32 bits and 64 bits dll (written in Visual C++ 2010), the AutoIt Wrapper, a demonstration script and a tiny Benchmark script. Here it is, your comments and suggestions are welcome. [updates/Changelog] Last Version : 2.2 FastFind 2_2.zip Version 2.2 Bug fixes FastFind 2_2.zip Version 2.1 Bug fixes FastFind 2_1.zip Version 2.0 A new documentation file, in chm format (thanks to CeramicWeasel) New functions : DrawSnapShotXY (same as DrawSnapShot, with specific top-left position for drawing). ComputeMeanValues (Gives mean Red, Green and Blue values of a SnapShot) ApplyFilterOnSnapShot (apply a AND filter on each pixels in the SnapShot) FFGetRawData (provide access to all pixel data) ShadeVariation parameter added in the following functions : KeepChanges LocalizeChanges HasChanged FastFind 2_0.zip jan 5 2012: ShowPixel Link should work now ?do=embed' frameborder='0' data-embedContent> Version 1.8 -> bug fixes Updates : FastFind 1_8_4.zip Version 1.7 -> bug fix with client coordinates -> Can change pixels colors on SnapShots (SetPixel) -> Can access the Raw pixel data of SnapShots (GetRawData). Not that this feature is not allready wrapped into autoit: you have to do it with dllcall. -> Can draw back SnapShots on Screen (DrawSnapShot). -> New function to duplicate a SnapShot (DuplicateSnapShot) FastFind 1_7.zip FFShowPixels + FastFind complete 1.7 package : ?do=embed' frameborder='0' data-embedContent> Version 1.6 -> bug fix (restriction rectangles + FFColorCount) -> New functions to export captures into BMP or JPEG Files -> New functions to create SnapShots with changes or selected colors from a previous SnapShot(FFKeepChanges & FFKeepColors). FFShowPixels1_6 wo FFShowPixels.zip Version 1.5 -> FFGetPixel bug fix. FastFind1_5.zip (Update) Version 1.4 -> A new optional parameter in SetHWnd : You can now choose to take either the full Window or only the Client area of the window. -> Several bug fixes (more reliable and consistent) -> A new search fonction : FFBestSpot. It will find the spot that contains the most "good" pixels. -> A new tool - ShowPixels.exe - will allow you to easily manage list of colors (find them on the screen, make stats...) and automatically generate AutoIt or C++ code from them. Unfortunately, the zip is too big to include ShowPixel.exe in it. So if you want this tool, just ask with pm or mail. (Update) Version 1.3 -> comments in demo scripts now in english -> Some minor bug fixed -> now both 32 bits and 64 bits dll are provided -> Several function calls are now more simple to use : the x1,y1,x2,y2 limits of the area for search functions are now optional. Default values means full window (or screen)) ** Warning ** I've changed the order of the parameters in some fonctions, to make them easier to use. So if you use any of the 3 following function, you will need to reorder the parameters if you want to update to the version 1.3 of FastFind. Func FFNearestPixel($PosX, $PosY, $Color, $Left=0, $Top=0, $Right=0, $Bottom=0, $ForceNewSnap=true, $NoSnapShot=$FFLastSnap, $WindowHandle=-1) Func FFNearestSpot($SizeSearch, $NbPixel, $PosX, $PosY, $Color, $ShadeVariation=0, $Left=0, $Top=0, $Right=0, $Bottom=0, $ForceNewSnap=true, $NoSnapShot=$FFLastSnap, $WindowHandle=-1) Func FFColorCount($ColorToCount, $ShadeVariation=0, $Left=0, $Top=0, $Right=0, $Bottom=0, $ForceNewSnap=true, $NoSnapShot=$FFLastSnap, $WindowHandle=-1) (Update) Version 1.2 I hope these library will prove useful. Please tell me how you use it and how you like it. FF1 point -
Hi, Enough of this. "Ringing home" is not something we want to see in any AutoIt executable, regardless of whether it is "cool" or not. Thread closed. M231 point
-
His response was probably a touch rude, but what he was responding to, prior to your massive rewrite, probably warranted it. First you acknowledge that what you wanted this information for was a bit sketchy, then slam the language by saying people wouldn't want others to know it was written in AutoIt because it was slow and what not. Third, you still haven't explained how you knowing what language a program was written in, allows the world to know how many programs written in it are being used? The program itself doesn't advertise this fact, you have to go digging for it in the exe file, so it's not going to spread anything outside of itself.1 point