SemlerPDX

AVCS CORE Main Init (VoiceAttack Actions list, from locked command)

May 12th, 2021 (edited)
296
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //MAIN AVCS Profiles Initialization & Configuration Script
  2. // by SemlerPDX Jan2020/May2021
  3. // VETERANS-GAMING.COM
  4. //
  5. //
  6. //
  7. DISABLED - //  Re-Init Inline ---  After using this, can just Reset Active Profile (if it's an AVCS Profile) and all Init's will run
  8. DISABLED - Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization
  9. //
  10. //Required Environmental States Check
  11. Set text [~req_v] to '1.8.7'
  12. Begin Text Compare : [{STATE_VA_VERSION_COMPARE:~req_v}] Does Not Contain '1'
  13.     Write [Red] 'AVCS ERROR 0a - Please update Voice Attack to version {TXT:~req_v} or higher' to log
  14.     Say, '[The' or '] Current Voice Attack Version is below the minimum required version for this profile. Please update Voice Attack to the latest version.'  (and wait until it completes)
  15.     Exit Command
  16. End Condition
  17. //
  18. Begin Text Compare : [{STATE_VA_NESTEDTOKENSENABLED}] Does Not Contain '1'
  19.     Write [Red] 'AVCS ERROR 0b- Nested Tokens are not enabled. Please open Voice Attack options and enable "Use Nested Tokens"' to log
  20.     Say, 'Nested Tokens are required for this profile to function. Please open Voice Attack options and enable Nested Tokens.'  (and wait until it completes)
  21.     Exit Command
  22. End Condition
  23. //
  24. // Handle duplicated profiles due to import of existing AVCS profile
  25. Inline VB Function: AVCS_CheckForDuplicatedAVCSProfile, wait until execution finishes
  26. Begin Boolean Compare : [~avcs_check_for_duplicates] Equals True
  27.     Write [Red] 'AVCS CORE:  You must Delete this duplicate AVCS Profile from VoiceAttack!' to log
  28.     Write [Red] 'AVCS CORE:  VoiceAttack must be restarted once you have deleted this duplicate' to log
  29.     Write [Red] 'AVCS CORE:  Always switch to AVCS CORE first after importing any AVCS profile' to log
  30.     Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
  31.     Set Boolean [AVCS_INIT_Debug_TRIGGERED] to [Not Set]
  32.     Set Boolean [AVCS_PROFILE_SWITCH_SET] to [Not Set]
  33.     Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
  34.     Set Boolean [AVCS_Init_Bypass] to [Not Set]
  35.     Set Boolean [AVCS_REINIT] to [Not Set]
  36.     Set Boolean [AVCS_MUST_RESTART] to True
  37. End Condition - Exit when condition met
  38. //
  39. Begin Boolean Compare : [AVCS_Init_Bypass] Does Not Equal True
  40.     Begin Condition : [{PROFILE}] Equals [AVCS_MAJOR_UPDATE] OR [{NEXTPROFILE}] Equals [AVCS_MAJOR_UPDATE]
  41.         Begin Text Compare : [{PROFILE}] Equals [AVCS_MAJOR_UPDATE]
  42.             Set text [AVCS_MAJOR_UPDATE] to [Not Set]
  43.             Set text [AVCS_DATA_UPDATE] to [Not Set]
  44.             Set text [AVCS_FORMER_UPDATE] to [Not Set]
  45.             Set Boolean [AVCS_UPDATED] to [Not Set]
  46.             Set Boolean [AVCS_MUST_RESTART] to True
  47.             Write [Gray] '==========UPDATE/INSTALLATION SUCCESSFUL!!! ==============' to log
  48.             Write [Green] 'AVCS CORE:  You can now Delete this AVCS Profile from VoiceAttack' to log
  49.         End Condition - Exit when condition met or not met
  50.     End Condition - Exit when condition met
  51. End Condition
  52. //
  53. Begin Boolean Compare : [AVCS_MUST_RESTART] Equals True
  54.     Write [Red] 'AVCS UPDATE:  VoiceAttack must be restarted to finalize AVCS Profiles Update' to log
  55.     //=========================================================
  56.     Begin Condition : ([AVCS_UPDATED] Equals True AND [AVCS_MAJOR_UPDATE] Contains 'CORE' AND [{PROFILE}] Contains 'CORE' AND [{PROFILE}] Does Not Equal [AVCS_MAJOR_UPDATE])
  57.         Execute command, 'F_CORE_UPDATE' (by name)
  58.     End Condition - Exit when condition met
  59.     //=========================================================
  60. End Condition - Exit when condition met
  61. //
  62. //
  63. DISABLED - //  DEV  -- HARDSET DEBUG VARS --
  64. DISABLED - Set Boolean [AVCS_Debug_ON] to True
  65. DISABLED - Set integer [AVCS_Debug_QID] value to 4
  66. //
  67. //
  68. //  ===================================================================================================
  69. //  ============================INITIALIZATION COMMAND EXIT CHECKS============================================
  70. //  ===================================================================================================
  71. //
  72. Begin Text Compare : [{CMDACTION}] Equals 'ProfileUnloadClose'
  73.     Write [Gray] 'exiting AVCS4 and closing voiceattack...' to log
  74. End Condition - Exit when condition met
  75. //
  76. // Stagger command execution for Reset Profile action running this command twice
  77. Begin Text Compare : [{CMDACTION}] Equals 'ProfileUnloadChange'
  78.     Pause 1 second
  79.     Begin Boolean Compare : [AVCS_REINIT] Equals True
  80.         Exit Command
  81.     End Condition
  82. End Condition
  83. //
  84. //
  85. Begin Condition : ([{CMDACTION}] Equals 'ProfileUnloadChange' AND [AVCS_Init_Cancelled] Equals True)
  86.     Exit Command
  87. End Condition
  88. //
  89. Begin Boolean Compare : [AVCS_Init_Cancelled] Equals True
  90.     Set Boolean [AVCS_Init_Cancelled] to [Not Set]
  91.     Exit Command
  92. End Condition
  93. //
  94. // Check for Switch-To another CORE Profile (of a different version)
  95. Begin Condition : ([{CMDACTION}] Equals 'ProfileUnloadChange' AND [{PROFILE}] Contains 'CORE' AND [{NEXTPROFILE_AT3}] Contains 'CORE' AND [{PROFILE}] Does Not Equal '{NEXTPROFILE}')
  96.     Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
  97.     Set Boolean [AVCS_INIT_Debug_TRIGGERED] to [Not Set]
  98.     Set Boolean [AVCS_PROFILE_SWITCH_SET] to [Not Set]
  99.     Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
  100.     Set Boolean [AVCS_Init_Bypass] to [Not Set]
  101.     Set Boolean [AVCS_REINIT] to [Not Set]
  102. End Condition - Exit when condition met
  103. //
  104. //=========================================================
  105. //  DEBUGGING
  106. Begin Boolean Compare : [AVCS_INIT_Debug_TRIGGERED] Equals False
  107.     Write [Gray] 'AVCS CORE has launched F_CORE_INITIALIZE... please stand by....' to log
  108.     Jump to Marker: AVCS_CORE_DEBUG
  109. End Condition
  110. //=========================================================
  111. //
  112. //
  113. Begin Boolean Compare : [AVCS_Init_Bypass] Does Not Equal True
  114.     //
  115.     //  ===================================================================================================
  116.     //  ==========================PRE-INITIALIZATION DEBUG INFO===================================================
  117.     //  ===================================================================================================
  118.     //
  119.     Set integer [~check_cmd_instance_id] value to the converted value of {INT:~cmd_instance_id:500}
  120.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  121.         Begin Condition : [~check_cmd_instance_id] Equals 500 OR [~check_cmd_instance_id] Equals 0
  122.             //  -set initial vars depending on cmd type:  {CMD} {PREFIX} {SUFFIX} {CMD_BEFORE} {CMD_WILDCARDKEY} {CMD_AFTER}  ||  {CATEGORY} {PREFIX_CATEGORY} {SUFFIX_CATEGORY}
  123.             // -OPTIONAL- -COLOR FOR VA LOG OUTPUTS-- (0/not set=Yellow) 1=Blue - 2=Green - 3=Yellow - 4=Red - 5=Purple - 6=Blank - 7=Orange - 8=Black - 9=Gray - 10=Pink
  124.             Set text [~avcs_CMD] to '{CMD}'
  125.             Set text [~avcs_CAT] to '{CATEGORY}'
  126.             Begin Boolean Compare : [AVCS_Debug_QRPT] Equals True
  127.                 Set integer [AVCS_Debug_QSTP] to [AVCS_Debug_QSTP] plus 1
  128.                 //
  129.                 Set text [AVCS_Debug_TSTP_{INT:AVCS_Debug_QSTP}] to '{TXT:~avcs_CMD}  ||  {TXT:~avcs_CAT}'
  130.             End Condition
  131.             // -generate unique instance ID for each command & bring in sub cmd return ID
  132.             Set integer [~cmd_instance_id] value as random from 1111 to 4444
  133.             Begin Text Compare : [{CMDISSUBCOMMAND}] Contains '1'
  134.                 Set integer [~avcs_sub_CMD_RID] value to the converted value of {INT:AVCS_CMD_RID:500}
  135.             End Condition
  136.             // Prepare and send initial debug messages to the core function via "-log" parameter
  137.             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  138.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 1
  139.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-000- || IS:{CMDISSUBCOMMAND} || ACT:{CMDACTION} || CMD:...
  140.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  141.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 1
  142.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-000- || RID:{INT:~avcs_sub_CMD_RID:500} || CAT:{TXT:~av...
  143.             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  144.         Else If : ([~check_cmd_instance_id] Is Greater Than 1110 AND [~check_cmd_instance_id] Is Less Than 4445)
  145.             // Prepare and send initial debug messages for marker jumps to the beginning
  146.             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  147.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
  148.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-000- || INFO:  Command Restarted from beginning - retai...
  149.            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  150.        Else
  151.            // Report initial debug message error
  152.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  153.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  154.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-000- || ERROR:  Debug Begin CMD Info instance check byp...
  155.             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  156.         End Condition
  157.     End Condition
  158.     //
  159.     //
  160.     //
  161.     //  ===================================================================================================
  162.     //  ==========================PRE-INITIALIZATION PROFILE AND ENVIRONMENT CHECKS===================================================
  163.     //  ===================================================================================================
  164.     //
  165.     Begin Condition : ([AVCS_RELOAD_CORE] Equals True AND [{CMDACTION}] Equals 'ProfileUnloadChange')
  166.         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  167.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  168.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  169.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  170.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-00- || INFO:  RELOAD CORE is true so Jumping to End of ...
  171.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  172.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  173.                End Condition
  174.            End Condition
  175.        End Condition
  176.        Jump to Marker: AVCS_CORE_END
  177.    End Condition
  178.    //
  179.    Begin Condition : ([{TXTALPHA:"{NEXTPROFILE_AT3}"}] Does Not Contain 'AVCS' AND [{CMDACTION}] Equals 'ProfileUnloadChange')
  180.        Write [Blank] 'exiting AVCS CORE to non-AVCS profile....' to log
  181.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  182.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  183.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  184.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-0c- || INFO:  exiting AVCS CORE to non-AVCS profile....'
  185.        End Condition
  186.        Jump to Marker: AVCS_CORE_END
  187.    End Condition
  188.    //
  189.    // QUICK INIT EXIT
  190.    Begin Condition : ([{STATE_KEYSTATE:LCTRL}] Equals '1' AND [{STATE_KEYSTATE:LSHIFT}] Equals '1' AND [{STATE_KEYSTATE:Y}] Equals '1') OR ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:Y}] Equals '1')
  191.        Write [Green] 'Profile Initialization Cancelled' to log
  192.        Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  193.        Exit Command
  194.    End Condition
  195.    //
  196.    //  INIT BYPASS
  197.    Begin Condition : ([{STATE_KEYSTATE:LCTRL}] Equals '1' AND [{STATE_KEYSTATE:LSHIFT}] Equals '1' AND [{STATE_KEYSTATE:B}] Equals '1') OR ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:B}] Equals '1')
  198.        Write [Red] 'Profile Initialization Bypass Enabled  --  RCTRL+RSHFT+B Recognized' to log
  199.        Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  200.        Set Boolean [AVCS_Init_Bypass] to True
  201.        Exit Command
  202.    End Condition
  203.    //
  204.    // Compatibility Check for JanJan plugin and AVCS4 BMS Radios profile
  205.    Begin Condition : ([AVCS_CORE_INIT] Equals True AND [{NEXTPROFILE}] Does Not Equal '')
  206.        Begin Text Compare : [{NEXTPROFILE_AT3}] Contains 'BMS'
  207.            Set text [~avcs_checkfor_janjanPlugin] to '{TXT:{TXT:AVCS_BMS_JANJAN_COMMAND_NAME}:inactive}'
  208.            Begin Text Compare : [~avcs_checkfor_janjanPlugin] Does Not Equal 'inactive'
  209.                Set text [{TXT:AVCS_BMS_JANJAN_COMMAND_NAME}] to [Not Set]
  210.            End Condition
  211.        End Condition
  212.    End Condition
  213.    //
  214.    //
  215.    //
  216.    //  ===================================================================================================
  217.    //  ==========================AVCS CORE PROFILE LISTINGS CHECKS===================================================
  218.    //  ===================================================================================================
  219.    //
  220.    // Create AVCS Profile Listing for AVCS Profile(s)
  221.    Set text [~avcs_profiles_path] to '{VA_APPS}\AVCS'
  222.    Set text [~avcs_profiles_list_path] to '{TXT:~avcs_profiles_path}\avcs_profiles.txt'
  223.    Begin Boolean Compare : [AVCS_MUST_RESTART] Does Not Equal True
  224.        Begin Text Compare : [{STATE_DIRECTORYEXISTS:~avcs_profiles_path}] Contains '1'
  225.            // Profile Physical Versions will require AVCS CORE Version 0.87.2 or higher on, with core version on file
  226.            Set text [~avcs_core_profile_name] to '{TXT:~avcs_profiles_path}\avcs_core_profile.txt'
  227.            Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
  228.                Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
  229.                Begin Condition : ([~avcs_core_profile] Does Not Contain '{PROFILE}' AND [{PROFILE}] Contains 'AVCS CORE')
  230.                    Write (overwrite), '{PROFILE}' to file '{TXT:~avcs_core_profile_name}'
  231.                    //  =================  AVCS CORE PROFILE UPDATE DETECTED!! ================
  232.                    Inline VB Function: AVCS_DeleteCoreApp, wait until execution finishes
  233.                    Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
  234.                    //
  235.                End Condition
  236.            Else
  237.                Begin Text Compare : [{PROFILE}] Contains 'AVCS CORE'
  238.                    Write (overwrite), '{PROFILE}' to file '{TXT:~avcs_core_profile_name}'
  239.                    //  =================  AVCS CORE PROFILE NEW INSTALL DETECTED!! ================
  240.                    //
  241.                End Condition
  242.            End Condition
  243.            //
  244.            // Check for new profile listings and add to AVCS CORE Profiles List, clean up after
  245.            Set text [~avcs_profile_listing] to 'AVCS_PROFILE_{PROFILE_AT3}={PROFILE}'
  246.            Set text [~avcs_new_core_profile_list_path] to '{TXT:~avcs_profiles_path}\avcs_new_core_profile.txt'
  247.            Begin Text Compare : [{STATE_FILEEXISTS:~avcs_new_core_profile_list_path}] Contains '1'
  248.                Set text [~avcs_new_profiles_list_path] to [~avcs_new_core_profile_list_path]
  249.            Else
  250.                Set text [~avcs_new_profiles_list_path] to '{TXT:~avcs_profiles_path}\avcs_new_profiles.txt'
  251.            End Condition
  252.            Begin Condition : ([{STATE_FILEEXISTS:~avcs_new_profiles_list_path}] Contains '1' AND [{STATE_FILEEXISTS:~avcs_profiles_list_path}] Does Not Contain '1')
  253.                // -- FOLDER HAS NO PROFILES LIST - COMPLETELY NEW USER OR FULL REINSTALL
  254.                Write [Green] 'New AVCS4 Profile(s) Found!  Adding Profile to List of Names and cleaning up new profiles file afterwards....' to log
  255.                Set text [~avcs_new_profiles_list] to [{TXT:~avcs_new_profiles_list_path}] (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
  256.                //
  257.                //
  258.                //    ====================            SUB            ====================
  259.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  260.                    Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  261.                    Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  262.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  263.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  264.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-a01- || INFO:  Executing Sub-Command (F_CORE_MAIN) with...
  265.                 End Condition
  266.                 //
  267.                 // Clean Up Files call to remove the new profile listing file in preparation for any other new profiles in future  -  (filename path will ALWAYS be preceeded by {VA_APPS}\AVCS path)
  268.                 Set text [f_core_function] to 'clean up files'
  269.                 Set text [f_core_module_GUID] to '{TXT:~avcs_new_profiles_list_path}'
  270.                 Execute command, 'f_core_main' (by name) (and wait until it completes)
  271.                 //
  272.                 Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  273.                     //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  274.                     Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  275.                     Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  276.                     Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  277.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  278.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-a02- || ERROR:  Executed Sub-Command (F_CORE_MAIN) inva...
  279.                        // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  280.                        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  281.                            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  282.                        End Condition
  283.                    Else
  284.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  285.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-a02b- || INFO:  Sub-Command (F_CORE_MAIN) COMPLETE -- R...
  286.                     End Condition
  287.                 End Condition
  288.                 //            ====================    END    ====================        
  289.                 //
  290.                 //
  291.                 Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{TXT:~avcs_profiles_list_path}'
  292.                 //  --  Run Inline Function to Create Folder(s) if not already existing --
  293.                 Set text [AVCS_SFS_UtilFolderPath] to '{VA_APPS}\AVCS\save_files\Util'
  294.                 Set text [AVCS_SFS_UpdateFolderPath] to '{TXT:AVCS_SFS_UtilFolderPath}\update'
  295.                 Set text [~avcs_folders] to '{VA_APPS}\AVCS\save_files(/n){TXT:AVCS_SFS_UtilFolderPath}(/n){TXT:AVCS_SFS_UpdateFolderPath}'
  296.                 Inline VB Function: AVCS_CreateUpdateFolders, wait until execution finishes
  297.                 Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\dmp.txt'
  298.                 Write (overwrite), '' to file '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
  299.                 Pause 2 seconds
  300.                 //
  301.                 //
  302.             Else If : ([{STATE_FILEEXISTS:~avcs_new_profiles_list_path}] Contains '1' AND [{STATE_FILEEXISTS:~avcs_profiles_list_path}] Contains '1')
  303.                 //
  304.                 Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
  305.                 // -- FOLDER ALREADY HAS A PROFILES LIST - EXISTING USER / POSSIBLE UPDATE OR NEW PROFILE
  306.                 Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
  307.                     Inline C# Function: VA.ClearLog
  308.                 End Condition
  309.                 Write [Green] 'New AVCS4 Profile(s) Found!  Adding Profile to List of Names and cleaning up new profiles file afterwards....' to log
  310.                 Set text [~avcs_new_profiles_list] to [{TXT:~avcs_new_profiles_list_path}] (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
  311.                 Set text [~avcs_old_profiles_list] to [{TXT:~avcs_profiles_list_path}] (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
  312.                 Begin Text Compare : [~avcs_old_profiles_list] Starts With '{NEWLINE}'
  313.                     Set text [~avcs_old_profiles_list] to '{TXTSUBSTR:~avcs_old_profiles_list:1:}' (Trim)
  314.                 End Condition
  315.                 //
  316.                 Inline VB Function: AVCS_CheckForPreviousVersionProfile, wait until execution finishes
  317.                 //
  318.                 Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  319.                     Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  320.                         Begin Integer Compare : [~avcs_imsg_debug_count] Is Greater Than 0
  321.                             Start Loop : Repeat From 1 to [~avcs_imsg_debug_count]
  322.                                 Set text [~avcs_imsg_debug_text] to '{TXT:~avcs_imsg_debug_{INT:~i}}'
  323.                                 Set integer [~avcs_imsg_debug_wclr] value to the converted value of {INT:~avcs_imsg_debug_wclr_{INT:~i}:3}
  324.                                 Begin Text Compare : [~avcs_imsg_debug_text] Does Not Equal ''
  325.                                     Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  326.                                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to the converted value of {INT:~avcs_imsg_debug_wclr:3}
  327.                                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-a02c- || INFO:  CheckForPreviousVersionProfile - INLINE...
  328.                                End Condition
  329.                                Set integer [~avcs_imsg_debug_wclr_{INT:~i}] value to [Not Set]
  330.                                Set text [~avcs_imsg_debug_{INT:~i}] to [Not Set]
  331.                            End Loop
  332.                            Set integer [~avcs_imsg_debug_count] value to [Not Set]
  333.                            Set integer [~avcs_imsg_debug_wclr] value to [Not Set]
  334.                            Set text [~avcs_imsg_debug_text] to [Not Set]
  335.                        End Condition
  336.                        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  337.                            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  338.                        End Condition
  339.                    End Condition
  340.                End Condition
  341.                //  --  Run Inline Function to Create Folder(s) if not already existing --
  342.                Set text [AVCS_SFS_UtilFolderPath] to '{VA_APPS}\AVCS\save_files\Util'
  343.                Set text [AVCS_SFS_UpdateFolderPath] to '{TXT:AVCS_SFS_UtilFolderPath}\update'
  344.                Set text [~avcs_folders] to '{VA_APPS}\AVCS\save_files(/n){TXT:AVCS_SFS_UtilFolderPath}(/n){TXT:AVCS_SFS_UpdateFolderPath}'
  345.                Inline VB Function: AVCS_CreateUpdateFolders, wait until execution finishes
  346.                Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\dmp.txt'
  347.                //
  348.                Begin Text Compare : [~avcs_additional_new_profiles] Does Not Equal ''
  349.                    Set text [~avcs_new_profiles_list] to [~avcs_first_new_profile]
  350.                    // Replace unused New AVCS Profiles listed to new profiles list file
  351.                    Write (overwrite), '{TXT:~avcs_additional_new_profiles}' to file '{TXT:~avcs_new_profiles_list_path}'
  352.                    Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
  353.                    // Set Must Restart Flag so Files Check will not happen (after the 1st) during any profile switches/restarts this session
  354.                    Set Boolean [AVCS_MUST_RESTART] to True
  355.                    Write [Yellow] 'AVCS INFO - Multiple Major Profile Updates detected - after initialization, RESTART VoiceAttack to run the Next Update' to log
  356.                Else
  357.                    //
  358.                    // Clean Up Files call to remove the new profile listing file in preparation for any other new profiles in future  -  (filename path will ALWAYS be preceeded by {VA_APPS}\AVCS path)
  359.                    //    ====================            SUB            ====================
  360.                    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  361.                        Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  362.                        Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  363.                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  364.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  365.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-01- || INFO:  Executing Sub-Command (F_CORE_MAIN) with ...
  366.                     End Condition
  367.                     //
  368.                     Set text [f_core_function] to 'clean up files'
  369.                     Set text [f_core_module_GUID] to '{TXT:~avcs_new_profiles_list_path}'
  370.                     Execute command, 'f_core_main' (by name) (and wait until it completes)
  371.                     //
  372.                     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  373.                         //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  374.                         Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  375.                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  376.                         Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  377.                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  378.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-02- || ERROR:  Executed Sub-Command (F_CORE_MAIN) inval...
  379.                            // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  380.                            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  381.                                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  382.                            End Condition
  383.                        Else
  384.                            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  385.                            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-02b- || INFO:  Sub-Command (F_CORE_MAIN) COMPLETE -- Re...
  386.                         End Condition
  387.                     End Condition
  388.                     //            ====================    END    ====================        
  389.                 End Condition
  390.                 //
  391.                 //
  392.                 Begin Condition : ([~avcs_old_profiles_list] Does Not Equal '' AND [~avcs_new_profiles_list] Does Not Equal '' AND [~avcs_old_profiles_list] Does Not Contain [~avcs_new_profiles_list])
  393.                     Begin Text Compare : [~avcs_old_profiles_list] Does Not End With '{NEWLINE}'
  394.                         Set text [~avcs_final_profiles_list] to '{TXT:~avcs_old_profiles_list}{NEWLINE}{TXT:~avcs_new_profiles_list}{NEWLINE}' (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
  395.                     Else
  396.                         Set text [~avcs_final_profiles_list] to '{TXT:~avcs_old_profiles_list}{TXT:~avcs_new_profiles_list}{NEWLINE}' (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
  397.                     End Condition
  398.                     //
  399.                     // Update Currently Installed Profiles List with this new AVCS profile
  400.                     Write (overwrite), '{TXT:~avcs_final_profiles_list}' to file '{TXT:~avcs_profiles_list_path}'
  401.                     //  --  Run Inline Function to Create Folder(s) if not already existing --
  402.                     Set text [AVCS_SFS_UtilFolderPath] to '{VA_APPS}\AVCS\save_files\Util'
  403.                     Set text [AVCS_SFS_UpdateFolderPath] to '{TXT:AVCS_SFS_UtilFolderPath}\update'
  404.                     Set text [~avcs_folders] to '{VA_APPS}\AVCS\save_files(/n){TXT:AVCS_SFS_UtilFolderPath}(/n){TXT:AVCS_SFS_UpdateFolderPath}'
  405.                     Inline VB Function: AVCS_CreateUpdateFolders, wait until execution finishes
  406.                     Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
  407.                     Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\dmp.txt'
  408.                     Pause 2 seconds
  409.                 End Condition
  410.                 //
  411.                 //
  412.             End Condition
  413.             //
  414.             //
  415.             // Load Updated Profile Names LIst from Text Variable
  416.             Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
  417.             Inline VB Function: AVCS_LoadProfilesList, wait until execution finishes
  418.             //
  419.             //
  420.         Else
  421.             Write [Red] 'AVCS ERROR 0c- Import AVCS CORE Profile Package!  (Allow Overwrite and Delete any Duplicate VoiceAttack AVCS Profiles created)' to log
  422.             //    ----     ----     ----     EXIT    ----    ----    ----
  423.             Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  424.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  425.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  426.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-03- || ERROR:  AVCS CORE Profile Package contents not f...
  427.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  428.            End Condition
  429.            //     ----    ----    ----     END    ----     ----     ----//
  430.            Exit Command
  431.            // end of Profiles Listings in AVCS Apps Folder/file check
  432.        End Condition
  433.        // end of AVCS_MUST_RESTART bool check
  434.    End Condition
  435.    //
  436.    // end of Bypass Init bool check
  437. End Condition
  438. //
  439. //
  440. //  ===================================================================================================
  441. //  ==========================AVCS CORE LOAD OPTIONS CHECKS===================================================
  442. //  ===================================================================================================
  443. //
  444. Begin Condition : [AVCS_LOAD_OPTIONS] Equals True OR [AVCS_ADVANCED_OPTIONS] Equals True
  445.    Set text [AVCS_ACTIVE_PROFILE] to 'CORE'
  446.    Begin Boolean Compare : [AVCS_LOAD_OPTIONS] Equals True
  447.        Jump to Marker: AVCS_LOAD_OPTIONS
  448.    Else If Boolean Compare : [AVCS_ADVANCED_OPTIONS] Equals True
  449.        Jump to Marker: AVCS_ADVANCED_OPTIONS
  450.    End Condition
  451. Else If Boolean Compare : [AVCS_HELP_OPTIONS] Equals True
  452.    Jump to Marker: AVCS_ADVANCED_OPTIONS
  453. End Condition
  454. //
  455. Set text [AVCS_ACTIVE_PROFILE] to 'CORE'
  456. Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to '{TXTNUM:"{PROFILE_AT3}"}'
  457. //  Bypass Profile Initialization by holding down Control + Shift keys after switching to any AVCS profile
  458. Begin Text Compare : [{STATE_ANYKEYDOWN}] Equals '1'
  459.    Begin Condition : ([{STATE_KEYSTATE:LCTRL}] Equals '1' AND [{STATE_KEYSTATE:LSHIFT}] Equals '1') OR ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1')
  460.        Write [Red] 'Keys Detected - Release Keys now to load profile  -- (hold CTRL+SHFT for Load Options)' to log
  461.        Pause 1.5 seconds
  462.        Begin Condition : ([{STATE_ANYKEYDOWN}] Equals '1' AND [{STATE_KEYSTATE:LCTRL}] Equals '1' AND [{STATE_KEYSTATE:LSHIFT}] Equals '1') OR ([{STATE_ANYKEYDOWN}] Equals '1' AND [{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1')
  463.            Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
  464.                Inline C# Function: VA.ClearLog
  465.            End Condition
  466.            Write [Orange] '(keep holding CTRL + SHFT to open options menu)' to log
  467.            Pause 2.5 seconds
  468.            //  USER Load Options
  469.            Begin Condition : ([{STATE_KEYSTATE:LCTRL}] Equals '1' AND [{STATE_KEYSTATE:LSHIFT}] Equals '1' AND [{STATE_KEYSTATE:D}] Does Not Equal '1' AND [{STATE_KEYSTATE:B}] Does Not Equal '1' AND [{STATE_KEYSTATE:Y}] Does Not Equal '1' AND [{STATE_KEYSTATE:N}] Does Not Equal '1') OR ([{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:D}] Does Not Equal '1' AND [{STATE_KEYSTATE:B}] Does Not Equal '1' AND [{STATE_KEYSTATE:Y}] Does Not Equal '1' AND [{STATE_KEYSTATE:N}] Does Not Equal '1')
  470.                Marker: AVCS_LOAD_OPTIONS
  471.                Set Boolean [AVCS_LOAD_OPTIONS] to [Not Set]
  472.                Set Boolean [AVCS_ADVANCED_OPTIONS] to [Not Set]
  473.                Set Boolean [AVCS_HELP_OPTIONS] to [Not Set]
  474.                Set text [~avcs_load_option] to [Not Set]
  475.                //
  476.                Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
  477.                    Inline C# Function: VA.ClearLog
  478.                End Condition
  479.                Write [Yellow] 'Opening load options...' to log
  480.                Begin Boolean Compare : [AVCS_LogClearing_ON] Equals True
  481.                    Set text [~avcs_clear_log] to 'OFF'
  482.                Else
  483.                    Set text [~avcs_clear_log] to 'ON'
  484.                End Condition
  485.                Pause 0.65 seconds
  486.                Get Choice Input [~avcs_load_option]
  487.                //
  488.                //
  489.                Begin Text Compare : [~avcs_load_option] Equals 'INIT: Cancel this AVCS4 profile initialization (just this time)'
  490.                    Set Boolean [AVCS_Init_Cancelled] to True
  491.                    Set text [~avcs_load_option] to [Not Set]
  492.                    Write [Green] 'Profile Initialization Cancelled' to log
  493.                    //    ----     ----     ----     EXIT    ----    ----    ----
  494.                    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  495.                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  496.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  497.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-04- || INFO:  Profile Initialization Cancelled (exit by...
  498.                         Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  499.                     End Condition
  500.                     //     ----    ----    ----     END    ----     ----     ----//
  501.                     Exit Command
  502.                     //
  503.                 Else If Text Compare : [~avcs_load_option] Equals 'INIT: Disable all AVCS4 initialization commands (this session only)'
  504.                     Set text [~avcs_load_option] to [Not Set]
  505.                     Write [Green] 'Profile(s) Initialization Cancelled - this session only' to log
  506.                     Write [Blank] 'Access Load Options again to reset, otherwise restart VoiceAttack' to log
  507.                     Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  508.                     Set Boolean [AVCS_Init_Bypass] to True
  509.                     //
  510.                 End Condition
  511.                 //
  512.                 // ====================================================================================================
  513.                 //  ========================== ADVANCED LOAD OPTIONS BEGIN ===================================================
  514.                 // ====================================================================================================
  515.                 Marker: AVCS_ADVANCED_OPTIONS
  516.                 Begin Boolean Compare : [AVCS_ADVANCED_OPTIONS] Equals True
  517.                     Set Boolean [AVCS_ADVANCED_OPTIONS] to [Not Set]
  518.                     Set text [~avcs_load_option] to 'CONFIG: Open Advanced Configuration Options & Updates Control Menu'
  519.                 End Condition
  520.                 //
  521.                 Begin Boolean Compare : [AVCS_HELP_OPTIONS] Equals True
  522.                     Set Boolean [AVCS_ADVANCED_OPTIONS] to [Not Set]
  523.                     Set Boolean [AVCS_HELP_OPTIONS] to [Not Set]
  524.                     Set text [~avcs_load_option] to 'SUPPORT: Open Help and Support Menu for AVCS4 Profiles and Modules'
  525.                 End Condition
  526.                 //
  527.                 Begin Boolean Compare : [AVCS_SFS_INIT] Equals False
  528.                     //    ====================            SUB            ====================
  529.                     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  530.                         Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  531.                         Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  532.                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  533.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  534.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-05- || INFO:  Executing Sub-Command (F_CORE_SFS) with R...
  535.                    End Condition
  536.                    //
  537.                    Execute command, 'F_CORE_SFS' (and wait until it completes)
  538.                    //
  539.                    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  540.                        //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  541.                        Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  542.                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  543.                        Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  544.                            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  545.                            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-06- || ERROR:  Executed Sub-Command (F_CORE_SFS) invali...
  546.                             // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  547.                             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  548.                                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  549.                             End Condition
  550.                         Else
  551.                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  552.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-06b- || INFO:  Sub-Command (F_CORE_SFS) COMPLETE -- Ret...
  553.                        End Condition
  554.                    End Condition
  555.                    //            ====================    END    ====================        
  556.                End Condition
  557.                //
  558.                //  Load CORE User Configuration Settings from Save File
  559.                Begin Text Compare : [{STATE_FILEEXISTS:AVCS_CORE_SaveFilePath}] Equals '1'
  560.                    Set text [~save_file] to [{TXT:AVCS_CORE_SaveFilePath}] (Trim)
  561.                    Begin Text Compare : [~save_file] Does Not Equal ''
  562.                        //  Load All Variables from File/List to Profile (or clear/delete from profile)
  563.                        Inline VB Function: AVCS_CORE_LoadAllToProfile, wait until execution finishes
  564.                    End Condition
  565.                End Condition
  566.                Set text [~save_file] to [Not Set]
  567.                //
  568.                //
  569.                // ====================================================================================================
  570.                //  ========================== TOGGLE VOICEATTACK EVENT LOG CLEARING ===================================================
  571.                // ====================================================================================================
  572.                //
  573.                Begin Text Compare : [~avcs_load_option] Starts With 'CONFIG: Toggle VoiceAttack Event Log Window Clearing '
  574.                    Set text [~avcs_load_option] to [Not Set]
  575.                    // Switch Save File Location to Core Save File, set temp holding var
  576.                    Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
  577.                        Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
  578.                        Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  579.                    End Condition
  580.                    //
  581.                    Begin Boolean Compare : [AVCS_LogClearing_ON] Equals True
  582.                        //
  583.                        Set Boolean [AVCS_LogClearing_ON] to False
  584.                        Set text [AVCS_SFS_SAVED_name_1] to 'AVCS_LogClearing_ON'
  585.                        Set text [AVCS_SFS_SAVED_value_1] to 'False'
  586.                        //    ====================            SUB            ====================
  587.                        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  588.                            Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  589.                            Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  590.                            Set text [~avcs_sub_CMD_NAME] to 'F_SFS_TO_FILE'
  591.                            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  592.                            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  593.                            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-07- || INFO:  Executing Sub-Command ({TXT:~avcs_sub_CMD...
  594.                         End Condition
  595.                         //
  596.                         Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  597.                         Set Boolean [AVCS_SFS_SORT_bypass] to True
  598.                         Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  599.                         //
  600.                         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  601.                             //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  602.                             Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  603.                             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  604.                             Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  605.                                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  606.                                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-08- || ERROR:  Executed Sub-Command ({TXT:~avcs_sub_CMD...
  607.                                // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  608.                                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  609.                                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  610.                                End Condition
  611.                            Else
  612.                                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  613.                                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-08b- || INFO:  Sub-Command ({TXT:~avcs_sub_CMD_NAME}) C...
  614.                             End Condition
  615.                         End Condition
  616.                         //            ====================    END    ====================        
  617.                         //
  618.                     Else If Boolean Compare : [AVCS_LogClearing_ON] Equals False
  619.                         Set Boolean [AVCS_LogClearing_ON] to True
  620.                         Set text [AVCS_SFS_SAVED_name_1] to 'AVCS_LogClearing_ON'
  621.                         Set text [AVCS_SFS_SAVED_value_1] to 'True'
  622.                         //    ====================            SUB            ====================
  623.                         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  624.                             Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  625.                             Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  626.                             Set text [~avcs_sub_CMD_NAME] to 'F_SFS_TO_FILE'
  627.                             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  628.                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  629.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-09- || INFO:  Executing Sub-Command ({TXT:~avcs_sub_CMD...
  630.                        End Condition
  631.                        //
  632.                        Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  633.                        Set Boolean [AVCS_SFS_SORT_bypass] to True
  634.                        Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  635.                        //
  636.                        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  637.                            //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  638.                            Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  639.                            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  640.                            Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  641.                                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  642.                                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-10- || ERROR:  Executed Sub-Command ({TXT:~avcs_sub_CMD...
  643.                                 // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  644.                                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  645.                                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  646.                                 End Condition
  647.                             Else
  648.                                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  649.                                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-10b- || INFO:  Sub-Command ({TXT:~avcs_sub_CMD_NAME}) C...
  650.                            End Condition
  651.                        End Condition
  652.                        //            ====================    END    ====================        
  653.                        //
  654.                    End Condition
  655.                    //
  656.                    //
  657.                    Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
  658.                        Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
  659.                        Set text [~avcs_current_SaveFilePath] to [Not Set]
  660.                    End Condition
  661.                    //
  662.                    Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  663.                    Set text [~avcs_load_option] to [Not Set]
  664.                    Jump to Marker: AVCS_LOAD_OPTIONS
  665.                    //
  666.                    //
  667.                    // ====================================================================================================
  668.                    //  ========================== SET NEW PREFERRED PROFILE TO SAVEFILE ===================================================
  669.                    // ====================================================================================================
  670.                    //
  671.                    //
  672.                Else If Text Compare : [~avcs_load_option] Equals 'PROFILE: Show automatic profile switching menu (set/clear preferred profile)'
  673.                    Set text [~avcs_load_option] to [Not Set]
  674.                    Begin Condition : [AVCS_PREFERRED_PROFILE] Does Not Equal '' OR [AVCS_PREFERRED_PROFILE] Has Been Set
  675.                        Get Choice Input [~avcs_choice_preferred]
  676.                    Else
  677.                        Set text [~avcs_choice_preferred] to 'Change the Preferred Profile'
  678.                    End Condition
  679.                    Begin Text Compare : [~avcs_choice_preferred] Equals 'Change the Preferred Profile'
  680.                        //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  681.                        Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
  682.                        // Load Updated Profile Names LIst from Text Variable
  683.                        Set text [~avcs_core_profile_name] to '{TXT:~avcs_profiles_path}\avcs_core_profile.txt'
  684.                        Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
  685.                            Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
  686.                        End Condition
  687.                        Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
  688.                        // If the only profile listed is NOT this profile (AVCS CORE) then provide Get Choice Box
  689.                        Begin Condition : [~avcs_profiles_list] Does Not Equal '{TXT:~avcs_core_profile};' OR ([~avcs_profiles_list] Equals '{TXT:~avcs_core_profile};' AND [{PREVIOUSPROFILE}] Does Not Equal '')
  690.                            Set text [~avcs_profiles_default] to '{TXT:~avcs_core_profile} (none - cancel)'
  691.                            Set text [~avcs_installed_profiles] to [~avcs_profiles_list] (Replace '{TXT:~avcs_core_profile}' with '{TXT:~avcs_profiles_default}')
  692.                            Begin Text Compare : [~avcs_user_profiles_list] Does Not Equal ''
  693.                                Set text [~avcs_installed_profiles] to '{TXT:~avcs_installed_profiles}{TXT:~avcs_user_profiles_list:}'
  694.                            End Condition
  695.                            // If preferred already set, add flag to it's name in the Get Choice box
  696.                             Begin Text Compare : [AVCS_PREFERRED_PROFILE] Does Not Equal ''
  697.                                 Begin Text Compare : [~avcs_installed_profiles] Contains [AVCS_PREFERRED_PROFILE]
  698.                                     Set text [~avcs_preferred_current] to '{TXT:AVCS_PREFERRED_PROFILE} (preferred)'
  699.                                     Set text [~avcs_installed_profiles] to [~avcs_installed_profiles] (Replace '{TXT:AVCS_PREFERRED_PROFILE}' with '{TXT:~avcs_preferred_current}')
  700.                                 End Condition
  701.                             End Condition
  702.                             Set text [~previous_preferred_profile] to '{TXT:AVCS_PREFERRED_PROFILE:}'
  703.                             Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
  704.                             Get Choice Input [AVCS_PREFERRED_PROFILE]
  705.                             Begin Condition : [AVCS_PREFERRED_PROFILE] Equals '' OR [AVCS_PREFERRED_PROFILE] Has Not Been Set OR [AVCS_PREFERRED_PROFILE] Equals [~avcs_profiles_default]
  706.                                 // If they chose nothing, restore previous preferred profile setting
  707.                                 Begin Text Compare : [~previous_preferred_profile] Does Not Equal ''
  708.                                     Set text [AVCS_PREFERRED_PROFILE] to [~previous_preferred_profile]
  709.                                     Write [Yellow] 'Preferred Profile not changed from current: {TXT:AVCS_PREFERRED_PROFILE}' to log
  710.                                     Write [Green] 'Say 'Open Core Options' anytime to change or set a new profile' to log
  711.                                 Else
  712.                                     // If they chose nothing, and it wasn't previously set, clear the variable
  713.                                     Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
  714.                                     Write [Yellow] 'Preferred Profile not set.... Automatic Profile Switching disabled.' to log
  715.                                     Write [Green] 'Say 'Open Core Options' anytime to change or set a new profile' to log
  716.                                 End Condition
  717.                                 Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  718.                             Else
  719.                                 // If they chose a profile:
  720.                                 Set text [AVCS_PREFERRED_PROFILE] to [AVCS_PREFERRED_PROFILE] (Replace ' (preferred)' with '')
  721.                                 // Continue Initialization with FIRSTRUN Set To 2 or greater (bypassing this choice at end)
  722.                                 Begin Integer Compare : [AVCS_FIRST_RUN] Is Less Than 2
  723.                                     Begin Integer Compare : [AVCS_FIRST_RUN] Equals 0
  724.                                         Set integer [AVCS_FIRST_RUN] value to 2
  725.                                     Else
  726.                                         Set integer [AVCS_FIRST_RUN] to [AVCS_FIRST_RUN] plus 1
  727.                                     End Condition
  728.                                     Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  729.                                     Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_FIRST_RUN'
  730.                                     Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{INT:AVCS_FIRST_RUN}'
  731.                                 End Condition
  732.                                 //
  733.                                 // Save new Auto-Switch Profile to CORE Save File
  734.                                 Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  735.                                 Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_PREFERRED_PROFILE'
  736.                                 Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to [AVCS_PREFERRED_PROFILE]
  737.                                 // Switch Save File Location to Core Save File, set temp holding var
  738.                                 Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
  739.                                     Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
  740.                                     Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  741.                                 End Condition
  742.                                 //
  743.                                 //    ====================            SUB            ====================
  744.                                 Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  745.                                     Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  746.                                     Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  747.                                     Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  748.                                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  749.                                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-11- || INFO:  Executing Sub-Command (F_SFS_TO_FILE) wit...
  750.                                End Condition
  751.                                //
  752.                                // Save to File and Restore Save File Path (if changed)
  753.                                Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  754.                                Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  755.                                //
  756.                                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  757.                                    //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  758.                                    Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  759.                                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  760.                                    Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  761.                                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  762.                                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-12- || ERROR:  Executed Sub-Command (F_SFS_TO_FILE) inv...
  763.                                         // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  764.                                         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  765.                                             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  766.                                         End Condition
  767.                                     Else
  768.                                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  769.                                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-12b- || INFO:  Sub-Command (F_SFS_TO_FILE) COMPLETE -- ...
  770.                                    End Condition
  771.                                End Condition
  772.                                //            ====================    END    ====================        
  773.                                Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
  774.                                    Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
  775.                                    Set text [~avcs_current_SaveFilePath] to [Not Set]
  776.                                End Condition
  777.                                //
  778.                                Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
  779.                                    Inline C# Function: VA.ClearLog
  780.                                End Condition
  781.                                //
  782.                                Write [Yellow] 'Preferred Profile Saved as: {TXT:AVCS_PREFERRED_PROFILE}' to log
  783.                                Write [Green] 'AVCS CORE will always load itself, then load and switch to your preferred profile.' to log
  784.                                Write [Green] 'Say 'Open Core Options' anytime to change or set a new profile' to log
  785.                                Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  786.                                //
  787.                                // Proper initialization clears event log - provide short time for reading important new profile message
  788.                                Pause 1 second
  789.                                Write [Yellow] 'Continuing Initialization....' to log
  790.                                Pause 4 seconds
  791.                                //
  792.                                Begin Condition : ([AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True AND [{PROFILE}] Does Not Equal [AVCS_PREFERRED_PROFILE])
  793.                                    // =================================================================================================PROFILE SWITCH
  794.                                    //    ----     ----     ----     EXIT    ----    ----    ----
  795.                                    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  796.                                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  797.                                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  798.                                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-13- || INFO:  Switching to Preferring Profile (Fully In...
  799.                                         Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  800.                                     End Condition
  801.                                     //     ----    ----    ----     END    ----     ----     ----//
  802.                                     Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
  803.                                     Begin Text Compare : [{NEXTPROFILE}] Equals ''
  804.                                         Switch to profile, '{TXT:AVCS_PREFERRED_PROFILE}' (by name)
  805.                                     End Condition
  806.                                     Jump to Marker: AVCS_CORE_END
  807.                                     // =================================================================================================PROFILE SWITCH
  808.                                 End Condition
  809.                                 //
  810.                             End Condition
  811.                             //
  812.                             //
  813.                         Else
  814.                             // Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
  815.                             Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  816.                             Write [Yellow] 'AVCS4 Profiles must be switched to or from at least once to set preferred profile' to log
  817.                             Write [Yellow] '- This choice will be shown again once initialized' to log
  818.                             Set integer [AVCS_FIRST_RUN] value to [Not Set]
  819.                             // Proper initialization clears event log - provide short time for reading important new profile message
  820.                             Pause 1 second
  821.                             Write [Yellow] 'Continuing Initialization....' to log
  822.                             Pause 6 seconds
  823.                         End Condition
  824.                         //
  825.                         //
  826.                         //
  827.                         // ====================================================================================================
  828.                         //  ========================== CLEAR PREFERRED PROFILE FROM SAVEFILE ===================================================
  829.                         // ====================================================================================================
  830.                         //
  831.                     Else If Text Compare : [~avcs_choice_preferred] Equals 'Remove the current Preferred Profile'
  832.                         Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
  833.                         //
  834.                         // Switch Save File Location to Core Save File, set temp holding var
  835.                         Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
  836.                             Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
  837.                             Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  838.                         End Condition
  839.                         //
  840.                         //  Delete Preferred Profile Entry, and restore Save File Path (if changed)
  841.                         Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  842.                         Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_PREFERRED_PROFILE'
  843.                         //    ====================            SUB            ====================
  844.                         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  845.                             Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  846.                             Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  847.                             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  848.                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  849.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-14- || INFO:  Executing Sub-Command (F_SFS_DELETE) with...
  850.                        End Condition
  851.                        //
  852.                        Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  853.                        Execute command, 'F_SFS_DELETE' (by name) (and wait until it completes)
  854.                        //
  855.                        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  856.                            //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  857.                            Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  858.                            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  859.                            Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  860.                                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  861.                                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-15- || ERROR:  Executed Sub-Command (F_SFS_DELETE) inva...
  862.                                 // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  863.                                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  864.                                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  865.                                 End Condition
  866.                             Else
  867.                                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  868.                                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-15b- || INFO:  Sub-Command (F_SFS_DELETE) COMPLETE -- R...
  869.                            End Condition
  870.                        End Condition
  871.                        //            ====================    END    ====================        
  872.                        Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
  873.                            Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
  874.                            Set text [~avcs_current_SaveFilePath] to [Not Set]
  875.                        End Condition
  876.                        Set text [~avcs_load_option] to [Not Set]
  877.                        Write [Green] 'Default Profile(s) Initialization Auto-Switch removed' to log
  878.                        Write [Green] 'Say 'Open Core Options' anytime to change or set a new profile' to log
  879.                        Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  880.                        //
  881.                    End Condition
  882.                    //
  883.                    //
  884.                    //
  885.                    // ====================================================================================================
  886.                    //  ========================== OPEN HELP AND SUPPORT MENU BEGIN ===================================================
  887.                    // ====================================================================================================
  888.                    //
  889.                Else If Text Compare : [~avcs_load_option] Equals 'SUPPORT: Open Help and Support Menu for AVCS4 Profiles and Modules'
  890.                    Set text [~avcs_load_option] to [Not Set]
  891.                    //
  892.                    //
  893.                    Inline VB Function: AVCS_GetHelpItemsList
  894.                    Get Choice Input [~avcs_help_option]
  895.                    //
  896.                    Begin Text Compare : [~avcs_help_option] Does Not Equal ''
  897.                        Begin Text Compare : [~avcs_help_option] Equals 'Open AVCS Website Homepage'
  898.                            Set text [~avcs_core_website] to 'https://veterans-gaming.com/semlerpdx-avcs/home.html/'
  899.                             Run application '{TXT:~avcs_core_website}'
  900.                         End Condition - Exit when condition met
  901.                         Start Loop : Repeat From 1 to [~avcs_help_items_count]
  902.                             Set text [~avcs_help_item] to [AVCS_{TXT:AVCS_ACTIVE_PROFILE:CORE}_HelpMenu_Item_{INT:~i}]
  903.                             Begin Condition : ([~avcs_help_option] Does Not Equal '' AND [~avcs_help_item] Contains [~avcs_help_option])
  904.                                 Set text [~~AVCS_QCC_COMMAND] to [AVCS_{TXT:AVCS_ACTIVE_PROFILE:CORE}_HelpMenu_Action_{INT:~i}]
  905.                             End Condition
  906.                         End Loop
  907.                         Execute command, 'F_QCC_RUN' (by name)
  908.                         Jump to Marker: AVCS_CMD_EXIT
  909.                     Else
  910.                         Set text [~avcs_load_option] to [Not Set]
  911.                         Set Boolean [AVCS_ADVANCED_OPTIONS] to True
  912.                         Jump to Marker: AVCS_LOAD_OPTIONS
  913.                     End Condition
  914.                     //
  915.                     //
  916.                     //
  917.                     // ====================================================================================================
  918.                     //  ========================== OPEN ADVANCED LOAD OPTIONS MENU BEGIN ===================================================
  919.                     // ====================================================================================================
  920.                     //
  921.                 Else If Text Compare : [~avcs_load_option] Equals 'CONFIG: Open Advanced Configuration Options & Updates Control Menu'
  922.                     Set text [~avcs_load_option] to [Not Set]
  923.                     UPDATE: Toggle all AVCS Profile Minor Update Checks (currently {TXTUPPER:});UPDATE: Open Menu to select AVCS Profile Version for Uninstall or Reinstall;UPDATE: Open Menu for AVCS Profile Minor Update Version Rollback;CONFIG: Select Profile Config Folder(s) to Edit (following AVCS edit rules);CONFIG: Select Profile Config Folder(s) to Restore (delete user edits);CONFIG: Select Profile Config Folder(s) to Delete (restored if needed)
  924.                     Set text [~avcs_live_updates] to '{TXT:AVCS_LIVE_UPDATES:ON}' (Upper Case)
  925.                     Set text [~toggle_update_checks_choice] to 'UPDATE: Toggle all AVCS Profile Minor Update Prompts (currently: {TXT:~avcs_live_updates})'
  926.                     //
  927.                     Write [Yellow] 'Opening advanced load options...' to log
  928.                     Get Choice Input [~avcs_load_option]
  929.                     //
  930.                     //
  931.                     //
  932.                     // ====================================================================================================
  933.                     //  ========================== TOGGLE ALL AVCS PROFILE MINOR UPDATE ===================================================
  934.                     // ====================================================================================================
  935.                     //
  936.                     Begin Text Compare : [~avcs_load_option] Equals [~toggle_update_checks_choice]
  937.                         // Save new Updates Setting to CORE Save File (set temp var to restore current save file path)
  938.                         Begin Text Compare : [~avcs_live_updates] Equals 'ON'
  939.                             Set text [AVCS_LIVE_UPDATES] to 'OFF'
  940.                             Write [Red] 'ALL AVCS Profile Minor Update Checks are now OFF' to log
  941.                         Else If Text Compare : [~avcs_live_updates] Equals 'OFF'
  942.                             Set text [AVCS_LIVE_UPDATES] to 'ON'
  943.                             Write [Green] 'ALL AVCS Profile Minor Update Checks are now ON' to log
  944.                         End Condition
  945.                         //
  946.                         Set integer [AVCS_SFS_SAVED_requests] value to 1
  947.                         Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_LIVE_UPDATES'
  948.                         Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to [AVCS_LIVE_UPDATES]
  949.                         //
  950.                         Set text [~current_sfs_savefilepath] to [AVCS_SFS_SaveFilePath]
  951.                         Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  952.                         //    ====================            SUB            ====================
  953.                         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  954.                             Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  955.                             Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  956.                             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  957.                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  958.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-16- || INFO:  Executing Sub-Command (F_SFS_TO_FILE) wit...
  959.                        End Condition
  960.                        //
  961.                        Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  962.                        Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  963.                        //
  964.                        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  965.                            //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  966.                            Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  967.                            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  968.                            Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  969.                                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  970.                                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-17- || ERROR:  Executed Sub-Command (F_SFS_TO_FILE) inv...
  971.                                 // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  972.                                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  973.                                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  974.                                 End Condition
  975.                             Else
  976.                                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  977.                                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-17b- || INFO:  Sub-Command (F_SFS_TO_FILE) COMPLETE -- ...
  978.                            End Condition
  979.                        End Condition
  980.                        //            ====================    END    ====================        
  981.                        Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
  982.                        //
  983.                        Pause 0.2 seconds
  984.                        //
  985.                        Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  986.                        Set text [~avcs_load_option] to [Not Set]
  987.                        Set Boolean [AVCS_ADVANCED_OPTIONS] to True
  988.                        Jump to Marker: AVCS_ADVANCED_OPTIONS
  989.                        //
  990.                        //
  991.                        //
  992.                        // ====================================================================================================
  993.                        //  ========================== TOGGLE A PROFILE MINOR UPDATE ROLLBACKS ===========================================
  994.                        // ====================================================================================================
  995.                        //
  996.                    Else If Text Compare : [~avcs_load_option] Equals 'UPDATE: Open Menu to toggle an AVCS Profile Minor Update Version Rollback'
  997.                        Marker: AVCS_ROLLBACK_OPTIONS
  998.                        Set text [~avcs_load_option] to [Not Set]
  999.                        //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1000.                        Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
  1001.                        Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
  1002.                            //
  1003.                            //
  1004.                            //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1005.                            Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
  1006.                            Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
  1007.                            //
  1008.                            Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
  1009.                                Set text [~avcs_default_choice] to '{PROFILE}'
  1010.                            End Condition
  1011.                            Get Choice Input [AVCS_INIT_PROFILE]
  1012.                            Set text [AVCS_INIT_PROFILE] to [AVCS_INIT_PROFILE] (Replace '{SPACE}ON (using Rollback version)' with '')
  1013.                            Set text [AVCS_INIT_PROFILE] to [AVCS_INIT_PROFILE] (Replace '{SPACE}OFF (using latest version)' with '')
  1014.                            //
  1015.                            Begin Condition : ([AVCS_INIT_PROFILE] Does Not Equal '' AND [AVCS_INIT_PROFILE] Does Not Equal 'Not set' AND [~avcs_profiles_list] Contains [AVCS_INIT_PROFILE])
  1016.                                //===(if chosen)======================================================
  1017.                                Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1018.                                Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
  1019.                                Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1020.                                //
  1021.                                Write [Green] 'Profile Minor Version Rollback Toggled - re-initializing profile' to log
  1022.                                Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  1023.                                //
  1024.                                Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
  1025.                                Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  1026.                                Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  1027.                                Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK'
  1028.                                //
  1029.                                Set text [~current_rollback_setting] to '{BOOL:AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK:false}'
  1030.                                Begin Text Compare : [~current_rollback_setting] Equals 'true'
  1031.                                    //
  1032.                                    Set Boolean [AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK] to [Not Set]
  1033.                                    //
  1034.                                    //    ====================            SUB            ====================
  1035.                                    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1036.                                        Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  1037.                                        Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  1038.                                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1039.                                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  1040.                                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-18- || INFO:  Executing Sub-Command (F_SFS_DELETE) with...
  1041.                                     End Condition
  1042.                                     //
  1043.                                     Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  1044.                                     Execute command, 'F_SFS_DELETE' (by name) (and wait until it completes)
  1045.                                     //
  1046.                                     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1047.                                         //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  1048.                                         Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  1049.                                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1050.                                         Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  1051.                                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  1052.                                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-19- || ERROR:  Executed Sub-Command (F_SFS_DELETE) inva...
  1053.                                            // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  1054.                                            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1055.                                                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1056.                                            End Condition
  1057.                                        Else
  1058.                                            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  1059.                                            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-19b- || INFO:  Sub-Command (F_SFS_DELETE) COMPLETE -- R...
  1060.                                         End Condition
  1061.                                     End Condition
  1062.                                     //            ====================    END    ====================        
  1063.                                 Else If Text Compare : [~current_rollback_setting] Equals 'false'
  1064.                                     //
  1065.                                     Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to 'true'
  1066.                                     Set Boolean [AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK] to True
  1067.                                     //
  1068.                                     //    ====================            SUB            ====================
  1069.                                     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1070.                                         Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  1071.                                         Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  1072.                                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1073.                                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  1074.                                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-22- || INFO:  Executing Sub-Command (F_SFS_TO_FILE) wit...
  1075.                                    End Condition
  1076.                                    //
  1077.                                    Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  1078.                                    Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  1079.                                    //
  1080.                                    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1081.                                        //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  1082.                                        Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  1083.                                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1084.                                        Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  1085.                                            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  1086.                                            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-23- || ERROR:  Executed Sub-Command (F_SFS_TO_FILE) inv...
  1087.                                             // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  1088.                                             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1089.                                                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1090.                                             End Condition
  1091.                                         Else
  1092.                                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  1093.                                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-23b- || INFO:  Sub-Command (F_SFS_TO_FILE) COMPLETE -- ...
  1094.                                        End Condition
  1095.                                    End Condition
  1096.                                    //            ====================    END    ====================        
  1097.                                End Condition
  1098.                                //
  1099.                                Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
  1100.                                Set Boolean [AVCS_REINIT] to True
  1101.                                Set Boolean [AVCS_SFS_INIT] to [Not Set]
  1102.                                Set Boolean [AVCS_CORE_INIT] to [Not Set]
  1103.                                Set Boolean [AVCS_CORE_FULLYLOADED] to [Not Set]
  1104.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
  1105.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
  1106.                                //
  1107.                                Reset the active profile
  1108.                                Exit Command
  1109.                                //=========================================================
  1110.                                //
  1111.                            Else
  1112.                                Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  1113.                                Set text [~avcs_rollback_version_choice] to [Not Set]
  1114.                                Set text [~avcs_rollback_choice] to [Not Set]
  1115.                                //
  1116.                            End Condition
  1117.                            //
  1118.                        Else
  1119.                            // Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
  1120.                            Write [Red] 'No AVCS4 Profiles installed yet - This choice will box is available once AVCS4 Profiles initialized' to log
  1121.                            Set integer [AVCS_FIRST_RUN] value to [Not Set]
  1122.                        End Condition
  1123.                        //=========================================================
  1124.                        Pause 3 seconds
  1125.                        //
  1126.                        //
  1127.                        //
  1128.                        // ====================================================================================================
  1129.                        //  ========================== REINSTALL/UNINSTALL PROFILE OR MODULE CONFIGS ======================================
  1130.                        // ====================================================================================================
  1131.                        //
  1132.                    Else If Text Compare : [~avcs_load_option] Equals 'UPDATE: Open Menu to select AVCS Profile Version for Uninstall or Reinstall'
  1133.                        Set text [~avcs_load_option] to [Not Set]
  1134.                        //
  1135.                        Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
  1136.                        //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1137.                        Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
  1138.                        Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
  1139.                            //
  1140.                            //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1141.                            Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
  1142.                            Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
  1143.                            //
  1144.                            Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
  1145.                                Set text [~avcs_default_choice] to '{PROFILE}'
  1146.                            End Condition
  1147.                            Get Choice Input [AVCS_INIT_PROFILE]
  1148.                            //
  1149.                            Begin Condition : ([AVCS_INIT_PROFILE] Does Not Equal '' AND [AVCS_INIT_PROFILE] Does Not Equal 'Not set' AND [~avcs_profiles_list] Contains [AVCS_INIT_PROFILE])
  1150.                                Write [Red] 'Profile Initialization Cancelled - Choosing Profile or Module to Uninstall/Reinstall' to log
  1151.                                // Jump to Folder Delete Section just after Path Initialization -
  1152.                                Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1153.                                Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
  1154.                                Set text [AVCS_PROFILE_AVCS{TXTUPPER:~profile_to_init}{TXT:~avcs_VN}] to [AVCS_INIT_PROFILE]
  1155.                                Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1156.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
  1157.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
  1158.                                Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to True
  1159.                                Set text [AVCS_SFS_DELETE_ConfigFolderName] to [AVCS_INIT_PROFILE]
  1160.                                Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [~avcs_VN]
  1161.                                //
  1162.                                Set text [avcs_reinstall] to [Not Set]
  1163.                                Get Choice Input [avcs_reinstall]
  1164.                                Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  1165.                                //
  1166.                                Set Boolean [AVCS_LogClearing_ON] to False
  1167.                                Begin Text Compare : [avcs_reinstall] Equals 'Uninstall Profile'
  1168.                                    Write [Red] 'When finished, delete the profile from VoiceAttack to complete uninstallation.' to log
  1169.                                Else
  1170.                                    Write [Red] 'When finished, restart VoiceAttack and reinitialize Profile or Module to complete a reinstallation.' to log
  1171.                                End Condition
  1172.                                //
  1173.                                //
  1174.                                Set text [~avcs_core_profile_name] to '{VA_APPS}\AVCS\avcs_core_profile.txt'
  1175.                                Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
  1176.                                    Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
  1177.                                    Begin Text Compare : [{PROFILE}] Does Not Equal [~avcs_core_profile]
  1178.                                        // Switch to this profile if CORE is not active profile
  1179.                                        Switch to profile, '{TXT:~avcs_core_profile}' (by name)
  1180.                                    End Condition - Exit when condition met
  1181.                                    Jump to Marker: INIT_MODULE_PATHS
  1182.                                    Jump to Marker: INIT_MODULE_PATHS
  1183.                                End Condition - Exit when condition not met
  1184.                                //
  1185.                                //
  1186.                                //=========================================================
  1187.                                //                             UNINSTALL/REINSTALL END
  1188.                                //=========================================================
  1189.                                //
  1190.                            Else
  1191.                                //
  1192.                                Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  1193.                                Set text [AVCS_INIT_PROFILE] to [Not Set]
  1194.                                //
  1195.                            End Condition
  1196.                            //
  1197.                        Else
  1198.                            // Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
  1199.                            Write [Green] 'No AVCS4 Profile Config Folders installed yet - This choice will be shown again once initialized' to log
  1200.                            Set integer [AVCS_FIRST_RUN] value to [Not Set]
  1201.                        End Condition
  1202.                        // Give small pause for important message above
  1203.                        Pause 4 seconds
  1204.                        //
  1205.                        //
  1206.                        //
  1207.                        // ====================================================================================================
  1208.                        //  ========================== EDIT CHOSEN CONFIG FOLDERS ===================================================
  1209.                        // ====================================================================================================
  1210.                        //
  1211.                    Else If Text Compare : [~avcs_load_option] Equals 'CONFIG: Select Profile Config File(s) to Edit (following AVCS edit rules)'
  1212.                        Marker: AVCS_EDITCONFIG_OPTIONS
  1213.                        Set text [~avcs_load_option] to [Not Set]
  1214.                        Set Boolean [AVCS_SFS_EDIT_ConfigFolder] to [Not Set]
  1215.                        //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1216.                        Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
  1217.                        Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
  1218.                            //
  1219.                            //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1220.                            Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
  1221.                            Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
  1222.                            //
  1223.                            Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
  1224.                                Set text [~avcs_default_choice] to '{PROFILE}'
  1225.                            End Condition
  1226.                            Get Choice Input [AVCS_INIT_PROFILE]
  1227.                            //
  1228.                            Begin Condition : ([AVCS_INIT_PROFILE] Does Not Equal '' AND [AVCS_INIT_PROFILE] Does Not Equal 'Not set' AND [~avcs_profiles_list] Contains [AVCS_INIT_PROFILE])
  1229.                                Set text [~avcs_profiles_list] to [Not Set]
  1230.                                Write [Green] 'Profile Initialization Proceeding - Opening Config Folder(s) to Edit' to log
  1231.                                Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  1232.                                // Jump to Module Init Section with Edit Flag ON to present choices as they are loaded -
  1233.                                Set Boolean [AVCS_SFS_EDIT_ConfigFile] to True
  1234.                                Set Boolean [AVCS_REINIT] to True
  1235.                                Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1236.                                Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
  1237.                                Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1238.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
  1239.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
  1240.                                Jump to Marker: AVCS_EXIT_OPTIONS
  1241.                                //
  1242.                            Else
  1243.                                //
  1244.                                Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  1245.                                Set text [AVCS_INIT_PROFILE] to [Not Set]
  1246.                                //
  1247.                            End Condition
  1248.                            //
  1249.                        Else
  1250.                            // Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
  1251.                            Write [Green] 'No AVCS4 Profile Config Folders installed yet - This choice will be shown again once initialized' to log
  1252.                            Set integer [AVCS_FIRST_RUN] value to [Not Set]
  1253.                        End Condition
  1254.                        // Give small pause for important message above
  1255.                        Pause 4 seconds
  1256.                        //
  1257.                        //
  1258.                        //
  1259.                        // ====================================================================================================
  1260.                        //  ========================== RESTORE CHOSEN CONFIG FOLDERS ===================================================
  1261.                        // ====================================================================================================
  1262.                        //
  1263.                    Else If Text Compare : [~avcs_load_option] Equals 'CONFIG: Select Profile Config Folder(s) to Restore (delete user edits)'
  1264.                        Set text [~avcs_load_option] to [Not Set]
  1265.                        Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
  1266.                        //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1267.                        Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
  1268.                        Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
  1269.                            //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1270.                            Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
  1271.                            Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
  1272.                            //
  1273.                            Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
  1274.                                Set text [~avcs_default_choice] to '{PROFILE}'
  1275.                            End Condition
  1276.                            Get Choice Input [AVCS_INIT_PROFILE]
  1277.                            //
  1278.                            Begin Condition : ([AVCS_INIT_PROFILE] Does Not Equal '' AND [AVCS_INIT_PROFILE] Does Not Equal 'Not set' AND [~avcs_profiles_list] Contains [AVCS_INIT_PROFILE])
  1279.                                Set text [~avcs_profiles_list] to [Not Set]
  1280.                                Write [Red] 'Profile Initialization Cancelled - Choosing Config Folder(s) to Restore' to log
  1281.                                Write [Red] 'When finished, reinitialize Profile or restart VoiceAttack to use AVCS4' to log
  1282.                                Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  1283.                                // Jump to Folder Delete Section just after Path Initialization -
  1284.                                Set Boolean [AVCS_REINIT] to True
  1285.                                Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1286.                                Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
  1287.                                Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1288.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
  1289.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
  1290.                                Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to True
  1291.                                Set text [AVCS_SFS_DELETE_ConfigFolderName] to [AVCS_INIT_PROFILE]
  1292.                                Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [~avcs_VN]
  1293.                                //=========================================================
  1294.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
  1295.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
  1296.                                Set text [~avcs_core_profile_name] to '{VA_APPS}\AVCS\avcs_core_profile.txt'
  1297.                                Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
  1298.                                    Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
  1299.                                    Begin Text Compare : [{PROFILE}] Does Not Equal [~avcs_core_profile]
  1300.                                        // Switch to this profile if CORE is not active profile
  1301.                                        Switch to profile, '{TXT:~avcs_core_profile}' (by name)
  1302.                                    End Condition - Exit when condition met
  1303.                                    Jump to Marker: INIT_MODULE_PATHS
  1304.                                    Jump to Marker: INIT_MODULE_PATHS
  1305.                                End Condition - Exit when condition not met
  1306.                            Else
  1307.                                Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  1308.                                Set text [AVCS_INIT_PROFILE] to [Not Set]
  1309.                                Set text [~avcs_VN] to [Not Set]
  1310.                            End Condition
  1311.                            //
  1312.                        Else
  1313.                            // Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
  1314.                            Write [Green] 'No AVCS4 Profile Config Folders installed yet - This choice will be shown again once initialized' to log
  1315.                            Set integer [AVCS_FIRST_RUN] value to [Not Set]
  1316.                        End Condition
  1317.                        // Give small pause for important message above
  1318.                        Pause 4 seconds
  1319.                        //
  1320.                        //
  1321.                        //
  1322.                        // ====================================================================================================
  1323.                        //  ========================== DELETE CHOSEN CONFIG FOLDERS ===================================================
  1324.                        // ====================================================================================================
  1325.                        //
  1326.                    Else If Text Compare : [~avcs_load_option] Equals 'CONFIG: Select Profile Config Folder(s) to Delete (restored if needed)'
  1327.                        Set text [~avcs_load_option] to [Not Set]
  1328.                        //
  1329.                        Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
  1330.                        //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1331.                        Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
  1332.                        Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
  1333.                            //
  1334.                            //  Get List of Installed AVCS4 Profiles from their Apps Folder Names
  1335.                            Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
  1336.                            Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
  1337.                            //
  1338.                            Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
  1339.                                Set text [~avcs_default_choice] to '{PROFILE}'
  1340.                            End Condition
  1341.                            Get Choice Input [AVCS_INIT_PROFILE]
  1342.                            //
  1343.                            Begin Condition : ([AVCS_INIT_PROFILE] Does Not Equal '' AND [AVCS_INIT_PROFILE] Does Not Equal 'Not set' AND [~avcs_profiles_list] Contains [AVCS_INIT_PROFILE])
  1344.                                //
  1345.                                Write [Red] 'Profile Initialization Cancelled - Choosing Config Folder(s) to Delete' to log
  1346.                                Write [Red] 'When finished, reinitialize Profile or restart VoiceAttack to use AVCS4' to log
  1347.                                Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  1348.                                Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1349.                                Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
  1350.                                Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
  1351.                                // Jump to Folder Delete Section just after Path Initialization -
  1352.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
  1353.                                Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
  1354.                                Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to True
  1355.                                Set text [AVCS_SFS_DELETE_ConfigFolderName] to [AVCS_INIT_PROFILE]
  1356.                                Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [~avcs_VN]
  1357.                                Set Boolean [AVCS_REINIT] to True
  1358.                                //=========================================================
  1359.                                Set text [~avcs_core_profile_name] to '{VA_APPS}\AVCS\avcs_core_profile.txt'
  1360.                                Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
  1361.                                    Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
  1362.                                    Begin Text Compare : [{PROFILE}] Does Not Equal [~avcs_core_profile]
  1363.                                        // Switch to this profile if CORE is not active profile
  1364.                                        Switch to profile, '{TXT:~avcs_core_profile}' (by name)
  1365.                                    End Condition - Exit when condition met
  1366.                                    Jump to Marker: INIT_MODULE_PATHS
  1367.                                End Condition - Exit when condition not met
  1368.                                //=========================================================
  1369.                            Else
  1370.                                Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  1371.                                Set text [AVCS_INIT_PROFILE] to [Not Set]
  1372.                                Set text [~profile_to_init] to [Not Set]
  1373.                                Set text [~avcs_VN] to [Not Set]
  1374.                            End Condition
  1375.                            //
  1376.                        Else
  1377.                            // Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
  1378.                            Write [Green] 'No AVCS4 Profile Config Folders installed yet - This choice will be shown again once initialized' to log
  1379.                            Set integer [AVCS_FIRST_RUN] value to [Not Set]
  1380.                        End Condition
  1381.                        // Give small pause for important message above
  1382.                        Pause 4 seconds
  1383.                        //
  1384.                        //
  1385.                        //=========================================================
  1386.                        //=========================================================
  1387.                        //==============    END OF ADVANCED OPTIONS SUB MENU   ==============
  1388.                        //=========================================================
  1389.                        //=========================================================
  1390.                        //
  1391.                        //
  1392.                    Else If Text Compare : [~avcs_load_option] Equals '(go back to basic load options menu)'
  1393.                        Set text [~avcs_load_option] to [Not Set]
  1394.                        Jump to Marker: AVCS_LOAD_OPTIONS
  1395.                        //
  1396.                        //
  1397.                        ELSE IF --- Advanced Options Sub-Menu
  1398.                    End Condition
  1399.                    //end Load Options If/Then/Else
  1400.                End Condition
  1401.                //end AnyKey Down but D/B/Y/N combos below
  1402.            End Condition
  1403.            Set text [~avcs_load_option] to [Not Set]
  1404.            Set Boolean [AVCS_LOAD_OPTIONS] to [Not Set]
  1405.            Set Boolean [AVCS_ADVANCED_OPTIONS] to [Not Set]
  1406.            Set Boolean [AVCS_HELP_OPTIONS] to [Not Set]
  1407.            //
  1408.            //=========================================================
  1409.            //  DEBUGGING & DEV LOGIN
  1410.            Begin Condition : ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:D}] Equals '1')
  1411.                Marker: AVCS_CORE_DEBUG
  1412.                Begin Boolean Compare : [AVCS_INIT_Debug_TRIGGERED] Equals False
  1413.                    Set text [~avcs_dev_init_path] to '{VA_APPS}\AVCS\avcs_init_debug.txt'
  1414.                    Begin Text Compare : [{STATE_FILEEXISTS:~avcs_dev_init_path}] Contains '1'
  1415.                        Set Boolean [AVCS_Debug_ON] to True
  1416.                        Set text [~avcs_dev_init_debug_check] to [{TXT:~avcs_dev_init_path}]
  1417.                        Begin Text Compare : [~avcs_dev_init_debug_check] Contains 'report'
  1418.                            Set Boolean [AVCS_Debug_QRPT] to True
  1419.                        Else
  1420.                            Set Boolean [AVCS_Debug_QRPT] to [Not Set]
  1421.                        End Condition
  1422.                        Begin Integer Compare : [AVCS_Debug_QID] Is Less Than 4
  1423.                            Begin Text Compare : [~avcs_dev_init_debug_check] Contains '4'
  1424.                                Set integer [AVCS_Debug_QID] value to 4
  1425.                            Else If Text Compare : [~avcs_dev_init_debug_check] Contains '3'
  1426.                                Set integer [AVCS_Debug_QID] value to 3
  1427.                            Else If Text Compare : [~avcs_dev_init_debug_check] Contains '2'
  1428.                                Set integer [AVCS_Debug_QID] value to 2
  1429.                            Else If Text Compare : [~avcs_dev_init_debug_check] Contains '1'
  1430.                                Set integer [AVCS_Debug_QID] value to 1
  1431.                            Else
  1432.                                Set Boolean [AVCS_Debug_ON] to [Not Set]
  1433.                                Set Boolean [AVCS_Debug_QRPT] to [Not Set]
  1434.                                Set integer [AVCS_Debug_QID] value to [Not Set]
  1435.                            End Condition
  1436.                        End Condition
  1437.                    End Condition
  1438.                End Condition
  1439.                //
  1440.                Set Boolean [AVCS_INIT_Debug_TRIGGERED] to True
  1441.                //
  1442.                Set text [~avcs_load_option] to [Not Set]
  1443.                Jump: Command Start
  1444.            End Condition
  1445.            //=========================================================
  1446.            //
  1447.            // QUICK INIT EXIT
  1448.            Begin Condition : ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:Y}] Equals '1')
  1449.                Write [Green] 'Profile Initialization Cancelled' to log
  1450.                Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  1451.                Exit Command
  1452.            End Condition
  1453.            //
  1454.            //  INIT BYPASS
  1455.            Begin Condition : ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:B}] Equals '1')
  1456.                Write [Red] 'Profile Initialization Bypass Enabled  --  RCTRL+RSHFT+B Recognized' to log
  1457.                Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
  1458.                Set Boolean [AVCS_Init_Bypass] to True
  1459.            End Condition
  1460.            //
  1461.            //=========================================================
  1462.            //  INIT & DEV NORMALIZE
  1463.            Begin Condition : ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:N}] Equals '1')
  1464.                Write [Red] 'Profile Initialization Restored to Default --  RCTRL+RSHFT+N Recognized' to log
  1465.                Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}'  (and wait until it completes)
  1466.                Set text [f_core_debug] to [Not Set]
  1467.                Set Boolean [AVCS_Debug_ON] to [Not Set]
  1468.                Set Boolean [AVCS_Init_Bypass] to [Not Set]
  1469.            End Condition
  1470.            //=========================================================
  1471.            //
  1472.            //
  1473.            Begin Condition : ([AVCS_Init_Bypass] Does Not Equal True AND [{CMDACTION}] Equals 'Profile')
  1474.                Write [Yellow] 'Continuing Initialization....' to log
  1475.                //
  1476.                //
  1477.                Jump to Marker: AVCS_EXIT_OPTIONS
  1478.                //
  1479.            End Condition
  1480.            //end AnyKey Down 2
  1481.        End Condition
  1482.        //end AnyKey Down 1
  1483.    End Condition
  1484. End Condition
  1485. //  =========END=================AVCS CORE LOAD OPTIONS CHECKS========================END===========================
  1486. //
  1487. //
  1488. //
  1489. //
  1490. //  ===================================================================================================
  1491. //  ================================COMMAND EXIT CHECKS===================================================
  1492. //  ===================================================================================================
  1493. //
  1494. //
  1495. Begin Boolean Compare : [AVCS_Init_Bypass] Equals True
  1496.    Write [Red] 'Profile Initialization Cancelled  --  AVCS_Init_Bypass = TRUE' to log
  1497.    //    ----     ----     ----     EXIT    ----    ----    ----
  1498.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1499.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1500.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  1501.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-32- || INFO:  Profile Initialization Cancelled for Sess...
  1502.         Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1503.     End Condition
  1504.     //     ----    ----    ----     END    ----     ----     ----//
  1505.     Exit Command
  1506. End Condition
  1507. //
  1508. //
  1509. Begin Condition : ([{CMDACTION}] Does Not Equal 'Profile' AND [{CMDACTION}] Does Not Equal 'ProfileUnloadChange')
  1510.     //    ----     ----     ----     EXIT    ----    ----    ----
  1511.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1512.         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1513.         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  1514.         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-33x- || INFO:  CORE USER PROTECTION ENABLED - EXITING C...
  1515.        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1516.    End Condition
  1517.    //     ----    ----    ----     END    ----     ----     ----//
  1518.     Write [Gray] 'exiting core command...' to log
  1519.    Exit Command
  1520. End Condition
  1521. //=========================================================
  1522. //
  1523. //
  1524. Marker: AVCS_EXIT_OPTIONS
  1525. //
  1526. //
  1527. //
  1528. //  ===================================================================================================
  1529. //  ===============================SFS INITIALIZATION CHECK===================================================
  1530. //  ===================================================================================================
  1531. //
  1532. Begin Boolean Compare : [AVCS_SFS_INIT] Equals False
  1533.    //    ====================            SUB            ====================
  1534.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1535.        Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  1536.        Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  1537.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1538.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  1539.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-34- || INFO:  Executing Sub-Command (F_CORE_SFS) with R...
  1540.     End Condition
  1541.     //
  1542.     Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
  1543.     //
  1544.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1545.         //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  1546.         Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  1547.         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1548.         Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  1549.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  1550.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-35- || ERROR:  Executed Sub-Command (F_CORE_SFS) invali...
  1551.            // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  1552.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1553.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1554.            End Condition
  1555.        Else
  1556.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  1557.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-35b- || INFO:  Sub-Command (F_CORE_SFS) COMPLETE -- Ret...
  1558.         End Condition
  1559.     End Condition
  1560.     //            ====================    END    ====================        
  1561. End Condition
  1562. //
  1563. //
  1564. //
  1565. //
  1566. //
  1567. //=========================================================
  1568. Begin Boolean Compare : [AVCS_RELOAD_CORE] Equals True
  1569.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1570.         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1571.             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1572.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  1573.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-36- || INFO:  RELOAD CORE == TRUE  (jumping to title ma...
  1574.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1575.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1576.            End Condition
  1577.        End Condition
  1578.    End Condition
  1579.    Jump to Marker: DISPLAY_CORE_TITLE
  1580. End Condition
  1581. //
  1582. Begin Condition : ([AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals False AND [AVCS_INIT_PROFILE] Equals '')
  1583.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1584.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1585.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1586.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1587.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-37- || INFO:  CORE INIT == TRUE and FULLY LOADED == FAL...
  1588.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1589.                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1590.             End Condition
  1591.         End Condition
  1592.     End Condition
  1593.     Jump to Marker: INIT_CORE_COMPLETE
  1594. End Condition
  1595. //=========================================================
  1596. //
  1597. //
  1598. //
  1599. //=========================================================
  1600. Begin Text Compare : [{CMDACTION}] Equals 'Profile'
  1601.     Begin Condition : ([{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}] Does Not Contain 'AVCS' AND [{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}] Does Not Contain 'CORE' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
  1602.         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1603.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1604.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1605.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1606.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-38- || INFO:  Entering AVCS CORE from non-AVCS profile....
  1607.                Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  1608.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1609.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  1610.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-38b- || INFO:  Previous AT3 == {TXTALPHA:"{PREVIOUSPROF...
  1611.                End Condition
  1612.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1613.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1614.                End Condition
  1615.            End Condition
  1616.        End Condition
  1617.        Jump to Marker: DISPLAY_CORE_TITLE
  1618.    Else If : ([{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}] Contains 'AVCS' AND [{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}] Does Not Contain 'CORE' AND [AVCS_INIT_PROFILE] Equals '' AND [AVCS_CORE_INIT] Equals False AND [AVCS_CORE_FULLYLOADED] Equals False)
  1619.        Set text [~check_switchfrom_profile] to '{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}' (Trim) (Replace 'AVCS' with '') (Upper Case)
  1620.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1621.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1622.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1623.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1624.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-39- || INFO:  ----------CORE LOADED AND PROFILE COMMAND...
  1625.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1626.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-39b- || INFO:  ----->  ~check_switchfrom_profile = {TXT...
  1627.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1628.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1629.                End Condition
  1630.            End Condition
  1631.        End Condition
  1632.        Set text [~check_switchfrom_init] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INIT:false}' (Lower Case)
  1633.        Set text [~primary_module_fully_initialized] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INITIALIZED:false}' (Lower Case)
  1634.        Begin Condition : ([~check_switchfrom_init] Does Not Contain 'true' AND [~primary_module_fully_initialized] Does Not Contain 'true')
  1635.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1636.            End Condition
  1637.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1638.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1639.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1640.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1641.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-40- || INFO:  ------>  SWITCH FROM AVCS PROFILE THAT IS...
  1642.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1643.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1644.                    End Condition
  1645.                End Condition
  1646.            End Condition
  1647.            Set text [AVCS_INIT_PROFILE] to [~check_switchfrom_profile]
  1648.            Set text [~check_switchfrom_profile] to [Not Set]
  1649.            Set text [~check_switchfrom_init] to [Not Set]
  1650.            Set text [~primary_module_fully_initialized] to [Not Set]
  1651.        Else
  1652.            Set text [~check_switchfrom_profile] to [Not Set]
  1653.            Set text [~check_switchfrom_init] to [Not Set]
  1654.            Set text [~primary_module_fully_initialized] to [Not Set]
  1655.        End Condition
  1656.    End Condition
  1657.    //=========================================================
  1658.    //
  1659. Else If Text Compare : [{CMDACTION}] Equals 'ProfileUnloadChange'
  1660.    Begin Condition : ([AVCS_INIT_PROFILE] Equals '' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
  1661.        Set text [~check_switchto_profile] to '{TXTALPHA:"{NEXTPROFILE_AT3}"}' (Trim) (Replace 'AVCS' with '') (Upper Case)
  1662.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1663.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1664.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1665.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1666.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-41- || INFO:  -------------RESERVED FOR NON CORE PROFIL...
  1667.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1668.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-41b- || INFO:  ----->  ~check_switchto_profile = {TXT:~...
  1669.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1670.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1671.                End Condition
  1672.            End Condition
  1673.        End Condition
  1674.        Set text [~check_switchto_init] to '{BOOL:AVCS_{TXT:~check_switchto_profile}_INIT:false}'
  1675.        Begin Text Compare : [~check_switchto_init] Does Not Contain 'true'
  1676.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1677.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1678.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1679.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1680.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-42- || INFO:  ------>  SWITCH TO AVCS PROFILE THAT IS N...
  1681.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1682.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1683.                    End Condition
  1684.                End Condition
  1685.            End Condition
  1686.            Set text [AVCS_INIT_PROFILE] to [~check_switchto_profile]
  1687.            Set text [~check_switchto_profile] to [Not Set]
  1688.            Set text [~check_switchto_init] to [Not Set]
  1689.        Else
  1690.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1691.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1692.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1693.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1694.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-43- || INFO:  ---(exiting via jump to CORE title)--->  ...
  1695.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1696.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1697.                    End Condition
  1698.                End Condition
  1699.            End Condition
  1700.            Set text [~check_switchto_profile] to [Not Set]
  1701.            Set text [~check_switchto_init] to [Not Set]
  1702.        End Condition
  1703.    End Condition
  1704. End Condition
  1705. //=========================================================
  1706. //
  1707. //
  1708. //
  1709. //  ===================================================================================================
  1710. //  ============================PROFILE INITIALIZATION BEGIN===================================================
  1711. //  ===================================================================================================
  1712. //
  1713. //Common CORE Init Variables
  1714. Set text [~avcs_core_status] to '{VA_APPS}\AVCS\avcs_core_status'
  1715. Set text [~avcs_core_ops] to 'https://veterans-gaming.com/semlerpdx-avcs/core/'
  1716. Set text [~avcs_core_profiles] to 'https://veterans-gaming.com/semlerpdx-avcs/downloads/'
  1717. Set text [~avcs_core_applications] to 'https://veterans-gaming.com/semlerpdx-avcs/beta-applications/'
  1718. //
  1719. //  Use Dynamic Variables to loop through entire section for any module by Jumping to this Marker
  1720. Marker: INIT_MODULES_BY_NAME
  1721. Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1722.    Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  1723.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1724.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  1725.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-44- || ERROR CHECK:  "OOPS" AVCS_CORE_INIT = {BOOL:AVCS...
  1726.        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1727.    End Condition
  1728. End Condition
  1729. //
  1730. Begin Condition : ([AVCS_CORE_INIT] Equals False AND [~depmod_load] Equals False)
  1731.    Set text [~profile_to_init] to 'CORE'
  1732.    //  Load CORE Configuration Settings from Save File
  1733.    Begin Text Compare : [AVCS_SFS_CORE_LOADED] Does Not Contain 'complete'
  1734.        AVCS_CORE_SaveFilePath AVCS_SFS_CORE_LOADED
  1735.        Set text [~avcs_core_save_file_path] to '{VA_APPS}\AVCS\save_files\core_save\{TXTNUM:"{PROFILE_AT3}"}\save.txt'
  1736.        Begin Text Compare : [AVCS_CORE_SaveFilePath] Does Not Equal ''
  1737.            Set text [~avcs_core_save_file_path] to [AVCS_CORE_SaveFilePath]
  1738.        End Condition
  1739.        Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_save_file_path}] Equals '1'
  1740.            Set text [~save_file] to [{TXT:~avcs_core_save_file_path}] (Trim)
  1741.            Begin Text Compare : [~save_file] Does Not Equal ''
  1742.                //  Load All Variables from File/List to Profile (or clear/delete from profile)
  1743.                Inline VB Function: AVCS_LoadAllToProfile, wait until execution finishes
  1744.                Set text [AVCS_SFS_CORE_LOADED] to 'complete'
  1745.            End Condition
  1746.            //
  1747.        End Condition
  1748.    End Condition
  1749.    Set text [~save_file] to [Not Set]
  1750.    //
  1751.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1752.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1753.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1754.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  1755.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-45- || INFO:  BEGIN CORE INIT'
  1756.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1757.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1758.            End Condition
  1759.        End Condition
  1760.    End Condition
  1761.    //
  1762. Else If : ([AVCS_CORE_INIT] Equals True AND [{CMDACTION}] Equals 'ProfileUnloadChange' AND [~depmod_load] Equals False AND [AVCS_INIT_PROFILE] Does Not Equal '' AND [AVCS_INIT_PROFILE] Does Not Equal 'CORE' AND [AVCS_INIT_PROFILE] Does Not Contain 'Not set' AND [AVCS_INIT_PROFILE] Does Not Contain 'NOT SET' AND [AVCS_INIT_PROFILE] Does Not Contain 'not set')
  1763.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1764.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1765.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1766.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-46- || INFO:  ------NON CORE PROFILE INIT on ProfileUnl...
  1767.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1768.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
  1769.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-46b- || INFO:  BEGIN MODULE INIT  AVCS_CORE_INIT = {BOO...
  1770.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1771.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1772.            End Condition
  1773.        End Condition
  1774.    End Condition
  1775.    Begin Text Compare : [~next_avcs_profile] Equals ''
  1776.        Set text [~next_avcs_profile] to '{NEXTPROFILE}'
  1777.    End Condition
  1778.    Set text [~profile_to_init] to [AVCS_INIT_PROFILE] (Trim) (Replace ' ' with '')
  1779.    Set text [AVCS_INIT_PROFILE] to [Not Set]
  1780. Else If : ([AVCS_CORE_INIT] Equals True AND [{CMDACTION}] Equals 'Profile' AND [~depmod_load] Equals False AND [AVCS_INIT_PROFILE] Does Not Equal 'CORE' AND [AVCS_INIT_PROFILE] Does Not Equal '' AND [AVCS_INIT_PROFILE] Does Not Contain 'Not set' AND [AVCS_INIT_PROFILE] Does Not Contain 'NOT SET' AND [AVCS_INIT_PROFILE] Does Not Contain 'not set')
  1781.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1782.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1783.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1784.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1785.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-47- || INFO:  ------NON CORE PROFILE INIT on non-Profil...
  1786.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1787.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 1
  1788.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-47b- || INFO:  BEGIN MODULE INIT'
  1789.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1790.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1791.            End Condition
  1792.        End Condition
  1793.    End Condition
  1794.    Begin Text Compare : [~next_avcs_profile] Equals ''
  1795.        Set text [~next_avcs_profile] to '{PREVIOUSPROFILE}'
  1796.    End Condition
  1797.    Set text [~profile_to_init] to [AVCS_INIT_PROFILE] (Trim) (Replace ' ' with '')
  1798.    Set text [AVCS_INIT_PROFILE] to [Not Set]
  1799. End Condition
  1800. //
  1801. //
  1802. Set text [~check_data_profile_init] to [~profile_to_init]
  1803. Begin Condition : [~check_data_profile_init] Equals 'NOT SET' OR [~check_data_profile_init] Equals ''
  1804.    Begin Condition : ([AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
  1805.        Jump to Marker: DISPLAY_CORE_TITLE
  1806.    End Condition
  1807.    Set text [~profile_to_init] to 'CORE'
  1808. End Condition
  1809. //
  1810. //
  1811. Set text [~avcs_module_init] to '{BOOL:AVCS_{TXT:~profile_to_init}_INIT}' (Trim) (Replace ' ' with '')
  1812. Begin Boolean Compare : [AVCS_CORE_INIT] Equals False
  1813.    // Hard Set Init Variables for this version of AVCS CORE Profile Framework
  1814.    Set text [~avcs_AT1] to '{PROFILE_AT1}' (Trim) (Replace ' ' with '')
  1815.    Set text [~avcs_AT2] to '{PROFILE_AT2}' (Trim) (Replace ' ' with '')
  1816.    Set text [~avcs_VN] to '{TXTNUM:"{PROFILE_AT3}"}'
  1817.    Set text [CORE] to [~avcs_VN]
  1818. Else If : ([~avcs_module_init] Does Not Contain 'true' AND [~depmod_load] Equals False AND [{CMDACTION}] Equals 'ProfileUnloadChange')
  1819.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1820.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1821.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1822.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1823.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-48- || INFO:  --Entering Primary Module Init Loop from ...
  1824.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1825.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1826.            End Condition
  1827.        End Condition
  1828.    End Condition
  1829.    //  Initiating Profile Module Loading Variables
  1830.    Set text [~avcs_AT1] to '{NEXTPROFILE_AT1}' (Trim) (Replace ' ' with '')
  1831.    Set text [~avcs_AT2] to '{NEXTPROFILE_AT2}' (Trim) (Replace ' ' with '')
  1832.    Set text [~avcs_VN] to '{TXTNUM:"{NEXTPROFILE_AT3}"}' (Trim) (Replace ' ' with '')
  1833.    Set text [{TXTUPPER:~profile_to_init}] to [~avcs_VN]
  1834. Else If : ([~avcs_module_init] Does Not Contain 'true' AND [~depmod_load] Equals False AND [{CMDACTION}] Equals 'Profile')
  1835.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1836.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1837.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1838.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1839.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-49- || INFO:  --Entering Primary Module Init Loop from ...
  1840.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1841.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1842.            End Condition
  1843.        End Condition
  1844.    End Condition
  1845.    //  Initiating Profile Module Loading Variables
  1846.    Set text [~avcs_AT1] to '{PREVIOUSPROFILE_AT1}' (Trim) (Replace ' ' with '')
  1847.    Set text [~avcs_AT2] to '{PREVIOUSPROFILE_AT2}' (Trim) (Replace ' ' with '')
  1848.    Set text [~avcs_VN] to '{TXTNUM:"{PREVIOUSPROFILE_AT3}"}' (Trim) (Replace ' ' with '')
  1849.    Set text [{TXTUPPER:~profile_to_init}] to [~avcs_VN]
  1850. Else If : ([~avcs_module_init] Does Not Contain 'true' AND [~depmod_load] Equals True)
  1851.    //  Dep. Module Loading Variables
  1852.    Set text [~avcs_AT1] to [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_TV] (Trim) (Replace ' ' with '')
  1853.    Set text [~avcs_AT2] to [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}] (Trim) (Replace ' ' with '')
  1854.    Set text [~avcs_VN] to '{INT:AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_VN}' (Trim) (Replace ' ' with '')
  1855.    Set text [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_TV] to [Not Set]
  1856.    Set text [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}] to [Not Set]
  1857.    Set integer [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_VN] value to [Not Set]
  1858. Else If : ([AVCS_CORE_INIT] Equals True AND [~avcs_module_init] Contains 'true' AND [~depmod_load] Equals True)
  1859.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1860.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1861.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1862.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 1
  1863.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-50- || INFO:  BEGIN DEPMOD INIT'
  1864.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1865.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1866.            End Condition
  1867.        End Condition
  1868.    End Condition
  1869.    Jump to Marker: INIT_MODULE_DEPENDENCY
  1870. Else If : ([~avcs_module_init] Contains 'true' AND [AVCS_CORE_INIT] Equals True AND [~depmod_load] Equals False)
  1871.    Jump to Marker: INIT_MODULES_COMPLETE
  1872. Else If : ([AVCS_INIT_PROFILE] Equals '' AND [~profile_to_init] Equals '' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
  1873.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1874.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1875.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1876.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1877.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-51- || INFO:  (special - last of if/then/else init_modu...
  1878.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1879.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1880.            End Condition
  1881.        End Condition
  1882.    End Condition
  1883.    Jump to Marker: DISPLAY_CORE_TITLE
  1884. End Condition
  1885. //
  1886. Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1887.    Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  1888.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1889.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  1890.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-52- || INFO:  ~avcs_AT1 = {TXT:~avcs_AT1}   ||   ~avcs_...
  1891.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1892.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  1893.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-52b- || INFO:  ~avcs_VN = {TXT:~avcs_VN}   ||   ~profil...
  1894.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1895.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  1896.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-52c- || INFO:  ~depmod_index= {INT:~depmod_index:0} || ...
  1897.        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1898.    End Condition
  1899. End Condition
  1900. //
  1901. //
  1902. //
  1903. //  ===================================================================================================
  1904. //  ==========================MODULE FOLDER  AND FILE PATH INIT================================================
  1905. //  ===================================================================================================
  1906. //
  1907. Marker: INIT_MODULE_PATHS
  1908. Inline VB Function: AVCS_CheckValidATvars, wait until execution finishes
  1909. //   --- Set Module Paths -------
  1910. Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
  1911. Set text [~module_file_root] to '{TXT:~module_folder_root}\{TXTUPPER:~profile_to_init}\{TXT:~avcs_VN:}'
  1912. Set text [~module_cfg_root] to '{TXT:~module_file_root}\config'
  1913. Set text [~module_upd_root] to '{TXT:~module_file_root}\update'
  1914.  
  1915. Begin Boolean Compare : [AVCS_SFS_DELETE_ConfigFolder] Equals True
  1916.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1917.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1918.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1919.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1920.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-53- || INFO:  ------ RESERVED FOR DELETE CONFIG OPTION ...
  1921.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1922.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1923.            End Condition
  1924.        End Condition
  1925.    End Condition
  1926.    Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
  1927.    //   Set folders to requested delete folder
  1928.    Set text [~avcs_del_ver] to '{TXTSUBSTR:AVCS_SFS_DELETE_ConfigFolderVersion:0:1}{TXTSUBSTR:AVCS_SFS_DELETE_ConfigFolderVersion:1:1}'
  1929.    Begin Condition : [AVCS_SFS_DELETE_ConfigFolderVersion] Contains '8' OR [AVCS_SFS_DELETE_ConfigFolderVersion] Contains '9'
  1930.        Begin Text Compare : [AVCS_SFS_DELETE_ConfigFolderVersion] Contains '8'
  1931.            Set text [~avcs_del_ver] to 'ALPHA ({TXTSUBSTR:AVCS_SFS_DELETE_ConfigFolderVersion:1:1})'
  1932.        Else
  1933.            Set text [~avcs_del_ver] to 'BETA ({TXTSUBSTR:AVCS_SFS_DELETE_ConfigFolderVersion:1:1})'
  1934.        End Condition
  1935.    End Condition
  1936.    //
  1937.    Begin Text Compare : [avcs_reinstall] Does Not Equal ''
  1938.        Set text [~avcs_delete_choice] to 'Yes'
  1939.    Else
  1940.        Get Choice Input [~avcs_delete_choice]
  1941.    End Condition
  1942.    //
  1943.    Begin Text Compare : [~avcs_delete_choice] Equals 'Yes'
  1944.        Set text [~avcs_folder] to '{TXT:~module_folder_root}\{TXT:AVCS_SFS_DELETE_ConfigFolderName}\{TXT:AVCS_SFS_DELETE_ConfigFolderVersion}'
  1945.        Inline VB Function: AVCS_CheckForAndDeleteConfigFolders, wait until execution finishes
  1946.        Write [Green] 'Config Folder for AVCS4 {TXTUPPER:AVCS_SFS_DELETE_ConfigFolderName} {TXT:~avcs_del_ver} has been deleted. Folder(s) are recreated only if needed to function' to log
  1947.        Write [Yellow] 'If changes are not immediately applied, try restarting VoiceAttack and loading AVCS Profile(s) again.' to log
  1948.        Set Boolean [AVCS_{TXT:AVCS_SFS_DELETE_ConfigFolderName}_INIT] to [Not Set]
  1949.        Set Boolean [AVCS_{TXT:AVCS_SFS_DELETE_ConfigFolderName}_INITIALIZED] to [Not Set]
  1950.        Set Boolean [AVCS_{TXT:AVCS_SFS_DELETE_ConfigFolderName}_FULLYLOADED] to [Not Set]
  1951.        Set text [AVCS_INIT_PROFILE] to [Not Set]
  1952.        Set text [AVCS_SFS_DELETE_ConfigFolderName] to [Not Set]
  1953.        Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [Not Set]
  1954.        Begin Text Compare : [avcs_reinstall] Contains 'Uninstall Profile'
  1955.            Set text [avcs_reinstall] to [Not Set]
  1956.            Set text [AVCS_MAJOR_UPDATE] to [AVCS_PROFILE_AVCS{TXTUPPER:~profile_to_init}{TXT:~avcs_VN}]
  1957.            Set text [~avcs_profile_delete_name] to 'AVCS_PROFILE_AVCS{TXTUPPER:~profile_to_init}{TXT:~avcs_VN}={TXT:AVCS_PROFILE_AVCS{TXTUPPER:~profile_to_init}{TXT:~avcs_VN}}'
  1958.            Set text [~avcs_old_profiles_list] to [{TXT:~avcs_profiles_list_path}] (Trim) (Replace '{TXT:~avcs_profile_delete_name}' with '')
  1959.            Set text [~avcs_old_profiles_list] to [~avcs_old_profiles_list] (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
  1960.            Write (overwrite), '{TXT:~avcs_old_profiles_list}' to file '{TXT:~avcs_profiles_list_path}'
  1961.            Write [Green] 'Please Delete the AVCS Profile from VoiceAttack now (if it is allowed to initialize again, deleted files will be restored)' to log
  1962.            Set Boolean [AVCS_MUST_RESTART] to True
  1963.            Exit Command
  1964.        End Condition
  1965.        Set text [avcs_reinstall] to [Not Set]
  1966.        Reset the active profile
  1967.        Exit Command
  1968.    Else
  1969.        Write [Red] 'Config Folder {TXTUPPER:AVCS_SFS_DELETE_ConfigFolderName} {TXT:~avcs_del_ver} Delete Cancelled' to log
  1970.        Set text [AVCS_INIT_PROFILE] to [Not Set]
  1971.        Set Boolean [AVCS_CORE_RELOADING] to [Not Set]
  1972.        Set text [AVCS_SFS_DELETE_ConfigFolderName] to [Not Set]
  1973.        Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [Not Set]
  1974.        Jump: Command Start
  1975.    End Condition
  1976. Else
  1977.    //   Set folders to those above and Create Config Folders if not present
  1978.    Set text [~avcs_folders] to '{TXT:~module_folder_root}(/n){TXT:~module_file_root}(/n){TXT:~module_cfg_root}(/n){TXT:~module_upd_root}'
  1979.    Inline VB Function: AVCS_CheckForOrCreateConfigFolders, wait until execution finishes
  1980.    Set text [~avcs_folders] to [Not Set]
  1981. End Condition
  1982. //
  1983. // ====================================================================================================
  1984. //   --- Set Apps File Paths -------
  1985. Set text [~update_ID_path] to '{TXT:~module_file_root}\avcs_{TXTLOWER:~profile_to_init}_versionID.core'
  1986. Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  1987.    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  1988.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  1989.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  1990.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-54- || INFO:  Checking ~update_ID_path = {TXT:~update_I...
  1991.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  1992.            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  1993.        End Condition
  1994.    End Condition
  1995. End Condition
  1996. Set text [~changelog_path] to '{TXT:~module_file_root}\avcs_{TXTLOWER:~profile_to_init}_changelog.txt'
  1997. Set text [~check_cfg_path] to '{TXT:~module_file_root}\config\avcs_config_table.core'
  1998. Set text [~check_upd_path] to '{TXT:~module_file_root}\update\avcs_config_table.core'
  1999. Set text [~guid_apps_path] to '{TXT:~module_file_root}\avcs_{TXTLOWER:~profile_to_init}_moduleID.core'
  2000. Set text [~uuid_apps_path] to '{TXT:~module_file_root}\avcs_{TXTLOWER:~profile_to_init}_betatestID.core'
  2001. // ====================================================================================================
  2002. //   --- Set URL File Paths -------
  2003. Set text [~check_updateID_url] to '{TXT:~module_url_root}/info/avcs_{TXT:~profile_to_init}_version.htm/'
  2004. Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2005.    Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  2006.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2007.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  2008.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-55- || INFO:  Checking Update ID Path URL --   ~check_u...
  2009.        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2010.    End Condition
  2011. End Condition
  2012. Set text [~changelog_url] to '{TXT:~module_url_root}/info/avcs_{TXT:~profile_to_init}_changelog.htm/'
  2013. Set text [~update_table_url] to '{TXT:~module_url_root}/update/avcs_{TXT:~profile_to_init}_table.htm/'
  2014. Set text [~config_table_url] to '{TXT:~module_url_root}/config/avcs_{TXT:~profile_to_init}_table.htm/'
  2015. // ====================================================================================================
  2016. //
  2017. //
  2018. //
  2019. //  ===================================================================================================
  2020. //  ==============================MODULE GUID VALIDATION INIT================================================
  2021. //  ===================================================================================================
  2022. //
  2023. // Generate New Module GUID
  2024. Begin Boolean Compare : [~depmod_load] Equals False
  2025.    //
  2026.    //    ====================            SUB            ====================
  2027.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2028.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2029.            Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  2030.            Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  2031.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2032.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  2033.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-56- || INFO:  Executing Inline (AVCS_InitializeModule) ...
  2034.        End Condition
  2035.    End Condition
  2036.    //
  2037.    //  Run Inline Function providing GUID + all needed params to get GUUID and verify Module GUID on file (if not there) and verify validity
  2038.    Set text [f_core_module_NM] to '{TXT:~profile_to_init}' (Upper Case)
  2039.    Set text [f_core_module_VN] to '{TXT:~avcs_VN}'
  2040.    Inline VB Function: AVCS_InitializeModule, wait until execution finishes
  2041.    //
  2042.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2043.        Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  2044.            Begin Integer Compare : [~avcs_imsg_debug_count] Is Greater Than 0
  2045.                Start Loop : Repeat From 1 to [~avcs_imsg_debug_count]
  2046.                    Set text [~avcs_imsg_debug_text] to '{TXT:~avcs_imsg_debug_{INT:~i}}'
  2047.                    Set integer [~avcs_imsg_debug_wclr] value to the converted value of {INT:~avcs_imsg_debug_wclr_{INT:~i}:3}
  2048.                    Begin Text Compare : [~avcs_imsg_debug_text] Does Not Equal ''
  2049.                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2050.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to the converted value of {INT:~avcs_imsg_debug_wclr:3}
  2051.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-25- || INFO:  VB.NET - INLINE --  {TXT:~avcs_imsg_debug...
  2052.                    End Condition
  2053.                    Set integer [~avcs_imsg_debug_wclr_{INT:~i}] value to [Not Set]
  2054.                    Set text [~avcs_imsg_debug_{INT:~i}] to [Not Set]
  2055.                End Loop
  2056.                Set integer [~avcs_imsg_debug_count] value to [Not Set]
  2057.                Set integer [~avcs_imsg_debug_wclr] value to [Not Set]
  2058.                Set text [~avcs_imsg_debug_text] to [Not Set]
  2059.            End Condition
  2060.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2061.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  2062.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-56b- || INFO:  GUID  = {TXT:f_core_module_GUID:} (dev)'
  2063.            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2064.        End Condition
  2065.        Begin Integer Compare : [~avcs_imsg_debug_count] Is Greater Than 0
  2066.            Start Loop : Repeat From 1 to [~avcs_imsg_debug_count]
  2067.                Set integer [~avcs_imsg_debug_wclr_{INT:~i}] value to [Not Set]
  2068.                Set text [~avcs_imsg_debug_{INT:~i}] to [Not Set]
  2069.            End Loop
  2070.        End Condition
  2071.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2072.            //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  2073.            Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  2074.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2075.            Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  2076.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2077.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-57- || ERROR:  Executed Sub-Command (F_CORE_MAIN) inval...
  2078.                // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  2079.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2080.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2081.                End Condition
  2082.            Else
  2083.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  2084.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-57b- || INFO:  Sub-Command (F_CORE_MAIN) COMPLETE -- Re...
  2085.            End Condition
  2086.        End Condition
  2087.    End Condition
  2088.    //            ====================    END    ====================        
  2089.    //
  2090.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2091.        Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  2092.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2093.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  2094.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-58- || INFO:  f_core_return = {TXT:f_core_return} (dev)'
  2095.            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2096.        End Condition
  2097.    End Condition
  2098.    //
  2099.    Set text [f_core_module_GUID] to [Not Set]
  2100.    Set text [~avcs_core_guuid_hsh] to [f_core_return] (Trim) (Replace ' ' with '')
  2101.    Set text [f_core_return] to [Not Set]
  2102.    //
  2103.    // Log current AVCS CORE Live Status
  2104.    Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_status}] Contains '1'
  2105.        Set text [~check_core_online] to [{TXT:~avcs_core_status}]
  2106.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2107.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2108.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2109.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  2110.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-59- || INFO:  CORE IS ONLINE'
  2111.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2112.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2113.                End Condition
  2114.            End Condition
  2115.        End Condition
  2116.    Else
  2117.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2118.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2119.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2120.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2121.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-60- || INFO:  CORE IS OFFLINE'
  2122.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2123.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2124.                End Condition
  2125.            End Condition
  2126.        End Condition
  2127.        Set text [~check_core_online] to 'false'
  2128.    End Condition
  2129. End Condition
  2130. //
  2131. //
  2132. //
  2133. //  ===================================================================================================
  2134. //  ==============================MINOR PROFILE UPDATE CHECK================================================
  2135. //  ===================================================================================================
  2136. //
  2137. // Log current Module Update ID
  2138. Set integer [~module_update_ID] value to 11111111
  2139. Begin Text Compare : [{STATE_FILEEXISTS:~update_ID_path}] Contains '1'
  2140.    Set text [~update_ID_text] to [{TXT:~update_ID_path}] (Trim) (Replace ' ' with '')
  2141.    Begin Text Compare : [~update_ID_text] Does Not Equal ''
  2142.        Set integer [~module_update_ID] value to the converted value of {TXT:~update_ID_text}
  2143.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2144.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2145.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2146.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  2147.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-61- || INFO:  SUCCESS -- at 'Log current CORE Update ID...
  2148.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2149.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2150.                End Condition
  2151.            End Condition
  2152.        End Condition
  2153.    Else
  2154.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2155.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2156.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2157.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
  2158.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-62- || INFO:  FAILURE TO GET --  at 'Log current CORE U...
  2159.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2160.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2161.                End Condition
  2162.            End Condition
  2163.        End Condition
  2164.    End Condition
  2165. Else
  2166.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2167.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2168.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2169.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2170.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-63- || ERROR:  at 'Log current CORE Update ID'  -Releas...
  2171.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2172.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2173.            End Condition
  2174.        End Condition
  2175.    End Condition
  2176. End Condition
  2177. //
  2178. Begin Text Compare : [~check_core_online] Contains 'true'
  2179.    Set text [~check_update_ID] to [{TXT:~check_updateID_url}] (Trim) (Replace ' ' with '')
  2180.    Begin Text Compare : [~check_update_ID] Starts With '2'
  2181.        Set integer [~online_update_ID] value to the converted value of {TXT:~check_update_ID}
  2182.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2183.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2184.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2185.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
  2186.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-64- || INFO:  Online Update ID - ~online_update_ID = {I...
  2187.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2188.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2189.                End Condition
  2190.            End Condition
  2191.        End Condition
  2192.    Else
  2193.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2194.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2195.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2196.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2197.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-65- || ERROR:  CORE VERSION DOES NOT START WITH 2  -- W...
  2198.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2199.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2200.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-65b- || ERROR:  Online Update ID - ~online_update_ID = ...
  2201.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2202.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2203.                End Condition
  2204.            End Condition
  2205.        End Condition
  2206.    End Condition
  2207. End Condition
  2208. // ====================================================================================================
  2209. //
  2210. //
  2211. //
  2212. //  ===================================================================================================
  2213. //  ==============================MODULE SPECIFIC UPDATE ROLLBACK================================================
  2214. //  ===================================================================================================
  2215. //
  2216. // Check for Forced Rollback to Default Config - this method is used to avoid conversion/comparison errors in event log
  2217. Set Boolean [~check_minor_ver_rollback] to [Not Set]
  2218. Convert true/false (boolean) [AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK] to true/false (boolean) [~check_rollback]
  2219. Begin Boolean Compare : [~check_rollback] Equals True
  2220.    Set Boolean [~check_minor_ver_rollback] to True
  2221. End Condition
  2222. Set Boolean [~check_rollback] to [Not Set]
  2223. // ====================================================================================================
  2224. //
  2225. //
  2226. //
  2227. //
  2228. //  ===================================================================================================
  2229. //  ====================================DATA DENC TABLE INIT================================================
  2230. //  ===================================================================================================
  2231. //
  2232. Begin Boolean Compare : [~AVCS_DENC_INIT] Equals False
  2233.    Set text [~AVCS_CORE_KEY1] to '<span hidden>'
  2234.    Set text [~{TXT:~AVCS_CORE_KEY1}] to ''
  2235.    Set text [~AVCS_CORE_KEY2] to '</span hidden>'
  2236.    Set text [~{TXT:~AVCS_CORE_KEY2}] to ''
  2237.    //
  2238.    Set Boolean [~AVCS_DENC_INIT] to True
  2239. End Condition
  2240. //  =============================================================================
  2241. //
  2242. //
  2243. //
  2244. //  ===================================================================================================
  2245. //  ====================================DATA TABLE LOADING================================================
  2246. //  ===================================================================================================
  2247. //
  2248. // Load Module Config Table
  2249. Set text [~configs_load_method] to 'update'
  2250. Marker: CORE_TABLE_LOAD
  2251. //
  2252. //
  2253. //
  2254. //  ===================================================================================================
  2255. //  ====================================MINOR UPDATES & ROLLBACK CHECK=======================================
  2256. //  ===================================================================================================
  2257. //
  2258. Begin Condition : ([~check_core_online] Contains 'true' AND [~postpone_update] Does Not Equal True AND [~online_update_ID] Does Not Equal [~module_update_ID] AND [{STATE_FILEEXISTS:~check_upd_path}] Contains '1')
  2259.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2260.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2261.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2262.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-66- || INFO:  UPDATE RUN INIT -   ~profile_to_init = {T...
  2263.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2264.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2265.            End Condition
  2266.        End Condition
  2267.    End Condition
  2268.    //
  2269.    //
  2270.    Begin Condition : [~check_minor_ver_rollback] Equals True OR [AVCS_LIVE_UPDATES] Equals 'OFF'
  2271.        Write [Red] 'New Version Available for the {TXTUPPER:~profile_to_init} Profile but AVCS Update Prompts are OFF' to log
  2272.        Pause 0.75 seconds
  2273.        Write [Red] 'If you want to re-enable Updates now  -- hold CTRL+SHFT until menu appears' to log
  2274.        Pause 0.5 seconds
  2275.        Write [Blank] '-- otherwise, profile will continue loading current version...' to log
  2276.        Pause 3.25 seconds
  2277.        Begin Condition : ([{STATE_KEYSTATE:LSHIFT}] Equals '1' AND [{STATE_KEYSTATE:LCTRL}] Equals '1') OR ([{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:RCTRL}] Equals '1')
  2278.            Pause 1.25 seconds
  2279.            Begin Condition : ([{STATE_KEYSTATE:LSHIFT}] Equals '1' AND [{STATE_KEYSTATE:LCTRL}] Equals '1') OR ([{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:RCTRL}] Equals '1')
  2280.                Pause 1.25 seconds
  2281.                Begin Condition : ([{STATE_KEYSTATE:LSHIFT}] Equals '1' AND [{STATE_KEYSTATE:LCTRL}] Equals '1') OR ([{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:RCTRL}] Equals '1')
  2282.                    Write [Orange] 'Opening AVCS Live Updates toggle confirmation...' to log
  2283.                    Set text [~avcs_live_updates] to '{TXT:AVCS_LIVE_UPDATES:ON}' (Upper Case)
  2284.                    //
  2285.                    Set text [~toggle_update_checks_choice] to 'UPDATE: Toggle all AVCS Profile Minor Update Prompts (currently: {TXT:~avcs_live_updates})'
  2286.                    Set text [~update_choice_TITLE] to 'AVCS4 - Toggle all Minor Profile Update Prompts (currently: {TXT:AVCS_LIVE_UPDATES:ON})'
  2287.                    Get Choice Input [~avcs_doublecheck_choice]
  2288.                    //
  2289.                    Begin Text Compare : [~avcs_doublecheck_choice] Equals 'Yes'
  2290.                        Begin Text Compare : [~avcs_live_updates] Equals 'ON'
  2291.                            Set text [AVCS_LIVE_UPDATES] to 'OFF'
  2292.                            Set Boolean [~postpone_update] to True
  2293.                            Write [Green] 'ALL AVCS Profile Minor Update Checks are now OFF' to log
  2294.                        Else If Text Compare : [~avcs_live_updates] Equals 'OFF'
  2295.                            Set text [AVCS_LIVE_UPDATES] to 'ON'
  2296.                            Set Boolean [~postpone_update] to False
  2297.                            Write [Green] 'ALL AVCS Profile Minor Update Checks are now ON' to log
  2298.                        End Condition
  2299.                        //
  2300.                        Begin Text Compare : [~avcs_doublecheck_choice] Does Not Equal ''
  2301.                            Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  2302.                            Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_LIVE_UPDATES'
  2303.                            Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to [AVCS_LIVE_UPDATES]
  2304.                            Set text [~current_sfs_savefilepath] to [AVCS_SFS_SaveFilePath]
  2305.                            Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  2306.                            //    ====================            SUB            ====================
  2307.                            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2308.                                Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  2309.                                Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  2310.                                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2311.                                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  2312.                                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-69- || INFO:  Executing Sub-Command (F_SFS_TO_FILE) wit...
  2313.                            End Condition
  2314.                            //
  2315.                            Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  2316.                            Set Boolean [AVCS_SFS_SORT_bypass] to True
  2317.                            Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  2318.                            //
  2319.                            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2320.                                //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  2321.                                Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  2322.                                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2323.                                Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  2324.                                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2325.                                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-70- || ERROR:  Executed Sub-Command (F_SFS_TO_FILE) inv...
  2326.                                    // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  2327.                                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2328.                                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2329.                                    End Condition
  2330.                                Else
  2331.                                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  2332.                                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-70b- || INFO:  Sub-Command (F_SFS_TO_FILE) COMPLETE -- ...
  2333.                                End Condition
  2334.                            End Condition
  2335.                            //            ====================    END    ====================        
  2336.                            Set text [AVCS_SFS_SaveFilePath] to [~current_sfs_savefilepath]
  2337.                        End Condition
  2338.                        //
  2339.                    Else
  2340.                        //    ((Else If Text Compare : [~avcs_doublecheck_choice] Equals 'No (cancel)'  ))
  2341.                        Set Boolean [~postpone_update] to True
  2342.                    End Condition
  2343.                    //
  2344.                    // Give short time for message and then proceed
  2345.                    //===================MINOR PATCH UPDATE======================================
  2346.                    Pause 1.5 seconds
  2347.                    // Jump back to start of this If/Then/Else, run through it again with new choice
  2348.                    Jump to Marker: CORE_TABLE_LOAD
  2349.                    //
  2350.                End Condition
  2351.            Else
  2352.                Set Boolean [~postpone_update] to True
  2353.                Jump to Marker: CORE_TABLE_LOAD
  2354.            End Condition
  2355.        Else
  2356.            Set Boolean [~postpone_update] to True
  2357.            Jump to Marker: CORE_TABLE_LOAD
  2358.        End Condition
  2359.    End Condition
  2360.    //
  2361.    //
  2362.    //
  2363.    //=========================================================
  2364.    //===================MINOR PATCH UPDATE======================================
  2365.    //=========================================================
  2366.    //
  2367.    // Get Choice for Minor Patch/Bug Fix Update
  2368.    Marker: CORE_UPDATE_MINOR
  2369.    Begin Integer Compare : [~module_update_ID] Does Not Equal 11111111
  2370.        Get Choice Input [~update_choice]
  2371.        //
  2372.        Begin Text Compare : [~update_choice] Equals 'View Changelog'
  2373.            Set text [~changelog_latest] to [{TXT:~changelog_url}]
  2374.            // Check changelog on file and replace with new information if not already matching/existing
  2375.            Begin Text Compare : [{STATE_FILEEXISTS:~changelog_path}] Contains '1'
  2376.                Set text [~changelog_file] to [{TXT:~changelog_path}]
  2377.                Begin Text Compare : [~changelog_file] Does Not Equal '~changelog_latest'
  2378.                    //Get New Changelog from URL > Overwrite Changelog at root only if different
  2379.                    Write (overwrite), '{TXT:~changelog_latest}' to file '{TXT:~changelog_path}'
  2380.                End Condition
  2381.            Else
  2382.                Write (overwrite), '{TXT:~changelog_latest}' to file '{TXT:~changelog_path}'
  2383.            End Condition
  2384.            // Display Changelog for this module with default program set for opening .txt files in user Windows Envir.
  2385.            Begin Text Compare : [AVCS_CORE_Notepad] Equals ''
  2386.                Run application '{TXT:~changelog_path}' - wait until it completes
  2387.            Else
  2388.                Run application '{TXT:AVCS_CORE_Notepad:Notepad.exe}' -with parameters '{TXT:~changelog_path}'
  2389.            End Condition
  2390.            Set text [~changelog_latest] to [Not Set]
  2391.            Set text [~changelog_file] to [Not Set]
  2392.            Jump to Marker: CORE_UPDATE_MINOR
  2393.        Else If Text Compare : [~update_choice] Equals 'No'
  2394.            Set Boolean [~postpone_update] to True
  2395.            Set text [~changelog_latest] to [Not Set]
  2396.            Set text [~changelog_file] to [Not Set]
  2397.            Jump to Marker: CORE_TABLE_LOAD
  2398.        End Condition
  2399.    End Condition
  2400.    //=========================================================
  2401.    // APPLY MINOR UPDATE --PATCH--   NOT First Run, AND Online Ver DOES NOT match File Ver AND Ver Rollback is False -- LOAD FROM URL
  2402.    //=========================================================
  2403.    //
  2404.    Set text [~config_file_enc] to [{TXT:~check_upd_path}]
  2405.    Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_cfg_path}'
  2406.    Set text [~config_file_enc] to [{TXT:~update_table_url}]
  2407.    Set text [~config_file_enc] to [~config_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
  2408.    Set text [~config_file_enc] to [~config_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
  2409.    Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_upd_path}'
  2410.    Write (overwrite), '{INT:~online_update_ID}' to file '{TXT:~update_ID_path}'
  2411.    Set Boolean [~configs_updated] to True
  2412.    //=========================================================
  2413.    //===================END MINOR PATCH UPDATE==================================
  2414.    //=========================================================
  2415.    //
  2416.    //
  2417.    //
  2418. Else If : ([{STATE_FILEEXISTS:~check_upd_path}] Does Not Contain '1' AND [{STATE_FILEEXISTS:~check_cfg_path}] Does Not Contain '1' AND [~check_core_online] Contains 'true')
  2419.    //  --- FIRST RUN -- INFORM USER OF UPDATES METHOD - ALLOW THEM TO SET NOW
  2420.    Begin Condition : ([~module_update_ID] Equals 11111111 AND [AVCS_LIVE_UPDATES] Does Not Equal 'OFF' AND [AVCS_LIVE_UPDATES] Does Not Equal 'ON')
  2421.        Set text [~update_choice] to [Not Set]
  2422.        Set text [~update_mastermode_choice] to [Not Set]
  2423.        Set text [~update_choice_LEAVEON] to 'YES -  (will give you choice box when updates found)'
  2424.        Set text [~update_choice_TURNOFF] to 'NO -  (updates not applied, message in VoiceAttack event log only)'
  2425.        Set text [~update_choice_module_check] to [~profile_to_init] (Upper Case)
  2426.        Begin Text Compare : [~update_choice_module_check] Does Not Equal 'CORE'
  2427.            Begin Text Compare : [AVCS_LIVE_UPDATES] Equals 'OFF'
  2428.                Set text [~update_mastermode_choice] to 'NO -  (updates not applied, message in VoiceAttack event log only)'
  2429.                Set text [AVCS_LIVE_UPDATES] to 'OFF'
  2430.            Else
  2431.                Set text [~update_mastermode_choice] to 'YES -  (will give you choice box when updates found)'
  2432.                Set text [AVCS_LIVE_UPDATES] to 'ON'
  2433.            End Condition
  2434.        Else
  2435.            Set text [~update_choice_TITLE] to 'AVCS4 - Toggle all Minor Profile Update Prompts (currently {TXT:AVCS_LIVE_UPDATES:ON})'
  2436.            Get Choice Input [~update_mastermode_choice]
  2437.        End Condition
  2438.        Set text [~current_live_updates_setting] to '{TXT:AVCS_LIVE_UPDATES:ON}'
  2439.        //
  2440.        Begin Condition : ([~update_mastermode_choice] Equals [~update_choice_TURNOFF] AND [~current_live_updates_setting] Equals 'ON')
  2441.            Set text [AVCS_LIVE_UPDATES] to 'OFF'
  2442.        Else If : ([~update_mastermode_choice] Equals [~update_choice_LEAVEON] AND [~current_live_updates_setting] Equals 'OFF')
  2443.            Set text [AVCS_LIVE_UPDATES] to 'ON'
  2444.        End Condition
  2445.        //
  2446.        Write [Green] 'Continuing Initialization....' to log
  2447.        //
  2448.        Set integer [AVCS_SFS_SAVED_requests] value to 1
  2449.        Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_LIVE_UPDATES'
  2450.        Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{TXT:AVCS_LIVE_UPDATES:ON}'
  2451.        //
  2452.        Begin Text Compare : [{STATE_FILEEXISTS:AVCS_CORE_SaveFilePath}] Equals '1'
  2453.            Set text [~avcs_check_for_backupindex] to [{TXT:AVCS_CORE_SaveFilePath}]
  2454.        Else
  2455.            Set text [~avcs_check_for_backupindex] to ''
  2456.        End Condition
  2457.        Begin Text Compare : [~avcs_check_for_backupindex] Does Not Contain 'AVCS_SFS_SaveFileBackupCount'
  2458.            Set integer [AVCS_SFS_SaveFileBackupCount] value to 0
  2459.            Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  2460.            Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_SFS_SaveFileBackupCount'
  2461.            Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{INT:AVCS_SFS_SaveFileBackupCount:0}'
  2462.        End Condition
  2463.        Begin Text Compare : [~avcs_check_for_backupindex] Does Not Contain 'AVCS_SFS_CurrentBackupIndex'
  2464.            Set integer [AVCS_SFS_CurrentBackupIndex] value to 0
  2465.            Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  2466.            Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_SFS_CurrentBackupIndex'
  2467.            Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{INT:AVCS_SFS_CurrentBackupIndex:0}'
  2468.        End Condition
  2469.        //
  2470.        // Save new Updates Setting to CORE Save File (set temp var to restore current save file path)
  2471.        Set text [~current_sfs_savefilepath] to [AVCS_SFS_SaveFilePath]
  2472.        Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  2473.        //    ====================            SUB            ====================
  2474.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2475.            Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  2476.            Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  2477.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2478.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  2479.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-71- || INFO:  Executing Sub-Command (F_SFS_TO_FILE) wit...
  2480.        End Condition
  2481.        //
  2482.        Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  2483.        Set Boolean [AVCS_SFS_SORT_bypass] to True
  2484.        Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  2485.        //
  2486.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2487.            //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  2488.            Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  2489.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2490.            Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  2491.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2492.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-72- || ERROR:  Executed Sub-Command (F_SFS_TO_FILE) inv...
  2493.                // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  2494.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2495.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2496.                End Condition
  2497.            Else
  2498.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  2499.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-72b- || INFO:  Sub-Command (F_SFS_TO_FILE) COMPLETE -- ...
  2500.            End Condition
  2501.        End Condition
  2502.        //            ====================    END    ====================        
  2503.        // Restore previous save file path
  2504.        Set text [AVCS_SFS_SaveFilePath] to [~current_sfs_savefilepath]
  2505.        //
  2506.    End Condition
  2507.    //
  2508.    //
  2509.    // IF First Run, Core ONLINE and Table/Data NOT in APPS folder yet
  2510.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2511.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2512.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2513.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  2514.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-75- || INFO:  FIRST RUN INIT -   ~profile_to_init = {TX...
  2515.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2516.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2517.            End Condition
  2518.        End Condition
  2519.    End Condition
  2520.    // Create Config Folder on First Use
  2521.    Set text [~config_file_enc] to [{TXT:~config_table_url}]
  2522.    Set text [~config_file_enc] to [~config_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
  2523.    Set text [~config_file_enc] to [~config_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
  2524.    Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_cfg_path}'
  2525.    //  Create Update Folder on First Use
  2526.    Set text [~config_file_enc] to [{TXT:~update_table_url}]
  2527.    Set text [~config_file_enc] to [~config_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
  2528.    Set text [~config_file_enc] to [~config_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
  2529.    Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_upd_path}'
  2530.    // Create Changelog and Update ID Files
  2531.    Set text [~changelog_latest] to [{TXT:~changelog_url}]
  2532.    Write (overwrite), '{TXT:~changelog_latest}' to file '{TXT:~changelog_path}'
  2533.    Write (overwrite), '{INT:~online_update_ID}' to file '{TXT:~update_ID_path}'
  2534.    //
  2535. Else If : ([~check_minor_ver_rollback] Equals True AND [{STATE_FILEEXISTS:~check_cfg_path}] Contains '1')
  2536.    // NOT First Run, File Exists AND Rollback is TRUE -- LOAD FROM CONFIG File Path
  2537.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2538.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2539.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2540.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
  2541.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-76- || INFO:  ROLLBACK REPEAT USER RUN INIT - (CFG)  ~p...
  2542.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2543.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2544.            End Condition
  2545.        End Condition
  2546.    End Condition
  2547.    Set text [~config_file_enc] to [{TXT:~check_cfg_path}]
  2548.    Set text [~configs_load_method] to 'config'
  2549.    Set Boolean [~configs_load_apps] to True
  2550. Else If : ([~check_minor_ver_rollback] Equals False AND [{STATE_FILEEXISTS:~check_upd_path}] Contains '1')
  2551.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2552.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2553.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2554.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  2555.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-77- || INFO:  REPEAT USER RUN INIT - (UPD)  ~profile_to...
  2556.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2557.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2558.            End Condition
  2559.        End Condition
  2560.    End Condition
  2561.    // NOT First Run, AND Offline OR Online Ver matches File Ver AND Rollback is False -- LOAD FROM UPDATE File Path
  2562.    Set text [~config_file_enc] to [{TXT:~check_upd_path}]
  2563.    Set Boolean [~configs_load_apps] to True
  2564. Else If Text Compare : [{STATE_FILEEXISTS:~check_cfg_path}] Contains '1'
  2565.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2566.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2567.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2568.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  2569.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-78- || INFO:  REPEAT USER RUN INIT - (CFG)  ~profile_to...
  2570.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2571.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2572.            End Condition
  2573.        End Condition
  2574.    End Condition
  2575.    // NOT First Run, UPD File Does not Exist AND Offline OR Online Ver matches File Ver AND Rollback is False -- LOAD FROM FILE
  2576.    Set text [~config_file_enc] to [{TXT:~check_cfg_path}]
  2577.    Set text [~configs_load_method] to 'config'
  2578.    Set Boolean [~configs_load_apps] to True
  2579. Else If : ([~check_minor_ver_rollback] Equals True AND [{STATE_FILEEXISTS:~check_cfg_path}] Does Not Contain '1' AND [~check_core_online] Contains 'true')
  2580.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2581.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2582.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2583.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  2584.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-79- || INFO:  POSSIBLY FIRST RUN INIT -   ~profile_to_i...
  2585.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2586.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2587.            End Condition
  2588.        End Condition
  2589.    End Condition
  2590.    // Likely NOT First Run - Is Possibly Reinstall, and Rollback is TRUE -File Does Not Exist- LOAD FROM URL - Write CONFIG to CONFIG File Path Only
  2591.    Set text [~config_file_enc] to [{TXT:~config_table_url}]
  2592.    Set text [~config_file_enc] to [~config_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
  2593.    Set text [~config_file_enc] to [~config_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
  2594.    Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_cfg_path}'
  2595.    Set text [~configs_load_method] to 'config'
  2596. Else
  2597.    // IF First Run, Core OFFLINE and Table/Data NOT in APPS folder yet
  2598.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2599.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2600.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2601.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2602.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-80- || ERROR:  CORE OFFLINE AND CONFIG TABLE NOT ON FIL...
  2603.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2604.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2605.            End Condition
  2606.        End Condition
  2607.    End Condition
  2608.    //
  2609.    // Clean Up useless folders created (in preparation for New Install of Current Version without benefit of standard updating cleanup methods)
  2610.    Set text [~avcs_installed_profiles_list_path] to '{VA_APPS}\AVCS\save_files\Util\update\dmp.txt'
  2611.    Begin Text Compare : [{STATE_FILEEXISTS:~avcs_installed_profiles_list_path}] Equals '1'
  2612.        Set text [~avcs_installed_profiles_list] to [{VA_APPS}\AVCS\save_files\Util\update\dmp.txt]
  2613.        Begin Condition : ([~avcs_installed_profiles_list] Does Not Equal '' AND [~avcs_installed_profiles_list] Starts With 'AVCS_PROFILE_AVCS')
  2614.            Inline VB Function: AVCS_GetInstalledProfileNames, wait until execution finishes
  2615.            Begin Text Compare : [avcs_installed_profiles_names] Does Not Equal ''
  2616.                Set text [~avcs_profiles_list_path] to '{VA_APPS}\AVCS\avcs_profiles.txt'
  2617.                Begin Text Compare : [{STATE_FILEEXISTS:~avcs_profiles_list_path}] Equals '1'
  2618.                    Set text [~avcs_installed_profiles_list] to [{TXT:~avcs_profiles_list_path}] (Replace '{TXT:~avcs_installed_profiles_names}' with '')
  2619.                    Write (overwrite), '{TXT:~avcs_installed_profiles_list:}' to file '{TXT:~avcs_profiles_list_path}'
  2620.                    Write (overwrite), '{TXT:~avcs_installed_profiles_names:}' to file '{TXT:~avcs_new_profiles_list_path}'
  2621.                End Condition
  2622.            End Condition
  2623.        End Condition
  2624.    End Condition
  2625.    Set text [~avcs_folders] to '{TXT:~module_folder_root}\{TXTUPPER:~profile_to_init}\{TXT:~avcs_VN:}(/n){VA_APPS}\AVCS\save_files\{TXTLOWER:~profile_to_init}_save\{TXT:~avcs_...
  2626.    Inline VB Function: AVCS_CheckForAndDeleteConfigFolders, wait until execution finishes
  2627.    //
  2628.    Write [Red] 'AVCS ERROR!  AVCS CORE Online Database is offline, and cannot install this profile - or this AVCS Profile Version has been replaced by an update.' to log
  2629.    Write [Red] 'AVCS ERROR!  Try again later, check the AVCS Downloads for the most recent version, or contact SemlerPDX at veterans-gaming.com' to log
  2630.    //
  2631.    Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
  2632.    Set Boolean [AVCS_INIT_Debug_TRIGGERED] to [Not Set]
  2633.    Set Boolean [AVCS_PROFILE_SWITCH_SET] to [Not Set]
  2634.    Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
  2635.    //
  2636.    Exit Command
  2637. End Condition
  2638. //
  2639. //
  2640. //
  2641. //  ===================================================================================================
  2642. //  ====================================TABLE AND DATA DENC LOOP===========================================
  2643. //  ===================================================================================================
  2644. //
  2645. Marker: CORE_DENC_LOAD
  2646. Begin Text Compare : [~config_file_enc] Starts With '%'
  2647.    Inline VB Function: AVCS_DATA_DENC, wait until execution finishes
  2648.    Begin Text Compare : [~config_file] Contains '%22'
  2649.        Set text [~config_file] to [~config_file] (Replace '%22' with '"')
  2650.    End Condition
  2651.    Begin Text Compare : [~config_file] Contains '%27'
  2652.        Set text [~config_file] to [~config_file] (Replace '%27' with ''')
  2653.     End Condition
  2654.     Begin Text Compare : [~config_file] Contains '%0d'
  2655.         Set text [~config_file] to [~config_file] (Replace '%0d' with '{NEWLINE}')
  2656.     End Condition
  2657. Else
  2658.     Set text [~config_file] to [~config_file_enc]
  2659. End Condition
  2660. //
  2661. //
  2662. //
  2663. //  ===================================================================================================
  2664. //  ======================================DATA FILE EDITING SECTION==========================================
  2665. //  ===================================================================================================
  2666. //
  2667. //  Find out if TABLE or DATA
  2668. Begin Boolean Compare : [~data_file_load] Equals True
  2669.     //
  2670.     // Overwrite DENC Data to data file path
  2671.     Begin Text Compare : [~config_file_enc] Does Not Equal [~config_file]
  2672.         Write (overwrite), '{TXT:~config_file}' to file '{TXT:~check_cfg_path}'
  2673.     End Condition
  2674.     //
  2675.     Begin Boolean Compare : [AVCS_SFS_EDIT_ConfigFile] Equals True
  2676.         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2677.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2678.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2679.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  2680.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-81- || INFO:  ------ RESERVED FOR EDIT CONFIG OPTION --...
  2681.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2682.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2683.                End Condition
  2684.            End Condition
  2685.        End Condition
  2686.        //
  2687.        //
  2688.        Write [Gray] 'Config Data File opened in Notepad... close this file (saving changes if desired) to load next data file for editing...' to log
  2689.        //  OPEN File in Notepad or Preferred Notepad (If Set)
  2690.        Run application '{TXT:AVCS_SFS_DefaultNotepad:notepad.exe}' -with parameters '{TXT:~check_cfg_path}' - wait until it completes
  2691.        Set text [~config_file] to [{TXT:~check_cfg_path}]
  2692.        //
  2693.    End Condition
  2694.    //
  2695. End Condition
  2696. //
  2697. //
  2698. //
  2699. //  ===================================================================================================
  2700. //  =============================TABLE AND DATA LOAD INLINE FUNCTION===========================================
  2701. //  ===================================================================================================
  2702. //
  2703. // LOAD ALL from Text Variable (List)  (doesn't save to profile)
  2704. Inline VB Function: AVCS_LoadConfigData, wait until execution finishes
  2705. //
  2706. Begin Boolean Compare : [~data_file_load] Equals True
  2707.     Set Boolean [~data_file_load] to False
  2708.     Jump to Marker: CORE_DATA_LOAD
  2709. End Condition
  2710. //
  2711. //
  2712. //
  2713. //  ===================================================================================================
  2714. //  ====================================CLOSED BETA TEST PROFILE CHECK=======================================
  2715. //  ===================================================================================================
  2716. //
  2717. Marker: CORE_MAJ_UPDATE
  2718. //  Bypass Auth & Major Profile Update Check for Profile Dependent Sub-Modules Loading
  2719. Begin Boolean Compare : [~depmod_load] Equals False
  2720.     Set integer [~avcs_module_mustauth] value to the converted value of {INT:{TXT:~profile_to_init:CORE}_AUTH:0}
  2721.     Begin Integer Compare : [~avcs_module_mustauth] Does Not Equal 0
  2722.         Begin Text Compare : [~check_core_online] Contains 'true'
  2723.             Set text [~avcs_module_hsh_table] to [{TXT:~avcs_module_users_url}]
  2724.             Begin Text Compare : [~avcs_module_hsh_table] Contains [~avcs_core_guuid_hsh]
  2725.                 Set integer [~max_use_count] value to the converted value of {INT:{TXT:~profile_to_init}_MAXUSE}
  2726.                 Begin Integer Compare : [~max_use_count] Is Greater Than 0
  2727.                     Begin Integer Compare : [~days_used_count] Is Greater Than [~max_use_count]
  2728.                         Write [Red] 'AVCS CORE -- This Limited Use Private Beta Test has Expired ({INT:~days_used_count:0} of max {INT:~max_use_count} days used) complete.' to log
  2729.                         Write [Blank] 'Thank you for checking out AVCS!  If not out yet, I hope to have a public version of this Beta Test soon!  -SemlerPDX' to log
  2730.                         //
  2731.                         //    ====================            SUB            ====================
  2732.                         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2733.                             Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  2734.                             Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  2735.                             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2736.                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  2737.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-b81- || INFO:  Executing Sub-Command (F_CORE_MAIN) with...
  2738.                        End Condition
  2739.                        //
  2740.                        // Clean Up Files call to remove the new profile listing file in preparation for any other new profiles in future  -  (filename path will ALWAYS be preceeded by {VA_APPS}\AVCS path)
  2741.                        Set text [f_core_function] to 'clean up files'
  2742.                        Set text [f_core_module_GUID] to '{TXT:~uuid_apps_path}'
  2743.                        Execute command, 'f_core_main' (by name) (and wait until it completes)
  2744.                        //
  2745.                        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2746.                            //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  2747.                            Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  2748.                            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2749.                            Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  2750.                                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2751.                                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-b82- || ERROR:  Executed Sub-Command (F_CORE_MAIN) inva...
  2752.                                 // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  2753.                                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2754.                                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2755.                                 End Condition
  2756.                             Else
  2757.                                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  2758.                                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-b82b- || INFO:  Sub-Command (F_CORE_MAIN) COMPLETE -- R...
  2759.                            End Condition
  2760.                        End Condition
  2761.                        //            ====================    END    ====================        
  2762.                        //
  2763.                        Exit Command
  2764.                        //
  2765.                    Else
  2766.                        //
  2767.                        //  Generate APROV key for offline authorization (if not already on file)
  2768.                        Write (overwrite), '{TXT:~avcs_core_guuid_apr}' to file '{TXT:~uuid_apps_path}'
  2769.                        //
  2770.                        Get Text Input [~avcs]
  2771.                        Write [Green] 'AVCS CORE -- Limited Use Private Beta Test is continuing with {INT:~days_used_count:0} of max {INT:~max_use_count} days used...' to log
  2772.                    End Condition
  2773.                End Condition
  2774.                //
  2775.            Else
  2776.                //    ----------------------    USER IS NOT AUTHORIZED -- RETURN MESSAGE ABOUT THIS MODULE / VERSION / AND IF/HOW TO BECOME AUTHORIZED USER   -----------------------
  2777.                Set text [{TXT:~avcs_core_guuid_hsh}] to 'false'
  2778.                //  ====================OFFER UID HASH AND LINK TO/AUTO-OPEN WEBSITE FOR SIGNUP IN CHOICE BOX=========================================================
  2779.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2780.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2781.                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2782.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  2783.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-82- || INFO:  CLOSED BETA TEST - USER MUST PROVIDE UID ...
  2784.                         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2785.                             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2786.                         End Condition
  2787.                     End Condition
  2788.                 End Condition
  2789.                 //  =============================================================================
  2790.                 //  ====================OFFER UID HASH AND LINK TO/AUTO-OPEN WEBSITE FOR SIGNUP IN CHOICE BOX=========================================================
  2791.                 Pause 0.05 seconds
  2792.                 Get Choice Input [~avcs_auth_option]
  2793.                 Begin Condition : [~avcs_auth_option] Equals 'Open AVCS Website to Sign Up for this Private Beta Test' OR [~avcs_auth_option] Equals 'Already applied for this Private Beta Test (use temp authorization)'
  2794.                     Begin Text Compare : [~avcs_auth_option] Equals 'Already applied for this Private Beta Test (use temp authorization)'
  2795.                         Set Boolean [~avcs_skip_application] to True
  2796.                     End Condition
  2797.                     Pause 0.05 seconds
  2798.                     Begin Boolean Compare : [~avcs_skip_application] Does Not Equal True
  2799.                         Run application '{TXT:~avcs_core_applications}'
  2800.                         Pause 0.05 seconds
  2801.                         Get Text Input [~avcs]
  2802.                     Else
  2803.                         Set Boolean [~avcs_skip_application] to [Not Set]
  2804.                     End Condition
  2805.                     //  =============================================================================
  2806.                     //  =============================================================================
  2807.                     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2808.                         Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  2809.                             Write [Pink] '~max_use_count = {INT:~max_use_count}  ||  ~days_used_count = {INT:~days_used_count}  ||  ~max_use_pause_int = {INT:~max_use_pause_int}' to log
  2810.                             Write [Yellow] 'TESTING Can Pause ==  {BOOL:~avcs_update_canpause}' to log
  2811.                         End Condition
  2812.                     End Condition
  2813.                     Begin Boolean Compare : [~avcs_update_canpause] Equals True
  2814.                         Begin Integer Compare : [~max_use_pause_int] Is Greater Than 0
  2815.                             Begin Integer Compare : [~days_used_count] Is Greater Than [~max_use_pause_int]
  2816.                                 Write [Red] 'AVCS CORE -- Private Beta Test Temporary Approval has Expired ({INT:~days_used_count:0} of max {INT:~max_use_pause_int} days used)' to log
  2817.                                 Write [Blank] 'Thank you for checking out AVCS!  I hope to have a public version of this Beta Test soon!  -SemlerPDX' to log
  2818.                                 Exit Command
  2819.                             Else
  2820.                                 Get Text Input [~avcs]
  2821.                                 Write [Green] 'AVCS CORE -- Private Beta Test Temporary Approval Granted ({INT:~days_used_count:0} of max {INT:~max_use_pause_int} days used)' to log
  2822.                             End Condition
  2823.                         End Condition
  2824.                     End Condition
  2825.                     //  =============================================================================
  2826.                 Else If Text Compare : [~avcs_auth_option] Equals 'Decline participation - cancel and exit (public beta version will be out soon!)'
  2827.                     Write [Blank] 'Thank you for checking out AVCS!  I hope to have a public version of this Beta Test soon!  -SemlerPDX' to log
  2828.                     Exit Command
  2829.                 End Condition
  2830.                 //  =============================================================================
  2831.             End Condition
  2832.         Else
  2833.             //  Check for APROV key for offline authorization (if not already on file)
  2834.             Begin Text Compare : [~module_uuid_hsh_value] Does Not Contain 'true'
  2835.                 //  =============================================================================
  2836.                 //
  2837.                 //
  2838.                 //  =============================================================================
  2839.                 //    ----------------------  CORE OFFLINE DURING FIRST USE OF MUSTAUTH MODULE  -  USER CANNOT AUTHORIZE -- RETURN MESSAGE ABOUT THIS MODULE / VERSION / AND IF/HOW TO BECOME AUTHORIZED USER   -----------------------
  2840.                 Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2841.                     Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2842.                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2843.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2844.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-83- || ERROR:  CORE OFFLINE DURING FIRST USE AUTHORIZAT...
  2845.                        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2846.                            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2847.                        End Condition
  2848.                    End Condition
  2849.                End Condition
  2850.                //    ----------------------  CORE OFFLINE  -  USER CANNOT AUTHORIZE -- RETURN MESSAGE ABOUT HOW TO BECOME AUTHORIZED USER   -----------------------
  2851.                //    ----------------------  ERROR  -- CORE OFFLINE DURING AUTHORIZATION CHECK --   -----------------------
  2852.                //    ----     ----     ----     EXIT    ----    ----    ----
  2853.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2854.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2855.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2856.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-84x- || ERROR:  AVCS CORE OFFLINE during Authorization ...
  2857.                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2858.                 End Condition
  2859.                 //     ----    ----    ----     END    ----     ----     ----//
  2860.                 //  =============================================================================
  2861.             End Condition - Exit when condition met
  2862.         End Condition
  2863.     End Condition
  2864.     //
  2865.     //
  2866.     //
  2867.     //  ===================================================================================================
  2868.     //  ====================================MAJOR PROFILE UPDATE CHECK================================================
  2869.     //  ===================================================================================================
  2870.     //
  2871.     // MAJOR PROFILE UPDATE CHECK  --- ALSO INCLUDES CHECK Days Used is Factor for this Major Update / Previous Profile Use
  2872.     Convert true/false (boolean) [AVCS_{TXT:~profile_to_init}_MAJ_UPDATE] to true/false (boolean) [~avcs_module_hasupdate]
  2873.     Begin Boolean Compare : [~avcs_module_hasupdate] Equals True
  2874.         Set text [~module_version] to '{INT:AVCS_{TXT:~profile_to_init}_VER_CORE:1}.{INT:AVCS_{TXT:~profile_to_init}_VER_MAJOR:0}.{INT:AVCS_{TXT:~profile_to_init}_VER_MINOR:0}'
  2875.         Convert true/false (boolean) [AVCS_{TXT:~profile_to_init}_CANPAUSE] to true/false (boolean) [~avcs_update_canpause]
  2876.         Begin Boolean Compare : [~avcs_update_canpause] Equals True
  2877.             Set integer [~max_use_count] value to the converted value of {INT:{TXT:~profile_to_init}_MAXUSE}
  2878.             Begin Integer Compare : [~max_use_count] Is Greater Than 1
  2879.                 //  At this point we are fully authorized but can still check use count for restricted uses/closed tests/dev team access
  2880.                 Begin Text Compare : [{STATE_FILEEXISTS:~guid_apps_path}] Contains '1'
  2881.                     Set text [~module_guid] to [{TXT:~guid_apps_path}]
  2882.                 Else
  2883.                     //    ----     ----     ----     EXIT    ----    ----    ----
  2884.                     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2885.                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2886.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  2887.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-85x- || ERROR:  EVAL FDU - CURRENT MODULE UNIQUE VERSIO...
  2888.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2889.                    End Condition
  2890.                    //     ----    ----    ----     END    ----     ----     ----//
  2891.                    Exit Command
  2892.                End Condition
  2893.                //
  2894.                //  =============================================================================
  2895.                //
  2896.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2897.                    Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  2898.                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2899.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  2900.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-86- || INFO:  FILE UUID == SERVER UUID -- -(file uuid =...
  2901.                         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2902.                             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2903.                         End Condition
  2904.                     End Condition
  2905.                 End Condition
  2906.                 //
  2907.                 //
  2908.                 Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2909.                     Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  2910.                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2911.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  2912.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-87- || INFO:  ~days_used_count = {INT:~days_used_count}...
  2913.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2914.                    End Condition
  2915.                End Condition
  2916.                //
  2917.                Begin Integer Compare : [~days_used_count] Is Greater Than [~max_use_count]
  2918.                    // ====================================================================================================
  2919.                    // USER MUST DOWNLOAD AND INSTALL NEW PROFILE VERSION - THIS VERSION IS CLOSED / DEPRECIATED / NO LONGER HOSTED
  2920.                    // INFORM USER PROFILE WILL CONTINUE TO FUNCTION BUT WILL NOT RECIEVE FURTHER PATCH UPDATES
  2921.                    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2922.                        Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  2923.                            Write [Pink] '~max_use_count = {INT:~max_use_count}  ||  ~days_used_count = {INT:~days_used_count}' to log
  2924.                        End Condition
  2925.                        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2926.                            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2927.                            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  2928.                            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-88- || INFO:  USER MUST DOWNLOAD AND INSTALL NEW PROFIL...
  2929.                             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2930.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-88b- || INFO:  INFORM USER PROFILE WILL CONTINUE TO FUN...
  2931.                            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2932.                                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2933.                            End Condition
  2934.                        End Condition
  2935.                    End Condition
  2936.                    // ====================================================================================================
  2937.                    //
  2938.                    // Get User Input -- MAJOR PROFILE UPDATE DOWNLOAD
  2939.                    Pause 0.05 seconds
  2940.                    Get Choice Input [~update_choice]
  2941.                    Begin Text Compare : [~update_choice] Equals 'Open Downloads Webpage (cancel profile initialization)'
  2942.                        Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to False
  2943.                        Set text [~avcs_update_website] to '{TXT:AVCS_{TXT:~profile_to_init}_URL_UPDATE}'
  2944.                        Run application '{TXT:~avcs_update_website:~avcs_core_profiles}'
  2945.                        //    ----     ----     ----     EXIT    ----    ----    ----
  2946.                        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2947.                            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2948.                            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  2949.                            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-89x- || INFO:  AVCS New Profile Download required and W...
  2950.                             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2951.                         End Condition
  2952.                         //     ----    ----    ----     END    ----     ----     ----//
  2953.                     End Condition
  2954.                     Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
  2955.                     Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to [Not Set]
  2956.                     Set text [AVCS_ACTIVE_PROFILE] to [Not Set]
  2957.                     Exit Command
  2958.                     Exit Command
  2959.                     //
  2960.                     // ====================================================================================================
  2961.                 Else
  2962.                     // ================NOTIFY USER OF NEW PROFILE VERSION - EXECUTE SUB COMMAND FUNCTION UPDATE====================================================================================
  2963.                     // CAN CONTINUE TO USE OUTDATED PROFILE BUILD VERSION -- FILES STILL HOSTED AT AVCS CORE - BUT INFORM USER OF END COMING IN (MAX USE) Days
  2964.                     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2965.                         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  2966.                             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2967.                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
  2968.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-90- || INFO:  NEW PROFILE VERSION BUT THIS VERSION STIL...
  2969.                            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2970.                            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
  2971.                            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-90b- || INFO:  INFORM USER OF END COMING IN {EXP:({INT:...
  2972.                             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  2973.                                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2974.                             End Condition
  2975.                         End Condition
  2976.                     End Condition
  2977.                     // ====================================================================================================
  2978.                     //
  2979.                     // Get User Input -- MAJOR PROFILE UPDATE DOWNLOAD
  2980.                     Pause 0.05 seconds
  2981.                     Get Choice Input [~update_choice]
  2982.                     Begin Text Compare : [~update_choice] Equals 'Open Downloads Webpage (cancel profile initialization)'
  2983.                         Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to False
  2984.                         Set text [~avcs_update_website] to '{TXT:AVCS_{TXT:~profile_to_init}_URL_UPDATE}'
  2985.                         Run application '{TXT:~avcs_update_website:~avcs_core_profiles}'
  2986.                         //    ----     ----     ----     EXIT    ----    ----    ----
  2987.                         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  2988.                             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  2989.                             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  2990.                             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-91x- || INFO:  AVCS New Profile Download required and W...
  2991.                            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  2992.                        End Condition
  2993.                        //     ----    ----    ----     END    ----     ----     ----//
  2994.                    End Condition - Exit when condition met
  2995.                    //
  2996.                    // ====================================================================================================
  2997.                End Condition
  2998.            Else
  2999.                // ================NOTIFY USER OF NEW PROFILE VERSION - EXECUTE SUB COMMAND FUNCTION UPDATE====================================================================================
  3000.                //
  3001.                // CAN CONTINUE TO USE OUTDATED PROFILE BUILD VERSION INDEFINITELY
  3002.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3003.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3004.                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3005.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3006.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-92- || INFO:  NEW PROFILE VERSION BUT THIS VERSION STIL...
  3007.                         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3008.                             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3009.                         End Condition
  3010.                     End Condition
  3011.                 End Condition
  3012.                 // ====================================================================================================
  3013.                 //
  3014.                 // Get User Input -- MAJOR PROFILE UPDATE DOWNLOAD
  3015.                 Pause 0.05 seconds
  3016.                 Get Choice Input [~update_choice]
  3017.                 Begin Text Compare : [~update_choice] Equals 'Open Downloads Webpage (cancel profile initialization)'
  3018.                     Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to False
  3019.                     Set text [~avcs_update_website] to '{TXT:AVCS_{TXT:~profile_to_init}_URL_UPDATE}'
  3020.                     Run application '{TXT:~avcs_update_website:~avcs_core_profiles}'
  3021.                     //    ----     ----     ----     EXIT    ----    ----    ----
  3022.                     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3023.                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3024.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  3025.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-93x- || INFO:  AVCS New Profile Download required and W...
  3026.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3027.                    End Condition
  3028.                    //     ----    ----    ----     END    ----     ----     ----//
  3029.                    Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
  3030.                    Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to [Not Set]
  3031.                    Set text [AVCS_ACTIVE_PROFILE] to [Not Set]
  3032.                End Condition - Exit when condition met
  3033.                //
  3034.                // ====================================================================================================
  3035.            End Condition
  3036.        Else
  3037.            // ====================================================================================================
  3038.            // USER MUST DOWNLOAD AND INSTALL NEW PROFILE VERSION - THIS VERSION IS CLOSED / DEPRECIATED / NO LONGER HOSTED
  3039.            // INFORM USER PROFILE WILL CONTINUE TO FUNCTION BUT WILL NOT RECIEVE ANY FURTHER UPDATES
  3040.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3041.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3042.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3043.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3044.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-94- || INFO:  USER MUST DOWNLOAD AND INSTALL NEW PROFIL...
  3045.                     Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3046.                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3047.                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-94b- || INFO:  INFORM USER PROFILE WILL CONTINUE TO FUN...
  3048.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3049.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3050.                    End Condition
  3051.                End Condition
  3052.            End Condition
  3053.            // ====================================================================================================
  3054.            //
  3055.            // Get User Input -- MAJOR PROFILE UPDATE DOWNLOAD
  3056.            Pause 0.05 seconds
  3057.            Get Choice Input [~update_choice]
  3058.            Begin Text Compare : [~update_choice] Equals 'Open Downloads Webpage (cancel profile initialization)'
  3059.                Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to False
  3060.                Set text [~avcs_update_website] to '{TXT:AVCS_{TXT:~profile_to_init}_URL_UPDATE}'
  3061.                Run application '{TXT:~avcs_update_website:~avcs_core_profiles}'
  3062.                //    ----     ----     ----     EXIT    ----    ----    ----
  3063.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3064.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3065.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  3066.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-95x- || INFO:  AVCS New Profile Download required and W...
  3067.                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3068.                 End Condition
  3069.                 //     ----    ----    ----     END    ----     ----     ----//
  3070.             End Condition
  3071.             Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
  3072.             Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to [Not Set]
  3073.             Set text [AVCS_ACTIVE_PROFILE] to [Not Set]
  3074.             Exit Command
  3075.             // ====================================================================================================
  3076.         End Condition
  3077.     Else
  3078.         // ====================================================================================================
  3079.         // CAN CONTINUE - CURRENT VERSION IS HIGHEST VERSION FOR PROFILE BUILD
  3080.         Begin Boolean Compare : [~check_minor_ver_rollback] Equals True
  3081.             Write [Green] 'Current {TXTUPPER:~profile_to_init} Profile Version ({INT:AVCS_{TXT:~profile_to_init}_VER_CORE}.{INT:AVCS_{TXT:~profile_to_init}_VER_MAJOR}.{INT:AVCS_{TXT:~profile_to_init}_VER_MINOR}) is previous version (Rollback ON) - loading data files now...' to log
  3082.         Else
  3083.             Write [Green] 'Current {TXTUPPER:~profile_to_init} Profile Version ({INT:AVCS_{TXT:~profile_to_init}_VER_CORE}.{INT:AVCS_{TXT:~profile_to_init}_VER_MAJOR}.{INT:AVCS_{TXT:~profile_to_init}_VER_MINOR}) is latest version - loading data files now...' to log
  3084.         End Condition
  3085.         Pause 0.5 seconds
  3086.         // ====================================================================================================
  3087.     End Condition
  3088. End Condition
  3089. //
  3090. //
  3091. //
  3092. //  ===================================================================================================
  3093. //  ====================================DATA FILE LOADING SECTION================================================
  3094. //  ===================================================================================================
  3095. //
  3096. Begin Boolean Compare : [~data_file_load] Equals False
  3097.     Set integer [~data_index] value to 0
  3098.     Set integer [~config_data_count] value to the converted value of {INT:AVCS_{TXT:~profile_to_init}_CFG_COUNT}
  3099. End Condition
  3100. //
  3101. // Load All Config Data Files for Module
  3102. Marker: CORE_DATA_LOAD
  3103. Begin Integer Compare : [~config_data_count] Is Greater Than 0
  3104.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3105.         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3106.             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3107.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
  3108.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-96- || INFO:  DATA LOAD -   ~profile_to_init = {TXT:~pr...
  3109.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3110.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3111.            End Condition
  3112.        End Condition
  3113.    End Condition
  3114.    Begin Integer Compare : [~data_index] Is Less Than [~config_data_count]
  3115.        Begin Boolean Compare : [~depmod_load] Equals False
  3116.            Write [Gray] 'Loading {TXTUPPER:~profile_to_init} Profile configuration Data File {EXP:({INT:~data_index:0} + 1)}' to log
  3117.        Else
  3118.            Write [Gray] 'Loading {TXTUPPER:~profile_to_init} Module configuration Data File {EXP:({INT:~data_index:0} + 1)}' to log
  3119.        End Condition
  3120.    End Condition
  3121.    Set integer [~data_index] to [~data_index] plus 1
  3122.    Begin Integer Compare : [~data_index] Is Less Than Or Equals [~config_data_count]
  3123.        Set Boolean [~data_file_load] to True
  3124.        // Evaluate Config Data File Load Method
  3125.        Begin Boolean Compare : [~configs_updated] Equals True
  3126.            // APPLY MINOR UPDATE --PATCH--   NOT First Run, AND Online Ver DOES NOT match File Ver AND Ver Rollback is False -- LOAD FROM URL
  3127.            Set text [~data_file_path] to '{TXT:~module_file_root}\update\avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.cfg'
  3128.            Begin Text Compare : [{STATE_FILEEXISTS:~data_file_path}] Contains '1'
  3129.                Set text [~data_file_enc] to [{TXT:~module_file_root}\update\avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.cfg]
  3130.                Write (overwrite), '{TXT:~data_file_enc}' to file '{TXT:~module_file_root}\config\avcs_{TXTLOWER:~profile_to_init}_data_{INT:~data_index}.cfg'
  3131.            End Condition
  3132.            Set text [~data_file_enc] to [{TXT:~module_url_root}/update/avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.htm/]
  3133.            Set text [~data_file_enc] to [~data_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
  3134.            Set text [~data_file_enc] to [~data_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
  3135.            Write (overwrite), '{TXT:~data_file_enc}' to file '{TXT:~module_file_root}\update\avcs_{TXTLOWER:~profile_to_init}_data_{INT:~data_index}.cfg'
  3136.        Else
  3137.            Set text [~check_cfg_path] to '{TXT:~module_file_root}\{TXT:~configs_load_method}\avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.cfg'
  3138.            Begin Text Compare : [{STATE_FILEEXISTS:~check_cfg_path}] Contains '1'
  3139.                Set text [~data_file_enc] to [{TXT:~module_file_root}\{TXT:~configs_load_method}\avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.cfg]
  3140.            Else If : ([{STATE_FILEEXISTS:~check_cfg_path}] Does Not Contain '1' AND [~check_core_online] Contains 'true')
  3141.                // IF First Run, Core ONLINE and Table/Data NOT in APPS folder yet
  3142.                Set text [~data_file_enc] to [{TXT:~module_url_root}/config/avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.htm/]
  3143.                Set text [~data_file_enc] to [~data_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
  3144.                Set text [~data_file_enc] to [~data_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
  3145.                Write (overwrite), '{TXT:~data_file_enc}' to file '{TXT:~module_file_root}\config\avcs_{TXTLOWER:~profile_to_init}_data_{INT:~data_index}.cfg'
  3146.                Set text [~data_file_enc] to [{TXT:~module_url_root}/update/avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.htm/]
  3147.                Set text [~data_file_enc] to [~data_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
  3148.                Set text [~data_file_enc] to [~data_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
  3149.                Write (overwrite), '{TXT:~data_file_enc}' to file '{TXT:~module_file_root}\update\avcs_{TXTLOWER:~profile_to_init}_data_{INT:~data_index}.cfg'
  3150.            Else
  3151.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3152.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3153.                        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3154.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3155.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-97- || ERROR:  DATA in Apps Folder Does not exist AND c...
  3156.                         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3157.                             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3158.                         End Condition
  3159.                     End Condition
  3160.                 End Condition
  3161.             End Condition
  3162.         End Condition
  3163.         // Loop Through All Data Files
  3164.         Set text [~config_file_enc] to [~data_file_enc]
  3165.         Jump to Marker: CORE_DENC_LOAD
  3166.         //
  3167.     End Condition
  3168. End Condition
  3169. Set Boolean [~configs_updated] to [Not Set]
  3170. Set Boolean [~data_file_load] to [Not Set]
  3171. Set integer [~config_data_count] value to [Not Set]
  3172. //
  3173. //
  3174. //
  3175. //  ===================================================================================================
  3176. //  ====================================DEPENDENT MODULE LOAD SECTION================================================
  3177. //  ===================================================================================================
  3178. //
  3179. // Based on Dep Mod Count, Load All Dep Mod Config & Data Files
  3180. //  Load Dependent Modules based on Dep Mod Count Var, Load All Dep Mod Config & Data Files  ||  AVCS_CORE_DEPMOD_COUNT=1  *(VAS)
  3181. Begin Boolean Compare : [~depmod_load] Equals False
  3182.     Set integer [~depmod_index] value to 0
  3183.     Set integer [~dep_modules_count] value to the converted value of {INT:AVCS_{TXT:~profile_to_init}_DEPMOD_COUNT:0}
  3184.     Set integer [AVCS_{TXT:~profile_to_init}_DEPMOD_COUNT] value to [Not Set]
  3185.     Set text [~primary_init_profile] to [~profile_to_init]
  3186.     Set text [~primary_init_profileVN] to [~avcs_VN]
  3187.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3188.         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3189.             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3190.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3191.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-98- || INFO:  FIRST DEPMOD INIT -   ~profile_to_init = ...
  3192.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3193.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3194.            End Condition
  3195.        End Condition
  3196.    End Condition
  3197.    //
  3198. End Condition
  3199. //
  3200. // Load All Profile Miscellaneous Commands
  3201. Inline VB Function: AVCS_LoadAllProfMiscCommands, wait until execution finishes
  3202. //
  3203. // Clear Config Table Loading Variables from Profile
  3204. Set integer [AVCS_{TXT:~profile_to_init}_CFG_COUNT] value to [Not Set]
  3205. //
  3206. Marker: INIT_MODULE_DEPENDENCY
  3207. // Set Module which was just loaded to "TRUE"
  3208. Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to True
  3209. Begin Integer Compare : [~dep_modules_count] Is Greater Than 0
  3210.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3211.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3212.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3213.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
  3214.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-99- || INFO:  DEPMOD INIT LOOP -   ~profile_to_init = {...
  3215.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3216.                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3217.             End Condition
  3218.         End Condition
  3219.     End Condition
  3220.     Set integer [~depmod_index] to [~depmod_index] plus 1
  3221.     Begin Integer Compare : [~depmod_index] Is Less Than Or Equals [~dep_modules_count]
  3222.         Set Boolean [~depmod_load] to True
  3223.         Set Boolean [~configs_load_apps] to False
  3224.         // Loop Through all Dependent Modules
  3225.         Set text [~profile_to_init] to '{TXT:AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_NM}' (Trim) (Replace ' ' with '') (Upper Case)
  3226.         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3227.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3228.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3229.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
  3230.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-100- || INFO:  DEPMOD INIT LOOP 2 - DEPMOD NAME   ~prof...
  3231.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3232.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3233.                End Condition
  3234.            End Condition
  3235.        End Condition
  3236.        Begin Condition : [~profile_to_init] Equals '' OR [~profile_to_init] Equals 'Not set'
  3237.            //    ----     ----     ----     EXIT    ----    ----    ----
  3238.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3239.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3240.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3241.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-101x- || ERROR:  DEPMOD INIT LOOP 2 - DEPMOD NAME NOT F...
  3242.                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3243.             End Condition
  3244.             //     ----    ----    ----     END    ----     ----     ----//
  3245.         End Condition - Exit when condition met
  3246.         Jump to Marker: INIT_MODULES_BY_NAME
  3247.         //
  3248.     End Condition
  3249. End Condition
  3250. //
  3251. //
  3252. Set text [AVCS_CONFIG_TITLE] to [Not Set]
  3253. Set Boolean [~depmod_load] to [Not Set]
  3254. Set integer [~dep_modules_count] value to [Not Set]
  3255. Write [Gray] '{TXTUPPER:~primary_init_profile} Data Load Complete - VoiceAttack is now loading profile....' to log
  3256. //
  3257. //
  3258. //    ----     ----     ----     EXIT    ----    ----    ----
  3259. Begin Boolean Compare : [AVCS_SFS_EDIT_ConfigFile] Equals True
  3260.     Set Boolean [AVCS_SFS_EDIT_ConfigFile] to [Not Set]
  3261.     Set text [~avcs_edit_core_check] to '{TXTUPPER:~primary_init_profile}'
  3262.     Begin Text Compare : [~avcs_edit_core_check] Contains 'CORE'
  3263.         Set text [AVCS_INIT_PROFILE] to [Not Set]
  3264.         Set Boolean [AVCS_CORE_INIT] to [Not Set]
  3265.         Set Boolean [AVCS_CORE_FULLYLOADED] to [Not Set]
  3266.         Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
  3267.         Set Boolean [AVCS_PROFILE_SWITCH_SET] to [Not Set]
  3268.     End Condition
  3269.     Reset the active profile
  3270. End Condition - Exit when condition met
  3271. //     ----    ----    ----     END    ----     ----     ----
  3272. //
  3273. //  ===================================================================================================
  3274. //  ====================================PROFILE INITIALIZATION END================================================
  3275. //  ===================================================================================================
  3276. //
  3277. // Verify Primary Module has been Initialized -else jump to beginning
  3278. Marker: INIT_MODULES_COMPLETE
  3279. Begin Condition : ([AVCS_CORE_INIT] Equals True AND [AVCS_INIT_PROFILE] Does Not Equal '' AND [AVCS_INIT_PROFILE] Does Not Contain 'Not set' AND [AVCS_INIT_PROFILE] Does Not Contain 'NOT SET' AND [AVCS_INIT_PROFILE] Does Not Contain 'not set')
  3280.     Set text [~primary_module_initialized] to '{BOOL:AVCS_{TXT:AVCS_INIT_PROFILE:CORE}_INIT:false}'
  3281.     Begin Text Compare : [~primary_module_initialized] Contains 'false'
  3282.         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3283.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3284.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3285.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3286.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-102- || INFO:  --------PRIMARY MODULE NOT INITIALIZED -...
  3287.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3288.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3289.                End Condition
  3290.            End Condition
  3291.        End Condition
  3292.        Set Boolean [~configs_load_apps] to False
  3293.        Jump to Marker: INIT_MODULES_BY_NAME
  3294.    End Condition
  3295. End Condition
  3296. //
  3297. Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
  3298. //
  3299. Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3300.    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3301.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3302.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3303.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-103- || INFO:  COMPLETE -   CORE AND MODULE INITIALIZAT...
  3304.         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3305.         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3306.         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-103b- || INFO:  AVCS_CORE_INIT = {BOOL:AVCS_CORE_INIT} ...
  3307.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3308.            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3309.        End Condition
  3310.    End Condition
  3311. End Condition
  3312. //
  3313. //
  3314. //  ===================================================================================================
  3315. //  ====================================NEXT PROFILE MODULE SWITCH CHECKS================================================
  3316. //  ===================================================================================================
  3317. //
  3318. Begin Condition : ([~next_avcs_profile] Does Not Equal '' AND [~next_avcs_profile] Does Not Equal 'Not set' AND [AVCS_CORE_FULLYLOADED] Equals True)
  3319.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3320.        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3321.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3322.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3323.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-104- || INFO:  [~next_avcs_profile] Does Not Equal '' A...
  3324.             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3325.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3326.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-104b- || INFO:  -(switching to 'next_avcs_profile')---(...
  3327.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3328.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3329.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-104c- || INFO:  CORE INITIALIZE COMPLETE - PROFILE SWIT...
  3330.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3331.                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3332.             End Condition
  3333.         End Condition
  3334.     End Condition
  3335.     //  --  Re-init SFS Variables in ACTIVE PROFILE format, creating save folders if not yet in place
  3336.     Set text [AVCS_ACTIVE_PROFILE] to [~primary_init_profile] (Upper Case)
  3337.     Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to [~primary_init_profileVN]
  3338.     Set Boolean [AVCS_SFS_INIT] to False
  3339.     //    ====================            SUB            ====================
  3340.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3341.         Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3342.         Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3343.         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3344.         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  3345.         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-105- || INFO:  Executing Sub-Command (F_CORE_SFS) with ...
  3346.    End Condition
  3347.    //
  3348.    Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
  3349.    //
  3350.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3351.        //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  3352.        Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  3353.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3354.        Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  3355.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3356.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-106- || ERROR:  Executed Sub-Command (F_CORE_SFS) inval...
  3357.             // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  3358.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3359.                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3360.             End Condition
  3361.         Else
  3362.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3363.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-106b- || INFO:  Sub-Command (F_CORE_SFS) COMPLETE -- Re...
  3364.        End Condition
  3365.    End Condition
  3366.    //            ====================    END    ====================        
  3367.    //  --  Variables to Load from File (or create file on first run) After CORE has finished intializing profile --
  3368.    Begin Text Compare : [{STATE_FILEEXISTS:AVCS_SFS_SaveFilePath}] Equals '1'
  3369.        // ====================================================================================================
  3370.        // ====================================================================================================
  3371.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3372.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3373.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3374.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
  3375.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-107- || INFO:  SAVE FILE PATH IS VALID == 1'
  3376.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3377.                    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3378.                End Condition
  3379.            End Condition
  3380.        End Condition
  3381.        // ====================================================================================================
  3382.        // ====================================================================================================
  3383.        Set text [~data_loaded] to [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}_LOADED]
  3384.        Set text [~saved_data] to [{TXT:AVCS_SFS_SaveFilePath}]
  3385.        Begin Condition : ([~saved_data] Does Not Equal '' AND [~data_loaded] Does Not Contain 'complete')
  3386.            // ====================================================================================================
  3387.            // ====================================================================================================
  3388.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3389.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3390.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3391.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3392.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-108- || INFO:  SAVE FILE PATH HAS DATA TO LOAD --------'
  3393.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3394.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3395.                    End Condition
  3396.                End Condition
  3397.            End Condition
  3398.            // ====================================================================================================
  3399.            // ====================================================================================================
  3400.            //    ====================            SUB            ====================
  3401.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3402.                Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3403.                Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3404.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3405.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  3406.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-109- || INFO:  Executing Sub-Command (F_SFS_LOAD_ALL) w...
  3407.             End Condition
  3408.             //
  3409.             Execute command, 'F_SFS_LOAD_ALL' (by name) (and wait until it completes)
  3410.             Set text [~data_loaded] to [Not Set]
  3411.             //
  3412.             Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3413.                 //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  3414.                 Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  3415.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3416.                 Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  3417.                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3418.                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-110- || ERROR:  Executed Sub-Command (F_SFS_LOAD_ALL) i...
  3419.                    // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  3420.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3421.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3422.                    End Condition
  3423.                Else
  3424.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3425.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-110b- || INFO:  Sub-Command (F_SFS_LOAD_ALL) COMPLETE -...
  3426.                 End Condition
  3427.             End Condition
  3428.             //            ====================    END    ====================        
  3429.         End Condition
  3430.     Else
  3431.         // ====================================================================================================
  3432.         // ====================================================================================================
  3433.         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3434.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3435.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3436.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3437.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-111- || ERROR:  SAVE FILE PATH IS -NOT- VALID == 0'
  3438.                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3439.                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3440.                 End Condition
  3441.             End Condition
  3442.         End Condition
  3443.         // ====================================================================================================
  3444.         // ====================================================================================================
  3445.         Append, '' to file '{TXT:AVCS_SFS_SaveFilePath}'
  3446.     End Condition
  3447.     //
  3448.     Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
  3449.     //
  3450.     Begin Condition : ([AVCS_LOAD_OPTIONS] Equals False AND [AVCS_ADVANCED_OPTIONS] Equals False)
  3451.         Begin Boolean Compare : [AVCS_PROFILE_SWITCH_SET] Does Not Equal True
  3452.             Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
  3453.             //
  3454.             Begin Text Compare : [{NEXTPROFILE}] Equals ''
  3455.                 Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3456.                     Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3457.                         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3458.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3459.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-112- || INFO:  -(switching to 'next_avcs_profile')---(N...
  3460.                        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3461.                            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3462.                        End Condition
  3463.                    End Condition
  3464.                End Condition
  3465.                //
  3466.                Switch to profile, '{TXT:~next_avcs_profile}' (by name)
  3467.                //
  3468.            End Condition
  3469.        End Condition
  3470.    Else
  3471.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3472.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3473.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3474.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3475.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-113- || INFO:  -(heading to options following non-core ...
  3476.                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3477.                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3478.                 End Condition
  3479.             End Condition
  3480.         End Condition
  3481.         Begin Boolean Compare : [AVCS_LOAD_OPTIONS] Equals True
  3482.             Jump to Marker: AVCS_LOAD_OPTIONS
  3483.         Else If Boolean Compare : [AVCS_ADVANCED_OPTIONS] Equals True
  3484.             Jump to Marker: AVCS_ADVANCED_OPTIONS
  3485.         End Condition
  3486.     End Condition
  3487.     //
  3488. End Condition
  3489. //
  3490. //
  3491. //
  3492. //  ===================================================================================================
  3493. //  ====================================CORE PROFILE SFS LOAD SECTION================================================
  3494. //  ===================================================================================================
  3495. //
  3496. //  ==================IF AVCS_CORE IS ACTIVE PROFILE===========================================================
  3497. Set integer [AVCS_FIRST_RUN] to [AVCS_FIRST_RUN] plus 1
  3498. Marker: INIT_CORE_COMPLETE
  3499. Set text [AVCS_ACTIVE_PROFILE] to 'CORE'
  3500. Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to '{TXTNUM:"{PROFILE_AT3}"}'
  3501. Set Boolean [AVCS_RELOAD_CORE] to True
  3502. //
  3503. //  --  Variables to Load from File (or create file on first run) After CORE has finished intializing profile --
  3504. Begin Text Compare : [{STATE_FILEEXISTS:AVCS_SFS_SaveFilePath}] Equals '1'
  3505.     Set text [~saved_data] to [{TXT:AVCS_SFS_SaveFilePath}]
  3506.     Begin Text Compare : [~saved_data] Does Not Equal ''
  3507.         //    ====================            SUB            ====================
  3508.         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3509.             Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3510.             Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3511.             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3512.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  3513.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-114- || INFO:  Executing Sub-Command (F_SFS_LOAD_ALL) w...
  3514.        End Condition
  3515.        //
  3516.        Set integer [AVCS_FIRST_RUN] value to [Not Set]
  3517.        Execute command, 'F_SFS_LOAD_ALL' (by name) (and wait until it completes)
  3518.        //
  3519.        Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3520.            //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  3521.            Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  3522.            Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3523.            Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  3524.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3525.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-115- || ERROR:  Executed Sub-Command (F_SFS_LOAD_ALL) i...
  3526.                 // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  3527.                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3528.                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3529.                 End Condition
  3530.             Else
  3531.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3532.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-115b- || INFO:  Sub-Command (F_SFS_LOAD_ALL) COMPLETE -...
  3533.            End Condition
  3534.        End Condition
  3535.        //            ====================    END    ====================        
  3536.        Begin Condition : [AVCS_FIRST_RUN] Equals 0 OR [~saved_data] Does Not Contain 'AVCS_FIRST_RUN'
  3537.            Set integer [AVCS_FIRST_RUN] value to 1
  3538.        Else
  3539.            Set integer [AVCS_FIRST_RUN] to [AVCS_FIRST_RUN] plus 1
  3540.        End Condition
  3541.    End Condition
  3542.    Set text [~data_loaded] to [Not Set]
  3543. Else
  3544.    // Ensure CORE Save File Paths are current active set
  3545.    Set Boolean [AVCS_SFS_INIT] to False
  3546.    //    ====================            SUB            ====================
  3547.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3548.        Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3549.        Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3550.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3551.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  3552.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-116- || INFO:  Executing Sub-Command (F_CORE_SFS) with ...
  3553.     End Condition
  3554.     //
  3555.     Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
  3556.     //
  3557.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3558.         //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  3559.         Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  3560.         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3561.         Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  3562.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3563.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-117- || ERROR:  Executed Sub-Command (F_CORE_SFS) inval...
  3564.            // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  3565.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3566.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3567.            End Condition
  3568.        Else
  3569.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3570.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-117b- || INFO:  Sub-Command (F_CORE_SFS) COMPLETE -- Re...
  3571.         End Condition
  3572.     End Condition
  3573.     //            ====================    END    ====================        
  3574.     Append, 'AVCS_SFS_CurrentBackupIndex=0{NEWLINE}AVCS_SFS_SaveFileBackupCount=0{NEWLINE}AVCS_FIRST_RUN={INT:AVCS_FIRST_RUN:1}' to file '{TXT:AVCS_SFS_SaveFilePath}'
  3575.     //
  3576. End Condition
  3577. //  =============================================================================
  3578. //
  3579. Set text [~avcs_updated_profiles_list_path] to '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
  3580. Begin Condition : ([{STATE_FILEEXISTS:~avcs_updated_profiles_list_path}] Equals '1' AND [AVCS_UPDATED] Equals True)
  3581.     Set text [~avcs_updated_profiles_list] to [{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt]
  3582.     Begin Text Compare : [~avcs_updated_profiles_list] Does Not Equal ''
  3583.         Inline VB Function: AVCS_GetUpdatedProfileName, wait until execution finishes
  3584.         Set text [~avcs_updated_profile_shortname] to '{TXTSUBSTR:~avcs_updated_profile_name:0:10}'
  3585.         Begin Condition : ([~avcs_updated_profile_name] Does Not Equal '' AND [~avcs_updated_profile_shortname] Does Not Equal '' AND [AVCS_PREFERRED_PROFILE] Contains [~avcs_updated_profile_shortname])
  3586.             Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
  3587.             Write (overwrite), '' to file '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
  3588.             // Switch Save File Location to Core Save File, set temp holding var
  3589.             Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
  3590.                 Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
  3591.                 Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  3592.             End Condition
  3593.             //
  3594.             Set integer [AVCS_SFS_SAVED_requests] value to 1
  3595.             Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_PREFERRED_PROFILE'
  3596.             //    ====================            SUB            ====================
  3597.             Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3598.                 Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3599.                 Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3600.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3601.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  3602.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-a18- || INFO:  Executing Sub-Command (F_SFS_DELETE) wit...
  3603.            End Condition
  3604.            //
  3605.            Set Boolean [AVCS_SFS_SORT_bypass] to True
  3606.            Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  3607.            Execute command, 'F_SFS_DELETE' (by name) (and wait until it completes)
  3608.            //
  3609.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3610.                //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  3611.                Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  3612.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3613.                Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  3614.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3615.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-b18- || ERROR:  Executed Sub-Command (F_SFS_DELETE) inv...
  3616.                     // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  3617.                     Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3618.                         Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3619.                     End Condition
  3620.                 Else
  3621.                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3622.                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-c18b- || INFO:  Sub-Command (F_SFS_DELETE) COMPLETE -- ...
  3623.                End Condition
  3624.            End Condition
  3625.            //            ====================    END    ====================        
  3626.            Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
  3627.                Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
  3628.                Set text [~avcs_current_SaveFilePath] to [Not Set]
  3629.            End Condition
  3630.        End Condition
  3631.    End Condition
  3632. End Condition
  3633. //
  3634. //
  3635. //
  3636. //  ===================================================================================================
  3637. //  ====================================FIRST PROFILE USE SECTION================================================
  3638. //  ===================================================================================================
  3639. //
  3640. // Save FIRSTRUN Information to file (bypassing this choice in future initializations)
  3641. Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  3642. Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_FIRST_RUN'
  3643. Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{INT:AVCS_FIRST_RUN}'
  3644. //
  3645. Begin Condition : ([AVCS_FIRST_RUN] Equals 1 AND [{PROFILE}] Contains 'AVCS CORE')
  3646.    //  Get List of Installed AVCS4 Profiles from list
  3647.    Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
  3648.    Set text [~avcs_core_profile_name] to '{TXT:~avcs_profiles_path}\avcs_core_profile.txt'
  3649.    Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
  3650.        Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
  3651.    End Condition
  3652.    Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
  3653.    // If the only profile listed is NOT this profile (AVCS CORE) then provide Get Choice Box
  3654.    Begin Condition : [~avcs_profiles_list] Does Not Equal '{TXT:~avcs_core_profile};' OR ([~avcs_profiles_list] Equals '{TXT:~avcs_core_profile};' AND [{PREVIOUSPROFILE}] Does Not Equal '')
  3655.        Set text [~avcs_profiles_default] to '{TXT:~avcs_core_profile} (none - cancel)'
  3656.        Set text [~avcs_installed_profiles] to [~avcs_profiles_list] (Replace '{TXT:~avcs_core_profile}' with '{TXT:~avcs_profiles_default}')
  3657.        Begin Text Compare : [~avcs_user_profiles_list] Does Not Equal ''
  3658.            Set text [~avcs_installed_profiles] to '{TXT:~avcs_installed_profiles}{TXT:~avcs_user_profiles_list:}'
  3659.        End Condition
  3660.        // If preferred already set, add flag to it's name in the Get Choice box
  3661.         Begin Text Compare : [AVCS_PREFERRED_PROFILE] Does Not Equal ''
  3662.             Begin Text Compare : [~avcs_installed_profiles] Contains [AVCS_PREFERRED_PROFILE]
  3663.                 Set text [~avcs_preferred_current] to '{TXT:AVCS_PREFERRED_PROFILE} (preferred)'
  3664.                 Set text [~avcs_installed_profiles] to [~avcs_installed_profiles] (Replace '{TXT:AVCS_PREFERRED_PROFILE}' with '{TXT:~avcs_preferred_current}')
  3665.             End Condition
  3666.         End Condition
  3667.         Set text [~previous_preferred_profile] to '{TXT:AVCS_PREFERRED_PROFILE:}'
  3668.         Get Choice Input [AVCS_PREFERRED_PROFILE]
  3669.         Begin Condition : [AVCS_PREFERRED_PROFILE] Equals '' OR [AVCS_PREFERRED_PROFILE] Has Not Been Set OR [AVCS_PREFERRED_PROFILE] Equals [~avcs_profiles_default]
  3670.             // If they chose nothing, restore previous preferred profile setting
  3671.             Begin Condition : ([~previous_preferred_profile] Does Not Equal '' AND [~previous_preferred_profile] Does Not Equal 'Not set')
  3672.                 Set text [AVCS_PREFERRED_PROFILE] to [~previous_preferred_profile]
  3673.                 Write [Yellow] 'Preferred Profile not changed from current: {TXT:AVCS_PREFERRED_PROFILE}' to log
  3674.                 Write [Gray] 'Say 'Open Core Options' anytime to change or set a new profile' to log
  3675.             Else
  3676.                 // If they chose nothing, and it wasn't previously set, clear the variable
  3677.                 Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
  3678.                 Write [Yellow] 'Preferred Profile not set.... Automatic Profile Switching disabled.' to log
  3679.                 Write [Gray] 'Say 'Open Core Options' anytime to change or set a new profile' to log
  3680.             End Condition
  3681.             //
  3682.             //
  3683.         Else
  3684.             // If they chose a profile:
  3685.             // Continue Initialization with FIRSTRUN Set To 2 or greater (bypassing this choice at end)
  3686.             Begin Integer Compare : [AVCS_FIRST_RUN] Is Less Than 2
  3687.                 Begin Integer Compare : [AVCS_FIRST_RUN] Equals 0
  3688.                     Set integer [AVCS_FIRST_RUN] value to 2
  3689.                 Else
  3690.                     Set integer [AVCS_FIRST_RUN] to [AVCS_FIRST_RUN] plus 1
  3691.                 End Condition
  3692.                 Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests:1}] to 'AVCS_FIRST_RUN'
  3693.                 Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests:1}] to '{INT:AVCS_FIRST_RUN}'
  3694.             End Condition
  3695.             //
  3696.             // Save new Auto-Switch Profile to CORE Save File
  3697.             Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
  3698.             Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_PREFERRED_PROFILE'
  3699.             Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to [AVCS_PREFERRED_PROFILE]
  3700.             //
  3701.             //    ====================            SUB            ====================
  3702.             Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3703.                 Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3704.                 Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3705.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3706.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-118- || INFO:  Executing Sub-Command (F_SFS_TO_FILE) wi...
  3707.            End Condition
  3708.            //
  3709.            //
  3710.            // Switch Save File Location to Core Save File, set temp holding var
  3711.            Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
  3712.                Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
  3713.                Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
  3714.            End Condition
  3715.            //
  3716.            Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  3717.            Set Boolean [AVCS_SFS_SORT_bypass] to True
  3718.            Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  3719.            //
  3720.            Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
  3721.                Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
  3722.                Set text [~avcs_current_SaveFilePath] to [Not Set]
  3723.            End Condition
  3724.            //
  3725.            //
  3726.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3727.                //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  3728.                Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  3729.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3730.                Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  3731.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3732.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-119- || ERROR:  Executed Sub-Command (F_SFS_TO_FILE) in...
  3733.                     // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  3734.                     Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3735.                         Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3736.                     End Condition
  3737.                 Else
  3738.                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3739.                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-119b- || INFO:  Sub-Command (F_SFS_TO_FILE) COMPLETE --...
  3740.                End Condition
  3741.            End Condition
  3742.            //            ====================    END    ====================        
  3743.            //
  3744.            Write [Yellow] 'Preferred Profile Saved as: {TXT:AVCS_PREFERRED_PROFILE}' to log
  3745.            Write [Green] 'AVCS CORE will always load itself, then load and switch to your preferred profile.' to log
  3746.            Write [Gray] 'Say 'Open Core Options' anytime to change or set a new profile' to log
  3747.            //
  3748.        End Condition
  3749.        // Proper initialization clears event log - provide short time for reading important new profile message
  3750.        Write [Yellow] 'Continuing Initialization....' to log
  3751.        Pause 1 second
  3752.    Else
  3753.        // Cannot provide list of AVCS Profile for auto-switch because no profiles listed other than CORE
  3754.    End Condition
  3755. End Condition
  3756. //
  3757. Begin Text Compare : [{STATE_FILEEXISTS:AVCS_SFS_SaveFilePath}] Equals '1'
  3758.    Set text [~avcs_save_file_index_check] to [{TXT:AVCS_SFS_SaveFilePath}]
  3759.    Begin Text Compare : [~avcs_save_file_index_check] Does Not Contain 'AVCS_SFS_CurrentBackupIndex'
  3760.        Append, '{NEWLINE}AVCS_SFS_CurrentBackupIndex=0' to file '{TXT:AVCS_SFS_SaveFilePath}'
  3761.    End Condition
  3762.    Begin Text Compare : [~avcs_save_file_index_check] Does Not Contain 'AVCS_SFS_SaveFileBackupCount'
  3763.        Append, '{NEWLINE}AVCS_SFS_SaveFileBackupCount=0' to file '{TXT:AVCS_SFS_SaveFilePath}'
  3764.    End Condition
  3765.    Begin Text Compare : [~avcs_save_file_index_check] Does Not Contain 'AVCS_FIRST_RUN'
  3766.        Append, '{NEWLINE}AVCS_FIRST_RUN={INT:AVCS_FIRST_RUN:3}' to file '{TXT:AVCS_SFS_SaveFilePath}'
  3767.    End Condition
  3768.    Set text [~avcs_save_file_index_check] to [{TXT:AVCS_SFS_SaveFilePath}]
  3769.    Begin Text Compare : [~avcs_save_file_index_check] Contains '{NEWLINE}{NEWLINE}'
  3770.        Set text [~avcs_save_file_index_check] to [~avcs_save_file_index_check] (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
  3771.        Write (overwrite), '{TXT:~avcs_save_file_index_check}' to file '{TXT:AVCS_SFS_SaveFilePath}'
  3772.    End Condition
  3773. Else
  3774.    Write (overwrite), 'AVCS_SFS_CurrentBackupIndex=0{NEWLINE}AVCS_SFS_SaveFileBackupCount=0{NEWLINE}AVCS_FIRST_RUN={INT:AVCS_FIRST_RUN:3}' to file '{TXT:AVCS_SFS_SaveFilePath}'
  3775. End Condition
  3776. //
  3777. Begin Integer Compare : [AVCS_SFS_SAVED_requests] Is Greater Than 0
  3778.    //    ====================            SUB            ====================
  3779.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3780.        Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3781.        Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3782.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3783.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  3784.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-120- || INFO:  Executing Sub-Command (F_SFS_TO_FILE) wi...
  3785.     End Condition
  3786.     //
  3787.     Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_FULLYLOADED] Equals False AND [AVCS_PROFILE_SWITCH_SET] Equals False)
  3788.         Set Boolean [AVCS_SFS_BACKUP_bypass] to False
  3789.     Else
  3790.         Set Boolean [AVCS_SFS_BACKUP_bypass] to True
  3791.     End Condition
  3792.     Set Boolean [AVCS_SFS_SORT_bypass] to True
  3793.     Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
  3794.     //
  3795.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3796.         //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  3797.         Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  3798.         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3799.         Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  3800.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3801.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-121- || ERROR:  Executed Sub-Command (F_SFS_TO_FILE) in...
  3802.            // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  3803.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3804.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3805.            End Condition
  3806.        Else
  3807.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3808.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-121b- || INFO:  Sub-Command (F_SFS_TO_FILE) COMPLETE --...
  3809.         End Condition
  3810.     End Condition
  3811.     //            ====================    END    ====================        
  3812. End Condition
  3813. //
  3814. //
  3815. //
  3816. //  ===================================================================================================
  3817. //  ====================================CORE PROFILE RESET SECTION================================================
  3818. //  ===================================================================================================
  3819. //
  3820. Begin Boolean Compare : [AVCS_CORE_FULLYLOADED] Equals False
  3821.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3822.         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3823.             Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3824.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3825.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-122- || INFO:  --BOOL NOW TRUE--------RESERVED FOR CORE...
  3826.            Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3827.                Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3828.            End Condition
  3829.        End Condition
  3830.    End Condition
  3831.    Set Boolean [AVCS_CORE_FULLYLOADED] to True
  3832.    Begin Condition : ([AVCS_UPDATED] Equals True AND [~avcs_updated_profile_name] Contains 'AVCS' AND [{PROFILE}] Does Not Equal [~avcs_updated_profile_name])
  3833.        Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
  3834.        Switch to profile, '{TXT:~avcs_updated_profile_name}' (by name)
  3835.    End Condition
  3836.    Reset the active profile
  3837.    Jump to Marker: AVCS_CORE_END
  3838. End Condition
  3839. //
  3840. //
  3841. //
  3842. //  ===================================================================================================
  3843. //  ====================================CORE TITLE FINALIZATION SECTION================================================
  3844. //  ===================================================================================================
  3845. //
  3846. Marker: DISPLAY_CORE_TITLE
  3847. Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
  3848. //
  3849. Set text [~profile_ver] to '{INT:AVCS_{TXT:AVCS_ACTIVE_PROFILE}_VER_CORE}.{INT:AVCS_{TXT:AVCS_ACTIVE_PROFILE}_VER_MAJOR}.{INT:AVCS_{TXT:AVCS_ACTIVE_PROFILE}_VER_MINOR}'
  3850. Set text [AVCS_ACTIVE_PROFILE_VERSION] to [~profile_ver]
  3851. //
  3852. Set text [~profile_date] to '{TXT:AVCS_{TXT:AVCS_ACTIVE_PROFILE}_VER_DATE}'
  3853. Set text [~avcs_profile_title] to '{TXT:AVCS_{TXT:AVCS_ACTIVE_PROFILE}_VER_TITLE}' (Replace '(((ProfVer)))' with '{TXT:~profile_ver}')
  3854. Set text [~avcs_profile_title] to [~avcs_profile_title] (Replace '(((VerDate)))' with '{TXT:~profile_date}')
  3855. Set text [AVCS_AFM_SoundFilePath] to [AVCS_AFM_SoundFilePath] (Replace '(((VA_SOUNDS)))' with '{VA_SOUNDS}')
  3856. Set text [AVCS_AFM_SoundFile] to [AVCS_AFM_SoundFilePath] (Replace '(((Channel)))' with '{TXT:AVCS_AFM_Audio_Channel:LEFT}')
  3857. //
  3858. Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_FULLYLOADED] Equals True AND [AVCS_PROFILE_SWITCH_SET] Equals False)
  3859.    Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
  3860.        Inline C# Function: VA.ClearLog
  3861.    End Condition
  3862.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3863.        Write [Blank] 'ID:{INT:~cmd_instance_id} - {TXT:~avcs_profile_title}' to log
  3864.    Else
  3865.        Write [Blank] '{TXT:~avcs_profile_title}' to log
  3866.    End Condition
  3867.    //
  3868.    // Profile Command Miscellaneous Operating System - Pre-Conclusion Command Fire (var fixes, etc.)
  3869.    Set integer [~avcs_pcmos_pre] value to the converted value of {INT:AVCS_{TXT:AVCS_ACTIVE_PROFILE:CORE}_PCMOS_PRE:0}
  3870.    Begin Integer Compare : [~avcs_pcmos_pre] Is Greater Than 0
  3871.        Set text [~~AVCS_QCC_COMMAND] to '{TXT:AVCS_{TXT:AVCS_ACTIVE_PROFILE:CORE}_DATA_MISC_{INT:~avcs_pcmos_pre}}'
  3872.        Execute command, 'F_QCC_RUN' (by name) (and wait until it completes)
  3873.    End Condition
  3874.    //
  3875. End Condition
  3876. //  =============================================================================
  3877. //
  3878. //
  3879. //
  3880. // Handle International Decimal Separators
  3881. Inline VB Function: AVCS_RecastWithCulturalDecimalSeparator, wait until execution finishes
  3882. // Initialize PTT Key Down Monitor (if PTT on)
  3883. Begin Boolean Compare : [AVCS_CORE_RadioButtons_ON] Equals True
  3884.    Set integer [AVCS_PTT_MODE] value to [Not Set]
  3885.    Execute command, 'F_QCC_PTTMON' (by name)
  3886.    Begin Integer Compare : [AVCS_CORE_PTT_MODE] Equals 1
  3887.        Set integer [AVCS_PTT_MODE] value to 1
  3888.        Stop VoiceAttack listening
  3889.    End Condition
  3890. Else
  3891.    Set Boolean [AVCS_RadioButtons_ON] to False
  3892. End Condition
  3893. //
  3894. //  ===================================================================================================
  3895. //  ====================================FINAL PROFILE SWITCH CHECKS================================================
  3896. //  ===================================================================================================
  3897. //
  3898. //  Skip Final profile switch checks if containing old version
  3899. Begin Boolean Compare : [AVCS_UPDATED] Equals True
  3900.    Begin Condition : [{PREVIOUSPROFILE}] Equals [AVCS_MAJOR_UPDATE] OR [{NEXTPROFILE}] Equals [AVCS_MAJOR_UPDATE]
  3901.        Jump to Marker: AVCS_CORE_END
  3902.    End Condition
  3903. End Condition
  3904. //
  3905. Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3906.    Begin Integer Compare : [AVCS_Debug_QID] Equals 3
  3907.        Set text [~check_switchfrom_profile] to '{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}' (Trim) (Replace 'AVCS' with '') (Upper Case)
  3908.        Set text [~check_switchfrom_init] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INITIALIZED:false}'
  3909.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3910.        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
  3911.        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-123- || INFO:  {TXT:~check_switchfrom_init} == AVCS_BMS...
  3912.         Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3913.     End Condition
  3914. End Condition
  3915. Set text [~check_switchfrom_profile] to [Not Set]
  3916. Set text [~check_switchfrom_init] to [Not Set]
  3917. //
  3918. //
  3919. Set text [~check_switchfrom_profile] to '{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}' (Upper Case)
  3920. Begin Condition : ([~check_switchfrom_profile] Contains 'AVCS' AND [~check_switchfrom_profile] Does Not Contain 'CORE' AND [AVCS_PROFILE_SWITCH_SET] Does Not Equal True)
  3921.     Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
  3922.         //  --COMING FROM AVCS PROFILE THAT MAY NOT BE FULLY INITIALIZED ---
  3923.         Set text [~check_switchfrom_profile] to '{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}' (Trim) (Replace 'AVCS' with '') (Upper Case)
  3924.         Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3925.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3926.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3927.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3928.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-124- || INFO:  ----------CORE LOADED AND PROFILE COMMAN...
  3929.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3930.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-124b- || INFO:  ----->  ~check_switchfrom_profile = {TX...
  3931.                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3932.                     Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3933.                 End Condition
  3934.             End Condition
  3935.         End Condition
  3936.         //
  3937.         Set text [~check_switchfrom_init] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INIT:false}' (Lower Case)
  3938.         Set text [~primary_module_fully_initialized] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INITIALIZED:false}' (Lower Case)
  3939.         //
  3940.         Begin Condition : ([~check_switchfrom_init] Contains 'true' AND [~primary_module_fully_initialized] Does Not Contain 'true')
  3941.             //  --COMING FROM AVCS PROFILE THAT HAS BEEN LOADED BUT IS NOT FULLY INITIALIZED ---
  3942.             Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3943.                 Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  3944.                     Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3945.                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
  3946.                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-125- || INFO:  ------>  SWITCH FROM AVCS PROFILE THAT I...
  3947.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3948.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3949.                    End Condition
  3950.                End Condition
  3951.            End Condition
  3952.            //
  3953.            Set text [AVCS_ACTIVE_PROFILE] to [~check_switchfrom_profile]
  3954.            Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to '{TXTNUM:"{PREVIOUSPROFILE_AT3}"}'
  3955.            //    ====================            SUB            ====================
  3956.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3957.                Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3958.                Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3959.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3960.                Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  3961.                Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-126- || INFO:  Executing Sub-Command (F_CORE_SFS) with ...
  3962.             End Condition
  3963.             //
  3964.             Set Boolean [AVCS_SFS_INIT] to [Not Set]
  3965.             Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
  3966.             //
  3967.             Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3968.                 //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  3969.                 Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  3970.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3971.                 Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  3972.                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  3973.                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-127- || ERROR:  Executed Sub-Command (F_CORE_SFS) inval...
  3974.                    // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  3975.                    Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  3976.                        Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  3977.                    End Condition
  3978.                Else
  3979.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  3980.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-127b- || INFO:  Sub-Command (F_CORE_SFS) COMPLETE -- Re...
  3981.                 End Condition
  3982.             End Condition
  3983.             //            ====================    END    ====================        
  3984.             //
  3985.             //
  3986.             Set text [~data_loaded] to [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}_LOADED]
  3987.             Set text [~saved_data] to [{TXT:AVCS_SFS_SaveFilePath}]
  3988.             Begin Condition : ([~saved_data] Does Not Equal '' AND [~data_loaded] Does Not Equal 'complete')
  3989.                 //    ====================            SUB            ====================
  3990.                 Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  3991.                     Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  3992.                     Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  3993.                     Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  3994.                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  3995.                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-128- || INFO:  Executing Sub-Command (F_SFS_LOAD_ALL) w...
  3996.                End Condition
  3997.                //
  3998.                Execute command, 'F_SFS_LOAD_ALL' (by name) (and wait until it completes)
  3999.                //
  4000.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4001.                    //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  4002.                    Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  4003.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4004.                    Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  4005.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  4006.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-129- || ERROR:  Executed Sub-Command (F_SFS_LOAD_ALL) i...
  4007.                         // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  4008.                         Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  4009.                             Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  4010.                         End Condition
  4011.                     Else
  4012.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  4013.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-129b- || INFO:  Sub-Command (F_SFS_LOAD_ALL) COMPLETE -...
  4014.                    End Condition
  4015.                End Condition
  4016.                //            ====================    END    ====================        
  4017.                //
  4018.            End Condition
  4019.            Set text [~data_loaded] to [Not Set]
  4020.            Set text [~saved_data] to [Not Set]
  4021.            //
  4022.            Set text [~check_switchfrom_profile] to [Not Set]
  4023.            Set text [~check_switchfrom_init] to [Not Set]
  4024.            Set text [~primary_module_fully_initialized] to [Not Set]
  4025.            //
  4026.            Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
  4027.            Begin Text Compare : [{NEXTPROFILE}] Equals ''
  4028.                Switch to profile, '{PREVIOUSPROFILE}' (by name)
  4029.            End Condition
  4030.            //
  4031.        End Condition
  4032.    End Condition
  4033.    //
  4034. Else
  4035.    Begin Text Compare : [~check_switchfrom_profile] Does Not Contain 'AVCS'
  4036.        // else coming from non-AVCS profile - check for PREFERRED PROFILE and switch to if set
  4037.        Begin Condition : ([AVCS_PREFERRED_PROFILE] Does Not Equal '' AND [AVCS_PREFERRED_PROFILE] Does Not Contain 'Not set' AND [AVCS_PREFERRED_PROFILE] Does Not Contain '{PROFILE}' AND [AVCS_PROFILE_SWITCH_SET] Does Not Equal True)
  4038.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4039.                Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
  4040.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4041.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  4042.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-130- || INFO:  Coming from Non-AVCS Profile and Switchi...
  4043.                     Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  4044.                         Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  4045.                     End Condition
  4046.                 End Condition
  4047.             End Condition
  4048.             Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
  4049.             Begin Text Compare : [{NEXTPROFILE}] Equals ''
  4050.                 Switch to profile, '{TXT:AVCS_PREFERRED_PROFILE}' (by name)
  4051.             End Condition
  4052.             //
  4053.         End Condition
  4054.     End Condition
  4055. End Condition
  4056. //
  4057. //
  4058. //    ----     ----     ----     EXIT    ----    ----    ----
  4059. Marker: AVCS_CORE_END
  4060. //
  4061. //  --Checking for Switch-Back to Fully Initialized AVCS4 Profile to Reload Save File if needed ---
  4062. Set text [~check_switchto_profile] to '{TXTALPHA:"{NEXTPROFILE_AT3}"}' (Upper Case)
  4063. Begin Condition : ([~check_switchto_profile] Contains 'AVCS' AND [~check_switchto_profile] Does Not Contain 'AVCSCORE')
  4064.     Begin Condition : ([{CMDACTION}] Equals 'ProfileUnloadChange' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
  4065.         Set text [~check_switchto_profile] to '{TXTALPHA:"{NEXTPROFILE_AT3}"}' (Replace 'AVCS' with '') (Upper Case)
  4066.         Set text [~check_switchto_init] to '{BOOL:AVCS_{TXT:~check_switchto_profile}_INIT:false}' (Lower Case)
  4067.         Set text [~switchto_module_fully_initialized] to '{BOOL:AVCS_{TXT:~check_switchto_profile}_INITIALIZED:false}' (Lower Case)
  4068.         Begin Condition : ([~check_switchto_init] Contains 'true' AND [~switchto_module_fully_initialized] Contains 'true')
  4069.             //  --SWITCHING BACK TO AVCS4 PROFILE THAT HAS BEEN LOADED AND IS FULLY INITIALIZED -- RELOAD SAVE FILE BEFORE SWITCHING ---
  4070.             //
  4071.             Set text [AVCS_ACTIVE_PROFILE] to [~check_switchto_profile]
  4072.             Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to '{TXTNUM:"{NEXTPROFILE_AT3}"}'
  4073.             Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}_LOADED] to [Not Set]
  4074.             //    ====================            SUB            ====================
  4075.             Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4076.                 Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  4077.                 Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  4078.                 Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4079.                 Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  4080.                 Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-131- || INFO:  Executing Sub-Command (F_CORE_SFS) with ...
  4081.            End Condition
  4082.            //
  4083.            Set Boolean [AVCS_SFS_INIT] to [Not Set]
  4084.            Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
  4085.            //
  4086.            Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4087.                //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  4088.                Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  4089.                Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4090.                Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  4091.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  4092.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-132- || ERROR:  Executed Sub-Command (F_CORE_SFS) inval...
  4093.                     // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  4094.                     Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  4095.                         Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  4096.                     End Condition
  4097.                 Else
  4098.                     Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  4099.                     Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-132b- || INFO:  Sub-Command (F_CORE_SFS) COMPLETE -- Re...
  4100.                End Condition
  4101.            End Condition
  4102.            //            ====================    END    ====================        
  4103.            //
  4104.            Set text [~saved_data] to [{TXT:AVCS_SFS_SaveFilePath}]
  4105.            Begin Text Compare : [~saved_data] Does Not Equal ''
  4106.                //    ====================            SUB            ====================
  4107.                Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4108.                    Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  4109.                    Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  4110.                    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4111.                    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  4112.                    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-133- || INFO:  Executing Sub-Command (F_SFS_LOAD_ALL) w...
  4113.                 End Condition
  4114.                 //
  4115.                 Execute command, 'F_SFS_LOAD_ALL' (by name) (and wait until it completes)
  4116.                 //
  4117.                 Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4118.                     //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  4119.                     Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  4120.                     Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4121.                     Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  4122.                         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  4123.                         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-134- || ERROR:  Executed Sub-Command (F_SFS_LOAD_ALL) i...
  4124.                        // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  4125.                        Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  4126.                            Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  4127.                        End Condition
  4128.                    Else
  4129.                        Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  4130.                        Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-134b- || INFO:  Sub-Command (F_SFS_LOAD_ALL) COMPLETE -...
  4131.                     End Condition
  4132.                 End Condition
  4133.                 //            ====================    END    ====================        
  4134.                 //
  4135.             End Condition
  4136.             //
  4137.             Set text [~saved_data] to [Not Set]
  4138.             Set text [~check_switchto_profile] to [Not Set]
  4139.             Set text [~check_switchto_init] to [Not Set]
  4140.             Set text [~switchto_module_fully_initialized] to [Not Set]
  4141.             //
  4142.         End Condition
  4143.     End Condition
  4144. End Condition
  4145. //
  4146. //
  4147. Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_FULLYLOADED] Equals True AND [AVCS_RELOAD_CORE] Does Not Equal True AND [AVCS_PROFILE_SWITCH_SET] Does Not Equal True)
  4148.     Begin Text Compare : [AVCS_ACTIVE_PROFILE] Does Not Equal 'CORE'
  4149.         Set text [AVCS_ACTIVE_PROFILE] to 'CORE'
  4150.     End Condition
  4151.     //    ====================            SUB            ====================
  4152.     Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4153.         Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
  4154.         Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
  4155.         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4156.         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
  4157.         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-135- || INFO:  Executing Sub-Command (F_SFS_LOAD_ALL) w...
  4158.    End Condition
  4159.    //
  4160.    // Ensure CORE SFS Path Variables are set following switch back from AVCS4 Profile(s)
  4161.    Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
  4162.    //
  4163.    Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4164.        //  Evaluate Return ID against Valid Increment Send Error to Log if not equal
  4165.        Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
  4166.        Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4167.        Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
  4168.            Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
  4169.            Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-136- || ERROR:  Executed Sub-Command (F_SFS_LOAD_ALL) i...
  4170.             // Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
  4171.             Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
  4172.                 Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  4173.             End Condition
  4174.         Else
  4175.             Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  4176.             Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-136b- || INFO:  Sub-Command (F_SFS_LOAD_ALL) COMPLETE -...
  4177.        End Condition
  4178.    End Condition
  4179.    //            ====================    END    ====================        
  4180.    Say, '{TXT:AVCS_TTS_COMMON_InitializationComplete:Core initialization error detected}'
  4181.    //
  4182.    Begin Boolean Compare : [AVCS_UPDATED] Equals True
  4183.        Execute command, 'F_CORE_UPDATE' (by name)
  4184.    End Condition
  4185.    //
  4186. End Condition
  4187. //
  4188. Marker: AVCS_CMD_EXIT
  4189. Begin Boolean Compare : [AVCS_Debug_ON] Equals True
  4190.    Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4191.    Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
  4192.    Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-137x- || INFO:  Marker AVCS_CORE_END -- (exiting core c...
  4193.     Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_FULLYLOADED] Equals True AND [AVCS_RELOAD_CORE] Does Not Equal True)
  4194.         Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
  4195.         Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
  4196.         Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-138x- || INFO:  =======================AVCS CORE INITIA...
  4197.    End Condition
  4198.    Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
  4199. End Condition
  4200. //
  4201. Begin Boolean Compare : [AVCS_REINIT] Equals True
  4202.    Pause 2 seconds
  4203.    Set Boolean [AVCS_REINIT] to [Not Set]
  4204. End Condition
  4205. //     ----    ----    ----     END    ----     ----     ----
  4206.  
RAW Paste Data