Outils pour utilisateurs

Outils du site


fr:documentation:script_reference

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
fr:documentation:script_reference [2014/10/11 14:28] pchfr:documentation:script_reference [2017/02/28 15:58] (Version actuelle) pch
Ligne 1: Ligne 1:
-FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)//+====== Référence des scripts ======
  
-====== Script reference ======+Cette page contient du matériel de référence pour les fonctions de script.
  
-This page contain reference material for scripting functions.+Voir la page [[toolbox|Boîtes à outils]] pour des informations générales.
  
-See the [[toolbox|Tool Box]] description page for general information.+Voir les [[script example|exemples de scripts]] pour un démarrage rapide avec les fonctions de programmation
  
-See the [[script example|script example]] page for a quick start with the programming functions+===== Langage de script ===== 
 +Le langage de programmation utilisé est [[wp>Pascal_Script|Pascal Script]].\\ 
 +Pour une référence complète du langage Pascal Objet, vous pouvez lire [[http://www.freepascal.org/docs-html/ref/ref.html|Free Pascal Reference guide]]. Mais attention, certaines fonctionnalités ne sont pas implémentées par le langage de script, par exemple: pas de pointeur, pas d'assembleur, pas de surcharge.
  
-===== Script language =====+En plus des fonctions standard de Pascal Script, les fonctions suivantes spécifiques à Cartes du Ciel  sont ajoutées.
  
-The language to use is [[wp>Pascal_Script|Pascal Script]].\\ +===== Fonctions du menu principal =====
-For a complete reference of the Object Pascal language your can read the [[http://www.freepascal.org/docs-html/ref/ref.html|Free Pascal Reference guide]]. But beware that some feature are not implemented by the script language, for example: no pointer, no assembler, no overloading.  +
  
-In addition to the standard Pascal Script feature the following Skychart specific function are added.+Tous les éléments du menu principal peuvent être utilisés à partir des scripts\\ 
 +La liste complète des noms de menu est disponible à partir de la [[http://sourceforge.net/p/skychart/code/HEAD/tree/trunk/skychart/menu.txt|liste des menus]].\\
  
-===== Main menu function =====+Vous pouvez exécuter l'action du menu à l'aide de la méthode Click ou tester si une option est activée en testant la propriété Checked.
  
-Every items of the main menu can be used from the scripts.\\ +===== Chaînes des traductions =====
-The full list of menu items name is available from the [[http://sourceforge.net/p/skychart/code/HEAD/tree/trunk/skychart/menu.txt|menu list]].\\+
  
-You can execute the menu action by using the Click method, or test if an option is activated by testing the Checked property.+Chaque chaîne traduite pour le programme principal peut être utilisée dans un script. \\ 
 +Utilisez directement la constante rsXXX pour obtenir la chaîne traduite. \\ 
 +La liste complète des chaînes disponibles est disponible à partir du [[http://sourceforge.net/p/skychart/code/HEAD/tree/trunk/skychart/u_translation.pas|code source]].\\ 
 +Si une chaîne n'est pas traduite pour votre langue n'hésitez pas [[:en:translations#software_translation|à le faire vous même]].
  
-===== Translation string ===== +===== Constantes =====
- +
-Every string translated for the main program can be used in a script.\\ +
-Directly use the rsXXX constant to get the translated string.\\ +
-The full list of available string is available from the [[http://sourceforge.net/p/skychart/code/HEAD/tree/trunk/skychart/u_translation.pas|source code]].\\ +
-If a string is not translated for your language don't hesitate [[:en:translations#software_translation|to do it yourself]]. +
- +
-===== Constants =====+
  
 ^name^value^ ^name^value^
 |deg2rad| degree to radian conversion constant| |deg2rad| degree to radian conversion constant|
 |rad2deg| radian to degree conversion constant| |rad2deg| radian to degree conversion constant|
-===== Global variables access =====+ 
 +===== Accès aux variables globales =====
  
 ^function GetS(varname:string; var str: string):Boolean;^^ ^function GetS(varname:string; var str: string):Boolean;^^
Ligne 110: Ligne 108:
 |Variant1 .. Variant10|Ten global variable for your use| |Variant1 .. Variant10|Ten global variable for your use|
  
-===== Chart and Celestial objects =====+===== Carte et objets =====
  
 ^function  Cmd(cname:string; arg:Tstringlist):string;^ ^function  Cmd(cname:string; arg:Tstringlist):string;^
Ligne 137: Ligne 135:
  
  
-===== Formating and conversion =====+===== Conversion de coordonnées ===== 
 + 
 +^Procedure Eq2Hz(var ra,de : double ; var a,h : double);^ 
 +|Convert Equatorial ra,de to Alt/Az a,h for the location and time of the current chart, all angle in radian| 
 + 
 +^Procedure Hz2Eq(var a,h : double; var ra,de : double);^ 
 +|Convert Alt/Az a,h to equatorial ra,de for the location and time of the current chart, all angle in radian| 
 + 
 +^Procedure Eq2Gal(var ra,de : double ; var l,b : double);^ 
 +|Convert Equatorial ra,de to Galactic l,b , all angle in radian| 
 + 
 +^Procedure Gal2Eq(var l,b : double; var ra,de : double);^ 
 +|Convert Galactic l,b to equatorial ra,de , all angle in radian| 
 + 
 +^Procedure Eq2Ecl(var ra,de : double ; var l,b : double);^ 
 +|Convert Equatorial ra,de to Ecliptic l,b with obliquity for the date of the current chart, all angle in radian | 
 + 
 +^Procedure Ecl2Eq(var l,b : double; var ra,de : double);^ 
 +|Convert Ecliptic l,b to Equatorial ra,de with obliquity for the date of the current chart, all angle in radian| 
 + 
 + 
 + 
 +===== Conversion et Formatage =====
  
 ^Function ARtoStr(var ar: Double) : string;^ ^Function ARtoStr(var ar: Double) : string;^
Ligne 162: Ligne 182:
 ^Function Format(Const Fmt : String; const Args : Array of const) : String;^ ^Function Format(Const Fmt : String; const Args : Array of const) : String;^
 |The [[http://www.freepascal.org/docs-html/rtl/sysutils/format.html|Format]] Pascal function| |The [[http://www.freepascal.org/docs-html/rtl/sysutils/format.html|Format]] Pascal function|
 +
 +^Procedure StrtoFloatD(str:string; var defval: Double; var val: Double);^
 +|Convert a string to a floating point value. Return defval if the string is a invalid number |
  
 ^function IsNumber(str: String): boolean;^ ^function IsNumber(str: String): boolean;^
Ligne 174: Ligne 197:
  
  
-===== Dialog =====+===== Dialogues standard =====
  
 ^function OpenDialog(var fn: string): boolean;^ ^function OpenDialog(var fn: string): boolean;^
Ligne 191: Ligne 214:
 |The Skychart Calendar dialog. Return dt julian date| |The Skychart Calendar dialog. Return dt julian date|
  
-===== Run external program =====+===== Exécution de programme externes =====
  
 ^function Run(cmdline:string):boolean;^ ^function Run(cmdline:string):boolean;^
Ligne 202: Ligne 225:
 |Open a document file using the default program| |Open a document file using the default program|
  
-Also see the [[script_example|example]] about how to call a function in an external library.+Voir aussi les [[script_example|exemples de scripts ]] pour l'appel de libraires externes.
  
-===== TCP/IP client socket =====+===== Client socket TCP/IP =====
  
-For all this functions **socknum** identify the socket to useThis is a number between and 10, thus allowing 10 simultaneous connection to different server.+Pour toutes ces fonctions ** socknum ** identifie le socket à utiliserIl s'agit d'un nombre entre et 10, permettant ainsi 10 connexion simultanée à des serveurs différent.
  
 ^function TcpConnect(socknum:integer; ipaddr,port,timeout:string):boolean;^ ^function TcpConnect(socknum:integer; ipaddr,port,timeout:string):boolean;^
fr/documentation/script_reference.1413030502.txt.gz · Dernière modification : 2015/11/06 20:38 (modification externe)