### Example: Highlight Asteroids by Index (-YkE) Source: https://www.astrolog.org/ftp/astrolog.htm An example of using -YkE to highlight asteroid 5 (Astrea) in red and asteroid 10 (Hygiea) in blue. ```bash -YkE 5,Red,10,Blue ``` -------------------------------- ### Example: Define and Run a Macro for Transits Source: https://www.astrolog.org/ftp/astrolog.htm This example demonstrates defining a macro to display outer planet transits to house cusps and then running it. The macro definition can be placed in the astrolog.as config file. ```bash -M0 10 "-i yourchart -tn -RT0 jup sat ura nep plu -R0 -RC -C" ``` ```bash astrolog -M 10 ``` -------------------------------- ### Example: Highlight Asteroids by Name (-YkE) Source: https://www.astrolog.org/ftp/astrolog.htm This example demonstrates highlighting asteroids by name (Astraea and Hygiea) using -YkE, assuming the -XE switch is set for name-based labeling. ```bash -YkE Astraea,Red,Hygiea,Blue ``` -------------------------------- ### Example: Highlight Big Dipper Stars (-YkU) Source: https://www.astrolog.org/ftp/astrolog.htm This example shows how to highlight the seven stars of the Big Dipper using the -YkU switch, assigning each a distinct color from the Ray colors. ```bash -YkU Alkaid,Red,Mizar,Blue,Alioth,Green,Megrez,Yellow,Dubhe,Orange,Merak,Magenta,Phecda,Purple ``` -------------------------------- ### Modern Astrolog Chart Info File Example Source: https://www.astrolog.org/ftp/astrolog.htm This is an example of a modern chart info file, demonstrating the format for name, city, and Daylight fields. It is designed for easier understanding and modification compared to older file structures. ```text @AI770 ; Astrolog chart info. /qb Nov 19 1971 11:01am ST +8:00 122:19:59W 47:36:35N /zi "Walter D. Pullen" "Seattle, WA, USA" -- ``` -------------------------------- ### Example: Change Highlight Color (-Yk) Source: https://www.astrolog.org/ftp/astrolog.htm An example demonstrating how to change the highlight color from LtGray to Yellow using the -Yk switch. This redefines color index 2 (LtGray) to Yellow. ```bash -Yk 2 2 yellow ``` -------------------------------- ### Compute Chart Based on Index in Chart List Source: https://www.astrolog.org/ftp/astrolog.htm The -qL switch copies a chart from the in-memory chart list to the main display slot, based on the provided index. Indexes start at 0. ```bash -qL ``` -------------------------------- ### Complex Chart Analysis and Display Source: https://www.astrolog.org/ftp/astrolog.htm This example demonstrates a complex workflow involving multiple switches to find and display charts with the most Trines to a natal chart. It uses switches for grid calculation, macro definitions, filtering, and final display. ```bash astrolog -i chartlist.as -~M 1 "DoGrid2 False =c 0 For %i 0 Objs If ObjOn @i For %j 0 Objs If ObjOn @j Do =e GridNam @i @j If Equ @e A_Tri =c Inc @c" -~5Y "Macro 1 If Gt @c @d =d @c" -~5f "Macro 1 Gte @c @d" -RA0 Tri -i natalchart.as -5Y2 -i2 nul -5f "" "" -5e -g -r2 ``` -------------------------------- ### Example of Nakshatra Display with Detail Source: https://www.astrolog.org/ftp/astrolog.htm Illustrates Nakshatra display with fractional Padas and Navamsa signs. '0Lib00' becomes '14Chit3', and '0Tau00:00' becomes '3Krit2.0Cp'. ```text 14Chit3 ``` ```text 3Krit2.0Cp ``` -------------------------------- ### Customize Object Color with ~kO Source: https://www.astrolog.org/ftp/astrolog.htm Dynamically set the color for object glyphs. This example colors planets based on the zodiac sign they occupy. ```astrolog ~kO "=z ObjCol Dec Add O_Asc LonSign ObjLon @y" ``` -------------------------------- ### Example of AstroExpression Usage Source: https://www.astrolog.org/ftp/astrolog.htm Demonstrates how to use AstroExpressions with a tilde prefix for numeric dialog fields and command switches. Enclose complex expressions with spaces in single or double quotes. ```astrolog =R "~=b 0 For %a 0 Objs If ObjOn @a Do =b @a =a Objs @b" ``` -------------------------------- ### Adjust Wheel Section Color with ~kv Source: https://www.astrolog.org/ftp/astrolog.htm Customize the colors of sections within a wheel chart, such as signs, houses, or Gauquelin sectors. This example applies rainbow colors to signs, starting with red at the Sun's position. ```astrolog ~kv "If Equ @x 0 =z Blend _YXk ?: _Xr K_White K_Black Hue Sub Mul Dec @y 30 ObjLon O_Sun Div _XI1 100.0" ``` -------------------------------- ### Generate Ephemeris for a Range of Years Source: https://www.astrolog.org/ftp/astrolog.htm Use the -EY switch to generate an ephemeris for a specified number of years, starting from the current chart's year. For example, to generate an ephemeris for the entire 20th century (1900-1999), use this command. ```bash astrolog -qy 1900 -EY 100 ``` -------------------------------- ### Enable Looping Mode with Prompt on Startup (-Q0) Source: https://www.astrolog.org/ftp/astrolog.htm The -Q0 switch enables looping mode and prompts for additional switches immediately upon program startup, useful for default configurations on systems like Windows. ```bash astrolog -Q0 ``` -------------------------------- ### Search Aspects Within a Number of Years Source: https://www.astrolog.org/ftp/astrolog.htm Use the -dY switch followed by the number of years to span for aspect searches, starting from the current chart's year. For example, to search for New and Full moons for two years. ```bash astrolog -n -dY 2 -R0 sun moo -A opp ``` -------------------------------- ### Create Complete PostScript File Source: https://www.astrolog.org/ftp/astrolog.htm The -Xp0 switch creates a complete PostScript file, as opposed to an encapsulated file. ```bash -Xp0 ``` -------------------------------- ### Windows Compilation - Additional Linker Options Source: https://www.astrolog.org/ftp/astrolog.htm Manually add these libraries to the linker command line in Visual Studio for Windows compilation. ```vcxproj shlwapi.lib urlmon.lib ``` -------------------------------- ### Cast Chart with Ascendant Aligned to Sun's Sign Start Source: https://www.astrolog.org/ftp/astrolog.htm Invoke the -10 switch to rotate house cusps so that the Ascendant aligns with the start of the Sun's sign, similar to how -1 rotates cusps to place the Sun on the Ascendant. ```bash astrolog -10 ``` -------------------------------- ### Display X Chart on Root Window Source: https://www.astrolog.org/ftp/astrolog.htm For X window systems, use the -XB switch to display chart graphics directly on the root window instead of in a separate window. This is useful for setting backgrounds. ```bash astrolog -n -XB ``` -------------------------------- ### Set Gregorian Calendar Start Date with -ig Source: https://www.astrolog.org/ftp/astrolog.htm Use the '-ig' switch to specify a custom start date for the Gregorian calendar, overriding the default October 15, 1582. The virtual file '__g' accesses the current crossover date. ```bash -ig nul ``` ```bash __g ``` -------------------------------- ### Generate Dispositor Chart for a Chart File Source: https://www.astrolog.org/ftp/astrolog.htm To view dispositor charts for your own chart file, use the -i switch followed by your chart file name, combined with the -j and -X switches. ```bash astrolog -i yourchartfile -j -X ``` -------------------------------- ### Jupiter Default Small Glyph Example Source: https://www.astrolog.org/ftp/astrolog.htm Example of a default small glyph definition for Jupiter using vector drawing commands. 'U', 'D', 'L', 'R' move orthogonally, 'E', 'F', 'G', 'H' move diagonally. 'B' is for blank movement, 'N' for no update. ```text BH3RFDGDGDR5NDNR2U6E ``` -------------------------------- ### Filter Transit-to-Natal Events with ~t Source: https://www.astrolog.org/ftp/astrolog.htm The ~t directive filters transit-to-natal events. This example displays only transit events occurring on weekends. ```astrolog ~t "=a DayWeek Mon Day Yea Or Equ @a W_Sat Equ @a W_Sun" ``` -------------------------------- ### Windows Compilation - Runtime Library Setting Source: https://www.astrolog.org/ftp/astrolog.htm Visual Studio C/C++ code generation setting to statically link the C runtime library. ```vcxproj Multi-threaded (/MT) ``` -------------------------------- ### Load Chart from File (Implicit -i) Source: https://www.astrolog.org/ftp/astrolog.htm If Astrolog is invoked with a single parameter that is not a command switch and exists as a file, it is automatically treated as a file to be loaded using the -i switch. ```bash astrolog file.as ``` -------------------------------- ### Filter Transit-to-Transit Events with ~d Source: https://www.astrolog.org/ftp/astrolog.htm The ~d directive filters transit-to-transit events. This example shows how to display eclipses for the current year. ```astrolog astrolog -n -dy =Yu ~d "Gt @y 0" ``` -------------------------------- ### Customize Aspect Color with ~kA Source: https://www.astrolog.org/ftp/astrolog.htm Change the color of aspect lines. This example makes aspect lines involving the Sun or Moon magenta. ```astrolog ~kA "If Or Lte @w O_Moo Lte @y O_Moo =z K_Mag" ``` -------------------------------- ### Load All Chart Files in a Directory with -id Source: https://www.astrolog.org/ftp/astrolog.htm The '-id ' switch opens all chart files within the specified directory and loads them into the chart list. ```bash -id ``` -------------------------------- ### Filter Arabic Parts with ~P Source: https://www.astrolog.org/ftp/astrolog.htm The ~P directive filters Arabic parts. This example shows how to display only parts located within the 10th house. ```astrolog ~P "Equ LonHouse @z 10" ``` -------------------------------- ### Output Old Style Format with -Yo Source: https://www.astrolog.org/ftp/astrolog.htm Enable the -Yo switch to output chart information and position files in the old style format (version 4.10 and before). This results in simple lists of numbers in fixed fields instead of generic command switch files. ```bash -Yo ``` -------------------------------- ### Write Output to Specified File Source: https://www.astrolog.org/ftp/astrolog.htm Use the -Xo switch in conjunction with -Xb, -Xp, or -XM options to specify the output filename for bitmap or graphic images. If omitted, the program will prompt for a filename. ```bash astrolog -Xo output.bmp -Xb ``` -------------------------------- ### Adjust Progression Rate with ~p0 Source: https://www.astrolog.org/ftp/astrolog.htm Modify the rate at which charts are progressed for solar arc. This example implements a logarithmic progression rate as described by A.T. Mann. ```astrolog ~p0 "=z Mul Sgn2 Sub @x @y Sub Mul Log10 Add Div Div Abs Sub @x @y 365.242199 0.076661459 10 120 120" ``` -------------------------------- ### Enable Looping Mode with -Q Source: https://www.astrolog.org/ftp/astrolog.htm Use the -Q switch to keep Astrolog running in a loop after displaying charts, allowing for multiple operations without restarting the program. Enter '.' on a line to terminate. ```bash astrolog -Q ``` -------------------------------- ### Compute Chart Based on Info in File Source: https://www.astrolog.org/ftp/astrolog.htm The -i switch loads chart information from a specified file. It supports Astrolog's saved files (.as) and several external formats, including Astrodatabank and Solar Fire exports. The .as extension is optional. ```bash -i ``` ```bash -i mychart ``` -------------------------------- ### Number Property and Utility Functions Source: https://www.astrolog.org/ftp/astrolog.htm Functions to check if a number is odd, get its absolute value, sign, minimum, maximum, or check if it's within a range. ```APIDOC ## Odd Check ### Description Returns whether an integer is an odd number. ### Function Signature `Odd(Int)` ### Parameters - **Int** (integer) - The integer to check. ### Returns - **result** (boolean) ## Absolute Value ### Description Returns the absolute value of a number. ### Function Signature `Abs(Num)` ### Parameters - **Num** (number) - The number to get the absolute value of. ### Returns - **result** (number) ## Sign ### Description Returns the sign of a number: -1 if negative, 0 if zero, and 1 if positive. ### Function Signature `Sgn(Num)` ### Parameters - **Num** (number) - The number to get the sign of. ### Returns - **result** (number) ## Sign 2 ### Description Returns the sign of a number: -1 if negative, and 1 if non-negative. ### Function Signature `Sgn2(Num)` ### Parameters - **Num** (number) - The number to get the sign of. ### Returns - **result** (number) ## Minimum ### Description Returns the lower of two numbers. ### Function Signature `Min(Num1, Num2)` ### Parameters - **Num1** (number) - The first number. - **Num2** (number) - The second number. ### Returns - **result** (number) ## Maximum ### Description Returns the higher of two numbers. ### Function Signature `Max(Num1, Num2)` ### Parameters - **Num1** (number) - The first number. - **Num2** (number) - The second number. ### Returns - **result** (number) ## Between ### Description Returns whether a number lies within the range of two other numbers (inclusive). ### Function Signature `Tween(Num, Num1, Num2)` ### Parameters - **Num** (number) - The number to check. - **Num1** (number) - The lower bound of the range. - **Num2** (number) - The upper bound of the range. ### Returns - **result** (boolean) ## If/Else ### Description Returns one of two numbers based on a condition. All parameters are evaluated regardless of the condition. Similar to the '?:' operator in C. ### Function Signature `?:: (Int, Num1, Num2)` ### Parameters - **Int** (integer) - The condition (non-zero is true, zero is false). - **Num1** (number) - The value to return if the condition is true. - **Num2** (number) - The value to return if the condition is false. ### Returns - **result** (number) ## Square ### Description Returns a number squared. ### Function Signature `Squ(Num)` ### Parameters - **Num** (number) - The number to square. ### Returns - **result** (number) ``` -------------------------------- ### Add Sidebar Information with ~Xt Source: https://www.astrolog.org/ftp/astrolog.htm Adds computed values or strings to the wheel chart sidebar when used with -YXt. Example shows adding obliquity and RAMC. ```Astrolog Script -YXt "Obliquity: \A\nRAMC: \B" ~Xt "=a Oblique =b RAMC" ``` -------------------------------- ### Generate Comparison Charts with Grid Source: https://www.astrolog.org/ftp/astrolog.htm Combine -r0 with the -g switch to display a full grid chart of aspects between planets of two charts. This option can be useful for detailed comparative analysis. ```bash -r0 -g ``` -------------------------------- ### Filter Rising/Setting Times with ~Zd Source: https://www.astrolog.org/ftp/astrolog.htm Use ~Zd to filter rising and setting times. This example displays only rising events within 10 degrees of due East. ```astrolog ~Zd "And Equ @y 0 Lt LonDist @z 0.0 10.0" ``` -------------------------------- ### Display Bitmap as Background Source: https://www.astrolog.org/ftp/astrolog.htm Use the -XI switch to display a bitmap image as the background behind graphics charts. This allows for custom backgrounds to be applied to charts. ```bash astrolog -XI background.bmp ``` -------------------------------- ### Filter Ephemeris Output with ~E Source: https://www.astrolog.org/ftp/astrolog.htm Use ~E to filter ephemeris output lines. This example demonstrates a stellium search to display lines with at least 5 planets in the same sign. ```astrolog astrolog -n -Ey ~E "For %m 1 Signs = @m 0 For %m 0 Objs If ObjOn @m = LonSign ObjLon @m Inc Var LonSign ObjLon @m =n 0 For %m 1 Signs =n Max @n Var @m Gte @n 5" ``` -------------------------------- ### Generate Text Mode Comparison Charts Source: https://www.astrolog.org/ftp/astrolog.htm Combine the -v switch with -r0 to generate text mode comparison charts. This displays planet positions and deltas side-by-side for two to four charts. ```bash -v -r0 ``` -------------------------------- ### Windows Compilation - Subsystem Setting Source: https://www.astrolog.org/ftp/astrolog.htm Visual Studio project setting to compile Astrolog as a Windows subsystem application. ```vcxproj Windows (/SUBSYSTEM:WINDOWS) ```