<RetVar> = register hotkey <Var/String> to call script <Script Name>

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Locked
mark_a_condren
Posts: 1385
Joined: Wed, 3. Aug 05, 05:05
x3tc

<RetVar> = register hotkey <Var/String> to call script <Script Name>

Post by mark_a_condren » Thu, 9. Sep 10, 19:11

<RetVar> = register hotkey <Var/String> to call script <Script Name>


<RetVar> = Returns the internal ID of the assigned hotkey.
<Var/String> = Select a unique name for your hotkey and enter it here as a variable containing a string or directly as a string. This is also the name that will show in the controls menu under 'Interface'.
<Script Name> = The name of the script that will be call when the player uses the hotkey.


<RetVar> Returns the internal ID of the assigned hotkey.
It is what you need to uninstall the hotkey later and has no other use.
Save this value in a global variable/array so you can use it in your uninstall script.
This command is normally used in a setup script.


Example:

$my.script.hotkey = register hotkey 'My Script Hotkey' to call script plugin.my.script


Command Location:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21588
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 286564

Post by X2-Illuminatus » Wed, 29. Sep 10, 00:40

<RetVar> = register hotkey <Var/String> to call script <Script Name>


<RetVar> = Gibt die interne ID des zugewiesenen Hotkeys wieder.
<Var/String> = Wähle einen einzigartigen Namen für deinen Hotkey und gib ihn hier als Variable, die eine Zeichenfolge enthält, oder direkt als Zeichenfolge ein. Dies ist auch der Name der im Steuerungsmenü unter 'Interface' angezeigt wird.
<Script Name> = Der Name des Scriptes, das aufgerufen wird, wenn der Spieler den Hotkey nutzt.


<RetVar> = Gibt die interne ID des zugewiesenen Hotkeys wieder.
Dies brauchst du, um den Hotkey später wieder deinstallieren zu können und hat sonst keinen Nutzen.
Speichere diesen Wert in einer globalen Variable / Array, damit du ihn später in deinem Deinstallationsscript verwenden kannst.
Dieser Befehl wird normalerweise in einem Setup-Script genutzt.


Beispiel:

$mein.script.hotkey = register hotkey 'Mein Script Hotkey' to call script plugin.mein.script


Zu finden unter:
Last edited by X2-Illuminatus on Wed, 24. Nov 10, 22:14, edited 1 time in total.

User avatar
Capux
Posts: 2141
Joined: Sat, 31. Oct 09, 22:17
x4

[39]286564

Post by Capux » Wed, 29. Sep 10, 14:40

<RetVar> = register hotkey <Var/String> to call script <Script Name>


<RetVar> = Restituisce l'ID interno dell'hotkey.
<Var/String> = Seleziona un nome unico per l'hotkey assegnata e inseriscilo qui come variabile contenente una stringa o direttamente come stringa. Questo è anche il nome che verrà visualizzato nei controlli menu sotto la voce "Interfaccia".
<Script Name> = Il nome dello script che sarà chiamato quando il giocatore usa l'hotkey.


<RetVar> Restituisce l'ID interno del tasto assegnato.
E' quello di cui hai bisogno per disinstallare successivamente l'hotkey e non ha altri usi.
Salva questo valore in una variabile globale/array così puoi usarla nello script di disinstallazione.
Questo comando è normalmente usato in script di impostazione.


Esempio:

$my.script.hotkey = register hotkey 'Hotkey del mio script' to call script plugin.my.script


Posizione dell'istruzione nella lista:

Locked

Return to “MSCI Reference”