Advertisement
GroggyOtter

AHK v2 Advanced Object Example

Jan 23rd, 2025
774
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 4.45 KB | Source Code | 0 0
  1. ; Advanced object example of car
  2. ; How much detail do you need?
  3. car := {
  4.     top_speed: 155,
  5.     fuel_type: 'Gasoline',
  6.     oil_type: 'Synthetic',
  7.     make: 'Nissan',
  8.     model: 'WRX',
  9.     year: 2025,
  10.     color: 'World Rally Blue',
  11.     engine: {
  12.         engine_type: 'Turbocharged Inline-4',
  13.         horsepower: 271,
  14.         torque: 350,
  15.         fuel_efficiency: 22,
  16.         cylinder_count: 4,
  17.         cooling_system: 'Liquid-Cooled',
  18.         turbocharger: {
  19.             type: 'Twin-scroll',
  20.             boost_pressure: '1.2 bar',
  21.             cooling: {
  22.                 type: 'Intercooler',
  23.                 material: 'Aluminum',
  24.                 size: 'Large'
  25.             }
  26.         }
  27.     },
  28.     transmission: {
  29.         type: 'Manual',
  30.         gears: 6,
  31.         shift_mechanism: 'Hydraulic',
  32.         differential: {
  33.             type: 'Limited-slip',
  34.             ratio: '3.9',
  35.             location: 'Front and Rear'
  36.         }
  37.     },
  38.     wheels: [
  39.         {
  40.             size: 18,
  41.             material: 'Aluminum Alloy',
  42.             type: 'All-Season',
  43.             brake_type: {
  44.                 front: 'Disc',
  45.                 rear: 'Disc',
  46.                 material: 'Carbon-ceramic'
  47.             }
  48.         },
  49.         {
  50.             size: 18,
  51.             material: 'Aluminum Alloy',
  52.             type: 'All-Season',
  53.             brake_type: {
  54.                 front: 'Disc',
  55.                 rear: 'Disc',
  56.                 material: 'Carbon-ceramic'
  57.             }
  58.         },
  59.         {
  60.             size: 18,
  61.             material: 'Aluminum Alloy',
  62.             type: 'All-Season',
  63.             brake_type: {
  64.                 front: 'Disc',
  65.                 rear: 'Disc',
  66.                 material: 'Carbon-ceramic'
  67.             }
  68.         },
  69.         {
  70.             size: 18,
  71.             material: 'Aluminum Alloy',
  72.             type: 'All-Season',
  73.             brake_type: {
  74.                 front: 'Disc',
  75.                 rear: 'Disc',
  76.                 material: 'Carbon-ceramic'
  77.             }
  78.         }
  79.     ],
  80.     interior: {
  81.         seats: {
  82.             seat_material: 'Alcantara',
  83.             seat_adjustment: 'Electric',
  84.             number_of_seats: 5,
  85.             seat_heating: {
  86.                 front: 'Yes',
  87.                 rear: 'No'
  88.             },
  89.             seat_cooling: {
  90.                 front: 'No',
  91.                 rear: 'No'
  92.             }
  93.         },
  94.         dashboard: {
  95.             screen_size: 8,
  96.             infotainment_system: 'Apple CarPlay, Android Auto',
  97.             climate_control: 'Dual Zone',
  98.             steering_wheel: {
  99.                 material: 'Leather',
  100.                 adjustable: 'Yes',
  101.                 heated: 'Yes'
  102.             }
  103.         }
  104.     },
  105.     safety_features: [
  106.         'ABS',
  107.         'Airbags (Front, Side, Curtain)',
  108.         'Lane Assist',
  109.         'Backup Camera',
  110.         'Adaptive Cruise Control',
  111.         'Blind Spot Detection',
  112.         'Rear Cross-Traffic Alert'
  113.     ],
  114.     dimensions: {
  115.         length: 4.6,
  116.         width: 1.8,
  117.         height: 1.4,
  118.         wheelbase: 2.7,
  119.         weight: 1500,
  120.         ground_clearance: 0.14
  121.     },
  122.     tires: [
  123.         {
  124.             tire_brand: 'Michelin',
  125.             tire_type: 'All-Season',
  126.             tire_pressure: 34,
  127.             size: '225/45R18'
  128.         },
  129.         {
  130.             tire_brand: 'Michelin',
  131.             tire_type: 'All-Season',
  132.             tire_pressure: 34,
  133.             size: '225/45R18'
  134.         },
  135.         {
  136.             tire_brand: 'Michelin',
  137.             tire_type: 'All-Season',
  138.             tire_pressure: 34,
  139.             size: '225/45R18'
  140.         },
  141.         {
  142.             tire_brand: 'Michelin',
  143.             tire_type: 'All-Season',
  144.             tire_pressure: 34,
  145.             size: '225/45R18'
  146.         }
  147.     ],
  148.     performance: {
  149.         0_60_time: 5.4,
  150.         quarter_mile_time: 13.5,
  151.         braking_distance: {
  152.             60_to_0: 35,
  153.             meters: 35
  154.         },
  155.         handling: {
  156.             g_force: 0.92,
  157.             suspension: {
  158.                 front: 'MacPherson Strut',
  159.                 rear: 'Multi-Link'
  160.             }
  161.         }
  162.     },
  163.     lighting: {
  164.         headlights: {
  165.             type: 'LED',
  166.             adaptive: 'Yes',
  167.             auto_leveling: 'Yes'
  168.         },
  169.         taillights: {
  170.             type: 'LED',
  171.             dynamic_turn_signal: 'Yes'
  172.         },
  173.         fog_lights: {
  174.             type: 'Halogen',
  175.             activated: 'Automatic'
  176.         }
  177.     }
  178. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement