BoxSymbol Clock.png
This is an archive.
See the new ClickWiki at https://clickwiki.github.io. This version is just an archive for the purposes of migrating content to the new structure.


Jump to: navigation, search

Search

Icon Search Object.png
Author Official extension or is supported by Clickteam.
Status Released
Release Date Unknown
Last Updated {{{LastUpdated}}}
Available for Not yet documented
Supported Runtimes Windows Runtime
License Free
Attributes {{{Attributes}}}
Download
Includes Examples Yes
Includes Help Files Yes
Links
Downloadable via the Extension Manager
Included by default.
Alternates {{{Alternates}}}

The Search object searches text files for a specific word or phrase and reports back with the location of the search string. If you are unsure of the name of the file, you can search using a wildcard option. Clickteam Fusion 2.5 will even perform your searches in the background while your application is running.

Clickteam Fusion 2.5 lets you control your searches using a range of powerful options. You can specify the search string and then set the drive and directory in which the search will begin. The search can be limited to a single directory or can scan through all the folders and subdirectories starting at a specified position. You can check for either complete words or partial phrases, and test for a particular combination of capital and lowercase letters in your text.

Clickteam Fusion 2.5 provides two types of searches:

  • Simple searches look through your files a section at a time and stop when the search string is found or when the end of the search path is reached. Simple searches are used when you're searching for unpredictable information or when the search files are subject to change.
  • Index searches look through all the files in a single batch. They record the position details of any successful matches in an index file. Once you've created an index, you can quickly look through the results of the search.

Properties

Files Directory

Enter Directory

Enter the directory where to search. Example: c:\mydocs.

File selection wildcards

Wildcards

Enter the wildcards to select the files where to do the search. Example: *.txt will search in every text files in the given directory.

Options

Match whole word

The search will only look for whole words. Example, a search for "text" will be positive for the word text but not for the word textexample.

Match case

If selected, the capital and small letters must match.

Search in subdirectories

If selected, the search will be conducted in all the subdirectories of the "Files directory".

Conditions

Text found?

Tests to see if the text string has been found.

Search in progress?

Tests to see if a search is currently being conducted by the Search object.

Index built?

Tests to see if an index search is complete.

Building index?

Tests to see if an index is currently being built by the Search object.

Whole word search?

Tests to see if a whole word search is currently being conducted by the Search object

Case search?

Tests to see if a case-sensitive search is currently being conducted by the Search object.

Search in subdirectories?

Tests to see if a search is being conducted in the folder's subdirectories.

Actions

Set Priority

The Set Priority action changes the priority that the search has over other application tasks. The priority is a number between one and 100, with 100 being the maximum priority. The search will take longer with a low priority, but it will interfere less with other tasks the application may be running concurrently.

Set Search Directory

The Set Search Directory action sets the initial drive and directory that Clickteam Fusion 2.5 will search in for the search string.

Set Search Files Wildcards

The Set Search Files Wildcards action changes the name of the file, type of file, or wildcard that is searched for.

Whole Word Search

The Whole Word Search actions determine whether the Search object looks for whole words or parts of words. If whole word search is On, the Search object will only look for whole words. If whole word search is Off, the Search object will look for the search string within other words.

Case Search

The Case Search actions determine whether or not the Search object is case sensitive. If case search is On, the Search object will only return words that exactly match the letters of the search string. If case search is Off, the Search object will return all words that match the search string, irrespective of the case.

Search In Subdirectories

The Search In Subdirectories action determines whether the Search object looks in subdirectories. If Search In Subdirectories is On, the Search object will look in subdirectories. If Search In Subdirectories is Off, the Search object will not look in subdirectories.

Simple Search

The Simple Search actions change the way a simple search is conducted by the search object. The Simple Search actions are:

Find text

Searches for a search string. Enter the search string within the quotation marks in the Expression Evaluator or retrieve a string variable from another object. Repeated use of this action will not return additional instances of the search string because the search starts at the beginning each time.

Stop searching

Stops the simple search that is currently being conducted.

Find previous

Finds the previous occurrence of a search string. You must already have used the "Find text" and "Find next" actions before this action can be performed.

Find next

Finds the next occurrence of a search string. You must already have used the "Find text" action before this action can be performed.

Index Search

The Index Search actions build, load, and navigate indexes using the Search object. The Index Search actions are:

Build index

Builds an index file of all occurrences of the search string.

Stop building index

Stops an index currently being built.

Load index

Loads a previously saved index.

Save index

Saves an index that has been built using the Search object.

Find first entry in index

Finds the first entry of an index.

Find previous entry in index

Finds the next entry of an index if the "Find next entry in index" has already been used.

Find next entry in index

Finds the next entry in an index.

Expressions

Note: The expression code provided below assume that the Search object in your frame is named Search, which is the default. If it is not, then you must switch it out in your expression code. For example, if your Search object is named hello, then SelLine( "Search" ) becomes SelLine( "hello" ).

Functions retrieved from the Search object work best with files in standard Text or ASCII format. Some file formats, such as .RTF or HTML include extra formatting characters that will be detected by the Search object. This means that the actual position of the text on the screen may be different from the value retrieved by Clickteam Fusion 2.5. The functions that you can retrieve from the Search object are:

Get Result Filename

Search filename$( "Search" )

The Get Result Filename function retrieves the name of the file containing the current match. If the search failed, you'll get an empty string ("") instead. Use this function after you've found a text string using a Text Found condition.

Get Result Line Number

Search line( "Search" )

The Get Result Line Number function retrieves the line number containing the search string found in your document. The lines are numbered from the top of the file starting at zero. If the search was unsuccessful, you'll get a value of zero.

Get Result Position In Line

Search position( "Search" )

The Get Result Position In Line function retrieves the column number containing the search string found in your document. Each character represents a column and they are numbered from left to right starting at one. If the search was unsuccessful, you'll get a value of zero.

Get Index Building Progression

Search idx prog( "Search" )

The Get Index Building Progression function retrieves the result of the index currently being built. The result will be a number ranging from zero to 100 and indicates the percentage of the index that has been completed.

Get Searched Text

Search text$( "Search" )

The Get Searched Text function retrieves the text string that the Search object is searching for and automatically saves it with your index files. Use this function after you have loaded an index using the Load Index action.

Get Searched Directory

Search directory$( "Search" )

The Get Searched Directory function retrieves the drive and directory that the Search object is currently searching in.

Get Searched Wildcards

Search wildcards$( "Search" )

The Get Searched Wildcards function retrieves the wildcards that the Search object is currently using.


Contributors to this page

Advaith (100.0%)