Jump to content
Sign in to follow this  
Dirk Diggler

check if an something in array

Recommended Posts

Dirk Diggler

how to do this check as simple as possible? would i check every element in array is equal to this "something", or in AutoIt implemented somesthing like this

If $a in $_myarray Then  ...

I can't find out....

Edited by Dirk Diggler

Share this post


Link to post
Share on other sites
Xenobiologist

Hi,

For $i = 0 To Ubound(yourArray) -1
If $comapre = yourArray[$i] Then
...
Else
...
Endif
Next

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Simucal

how to do this check as simple as possible? would i check every element in array is equal to this "something", or in AutoIt implemented somesthing like this

If $a in $_myarray Then  ...

I can't find out....

#include <Array.au3>
$a_myarray = StringSplit("Bob,Mary,Joe,Sam,Matt,Michael,Merlin",",")
$s_search = "Matt"
$ret = _ArraySearch($a_myarray, $s_search)
If $ret <> - 1 Then
    MsgBox(0, "Found", "Element found in the array!")
Else
    MsgBox(0, "Not Found", "Element Not found In the array!")
EndIf
Edited by Simucal

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×