WaitForColor/en: Porovnání verzí

Z Wiki
Přejít na: navigace, hledání
(Založena nová stránka s textem „Repeatedly searches the screen for Bitmap1, or Bitmap2 if specified. Once found, and depending on the value of the #waitmode-…“)
Řádek 9: Řádek 9:
 
'''Waits for the pixel color at Reference1 or anywhere in the area defined by two references.'''
 
'''Waits for the pixel color at Reference1 or anywhere in the area defined by two references.'''
  
Repeatedly searches the screen for [[#bitmap1-|Bitmap1]], or [[#bitmap2-|Bitmap2]] if specified. Once found, and depending on the value of the [[#waitmode-|WaitMode]], it waits for the desired [[#color-|Color]] to appear or disappear at the [[#reference1-|Reference1]] location or (in the case of two bitmaps) in a rectangular area delimited by both references. To search for reference bitmaps, the maximum waiting time can be set using [[#wait-|Wait]], to skip multiple occurrences using [[#skip1-|Skip1]] or [[#skip2-|Skip2]], and to mask the search by using [[#maskmode1-|MaskMode1]], [[#bitmapmaskcolor1-|BitmapMaskColor1]] and [[#screenmaskcolor1-|ScreenMaskColor1]] or [[#maskmode2-|MaskMode2]], [[#bitmapmaskcolor2-|BitmapMaskColor2]] and [[#screenmaskcolor2-|ScreenMaskColor2]]. Search areas are specified by the values of [[#capturemode1-|CaptureMode1]] and [[#capturemode2-|CaptureMode2]]. If any of the bitmaps is not found, the command ends in error.
+
Repeatedly searches the screen for [[#bitmap1-|Bitmap1]], or [[#bitmap2-|Bitmap2]] if specified. Once found, and depending on the value of the [[#waitmode-|WaitMode]], it waits for the desired [[#color-|Color]] to appear or disappear at the location of [[#reference1-|Reference1]] or (in the case of two bitmaps) in a rectangular area delimited by both references. To search for reference bitmaps, the maximum waiting time can be set using [[#wait-|Wait]], to skip multiple occurrences using [[#skip1-|Skip1]] or [[#skip2-|Skip2]], and to mask the search by using [[#maskmode1-|MaskMode1]], [[#bitmapmaskcolor1-|BitmapMaskColor1]] and [[#screenmaskcolor1-|ScreenMaskColor1]] or [[#maskmode2-|MaskMode2]], [[#bitmapmaskcolor2-|BitmapMaskColor2]] and [[#screenmaskcolor2-|ScreenMaskColor2]]. Search areas are specified by the values of [[#capturemode1-|CaptureMode1]] and [[#capturemode2-|CaptureMode2]]. If any of the bitmaps is not found, the command ends in error.
  
 
== Vstupní parametry ==
 
== Vstupní parametry ==

Verze z 2. 2. 2021, 11:04

Jiné jazyky:
English • ‎čeština

Description

Alias: WFC

Waits for the pixel color at Reference1 or anywhere in the area defined by two references.

Repeatedly searches the screen for Bitmap1, or Bitmap2 if specified. Once found, and depending on the value of the WaitMode, it waits for the desired Color to appear or disappear at the location of Reference1 or (in the case of two bitmaps) in a rectangular area delimited by both references. To search for reference bitmaps, the maximum waiting time can be set using Wait, to skip multiple occurrences using Skip1 or Skip2, and to mask the search by using MaskMode1, BitmapMaskColor1 and ScreenMaskColor1 or MaskMode2, BitmapMaskColor2 and ScreenMaskColor2. Search areas are specified by the values of CaptureMode1 and CaptureMode2. If any of the bitmaps is not found, the command ends in error.

Vstupní parametry

Bitmap1

Typ Bitmap

Referenční bitmapa pro místo výskytu požadované barvy nebo první roh oblasti.

Reference1

Typ Reference

Reference pro místo výskytu požadované barvy nebo první roh oblasti.

Bitmap2

Typ Bitmap

Referenční bitmapa pro druhý roh oblasti. Pokud není zadána, bude barva zjišťována v pixelu určeném referencí Reference1.

Reference2

Typ Reference

Reference pro druhý roh oblasti.

Color

Typ Color

Požadovaná barva.

WaitMode

Typ Number

Režim čekání na barvu (0=čekání na zobrazení, 1=čekání na zmizení).

MaskMode1

Typ Number

Režim masky použité při vyhledávání bitmapy Bitmap1 (0=žádná, 1=uživatelská maska, 2=automatická maska).

BitmapMaskColor1

Typ Color

Klíčová barva uživatelské masky v bitmapě Bitmap1 (používá se pouze při MaskMode1=1).

ScreenMaskColor1

Typ Color

Klíčová barva uživatelské masky na sejmuté obrazovce, odpovídající barvě BitmapMaskColor1. Tuto hodnotu je třeba nastavit jen v případě, že se tyto dvě barvy liší.

MaskMode2

Typ Number

Režim masky použité při vyhledávání bitmapy Bitmap2 (0=žádná, 1=uživatelská maska, 2=automatická maska).

BitmapMaskColor2

Typ Color

Klíčová barva uživatelské masky v bitmapě Bitmap2 (používá se pouze při MaskMode2=1).

ScreenMaskColor2

Typ Color

Klíčová barva uživatelské masky na sejmuté obrazovce, odpovídající barvě BitmapMaskColor2. Tuto hodnotu je třeba nastavit jen v případě, že se tyto dvě barvy liší.

Skip1

Typ Number

Určuje počet výskytů bitmapy Bitmap1, které se při vyhledávání přeskočí.

Skip2

Typ Number

Určuje počet výskytů bitmapy Bitmap2, které se při vyhledávání přeskočí.

Wait

Typ Number

Doba čekání v sekundách na výskyt hledaných bitmap.

CaptureMode

Typ Number

Definuje oblast vyhledávání bitmap Bitmap1 a Bitmap2 (0=desktop, 1=aktivní okno, 2=aktivní region, 3=oblast aktivního okna, 16=klientská část aktivního okna, 257-264=monitor 1-8, 512-520=aktivní region 0-8).

Enabled

Typ Number

Povoluje nebo zakazuje příkaz. Při hodnotě 0 nebude příkaz proveden.

PreWait

Typ Number

Prodleva v milisekundách před provedením příkazu. Nemá žádný vliv je-li Enabled=0.

PostWait

Typ Number

Prodleva v milisekundách po provedení příkazu. Nemá žádný vliv je-li Enabled=0.

Výstupní parametry

Viz také

Příklady použití

Používání masky

Režimy snímání obrazovky

Řešení více výskytů hledané bitmapy

Časový limit a systémové parametry