Scenes(シーン)概説

Introduction(導入)

A scene is a graphical user-interface consisting of a collection of elements to which tasks can be attached to be run when the user interacts with them e.g. by tapping them.

Tasker uses scenes for things like popup dialogs, menus and getting input from the user but scenes can actually be displayed by the user whenever desired, meaning they can be used for things like creating simple user-designed applications or showing extra controls over the top of (selected) existing applications.

Scenes are completely user-customisable via a drag-and-drop graphical editor.

https://tasker.joaoapps.com/userguide/en/scenes.html

シーンはいくつかの要素で構成されたグラフィカルなユーザーインターフェースです。エレメントにはタップなどのユーザーの操作に合わせて実行されるタスクを紐づけることが出来ます。

Taskerはシーンをポップアップやダイアログあるいはメニューやユーザーからの入力を受け取るために使います。そして、シーンはユーザーが必要な時に表示させることが出来ます。これはつまりユーザーが簡単なアプリを作ったり、既存のアプリをコントロールするためのツールとして利用できるということです。

シーンの構成要素は全て編集画面からドラッグ&ドロップによって編集可能です。

Displaying Scenes(シーンの表示)

Actions: Enter Key, HTML Popup, Lock, Menu, Popup, Popup Task Buttons and Variable Query(アクション:キー入力、HTMLポップアップ、ロック、メニュー、ポップアップ、タスクボタンをポップアップ、クエリー)

These actions use a built-in scene with the same name as their action. After creating a task with such an action, the associated scene can be found under the Scenes tab on the main Tasker screen. That scene can be edited so that e.g. all Popup actions have the same style because they all use the same scene.

The parameters specified in the action are applied to the scene before it is show. For instance, if the scene has a Title element it will be set to the title specified in the action and the scene resized appropriately.

It might be desirable to have a different style for e.g. some Popup actions, in which case:

  1. clone the built-in scene long-clicking on it in the Scenes tab
  2. edit the clone to change the contents
  3. in a Popup action, specify that the cloned scene should be used by clicking on the Layout parameter in the action edit screen.
https://tasker.joaoapps.com/userguide/en/scenes.html

これらのアクションは同名の組み込みシーンを使用します。これらのアクションを含むタスクを作成すると関連するシーンがTaskerのメイン画面のシーンタブに表示されます。このシーンは編集することもできます。例えばポップアップアクションで表示されるシーンは全て同じデザインのシーンですが編集することもできます。

アクションで指定されたパラメーターはシーンが表示される前に適用されます。例えば、タイトル要素を持つシーンの場合アクションのタイトルパラメーターの指定に従って設定されます。

異なるデザインのシーンが必要な場合は次のようにしてください。

  1. シーンタブに表示されているシーンを長押しして組み込みシーンをコピーします。
  2. コピーされたシーンを編集してその内容を変更します。
  3. ポップアップアクションでコピーされたシーンが使用されるようにアクション編集画面のレイアウトの項目を長押しして指定します。

Scene Category Actions: Create Scene, Show Scene, Hide Scene, Destroy Scene(シーンカテゴリーアクション:シーンの作成、シーンの表示、シーンを隠す、シーンの破棄)

These allow a completely free hand over when a scene should be displayed and it’s life-cycle. They all act on scenes pre-designed in the Scenes tab.

Usually, only Show Scene and Destroy Scene will be used, however sometimes it’s useful for a scene to be created but not visible to the user:

  • by hiding a scene instead of completely destroying it, the settings of the elements are retained for next time it is shown
  • the values of the elements in the scene can be changed to track certain events so that the scene can be immediately displayed when required without any configuration
https://tasker.joaoapps.com/userguide/en/scenes.html

これらのアクションによって完全に自由にそのライフサイクルと表示のタイミングをコントロールできます。これらのアクションはシーンタブにある既に作成済みのシーンに対して働きます。

通常はシーンの表示とシーンの破棄のみが使われますが、場合によってはシーンを非表示のまま生成した方が都合がいい場合があります。

  • シーンを完全に破棄せずに非表示にすることによって要素の設定を次回表示するときまで保持することが出来ます。
  • シーンに配置された要素の値が特定のイベントに追従して変化することで、必要な時に値の設定をせずに即座に表示することが出来ます。

Scene Elements(シーンの要素)

Each scene is comprised of a number of elements.

An element has three main components:

https://tasker.joaoapps.com/userguide/en/scenes.html

各シーンには複数の要素が含まれます。

各エレメントは三つの主要な要素から成り立ちます。

Geometry(形状)

It’s size and position on the screen. An element’s geometry is specified in the scene editor.

https://tasker.joaoapps.com/userguide/en/scenes.html

画面上での位置とサイズです。各要素の形状はシーン編集画面で指定します。

Content(表示内容)

How it looks on the screen.

Specified under the UI tab in the element editor. Some elements also have a Background tab. A Menu element has an additional Items tab.

https://tasker.joaoapps.com/userguide/en/scenes.html

画面になにが表示されるかです。

要素編集画面上にあるUIタブで指定します。いくつかの要素には背景タブも在ります。メニュー要素にはこれに加えてアイテムタブが在ります。

Event Tasks(イベントタスク)

What should happen when the user interacts with the element.

Specified under the right-most tabs after clicking on the element in the element editor. There are different events depending on the type of element. For instance, a Button has tap and long-tap events while a Slider has a value-set event.

Event tasks are run at priority one higher than the task which displayed the scene

Local variables set by event tasks are visible to all tasks in the same scene.

https://tasker.joaoapps.com/userguide/en/scenes.html

ユーザーが要素に対して操作を行ったときにどのような振る舞いをするかです。

要素編集画面で要素をタップすると表示される右のタブから指定します。要素ごとに異なるイベントがあります。例えば、ボタン要素ならばタップと長押し、スライダー要素であれば値の設定イベントです。

イベントタスクはそのシーンを表示させたタスクの一つ上の優先度で実行されます。

イベントタスク内で設定されたローカル変数は同じシーン内のすべてのタスクから参照できます。

Scene Element Actions(シーン要素アクション)

In the Scenes action category, there are several actions for setting the properties of scene elements. You can use these for a wide variety of purposes e.g.

  • when a slider value is set, change the zoom of an associated map element
  • set the size of an element depending on current light level
  • animate elements around a scene

Note that actions that affect scene elements can only be used when the scene has already been created (via Create Scene or Show Scene). The scene does not have to be visible.

https://tasker.joaoapps.com/userguide/en/scenes.html

シーンアクションカテゴリーには、シーン要素の状態を指定するためのアクションがいくつかあります。これらを使って色々な効果を実現できます。

  • スライダーの値が変更されたときに関連付けられた地図要素の倍率を変える。
  • その時の明るさに応じて要素の大きさを変える。
  • シーンの中で要素を動かす。

シーンに影響のあるアクションを実行するには、対象のシーンが(シーンの作成アクションやシーンの表示アクションなどによって)既に作成されている必要があります。この際、シーンが表示されている必要はありません。