//MAIN AVCS Profiles Initialization & Configuration Script
// by SemlerPDX Jan2020/May2021
// VETERANS-GAMING.COM
//
//
//
DISABLED - // Re-Init Inline --- After using this, can just Reset Active Profile (if it's an AVCS Profile) and all Init's will run
DISABLED - Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization
//
//Required Environmental States Check
Set text [~req_v] to '1.8.7'
Begin Text Compare : [{STATE_VA_VERSION_COMPARE:~req_v}] Does Not Contain '1'
Write [Red] 'AVCS ERROR 0a - Please update Voice Attack to version {TXT:~req_v} or higher' to log
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)
Exit Command
End Condition
//
Begin Text Compare : [{STATE_VA_NESTEDTOKENSENABLED}] Does Not Contain '1'
Write [Red] 'AVCS ERROR 0b- Nested Tokens are not enabled. Please open Voice Attack options and enable "Use Nested Tokens"' to log
Say, 'Nested Tokens are required for this profile to function. Please open Voice Attack options and enable Nested Tokens.' (and wait until it completes)
Exit Command
End Condition
//
// Handle duplicated profiles due to import of existing AVCS profile
Inline VB Function: AVCS_CheckForDuplicatedAVCSProfile, wait until execution finishes
Begin Boolean Compare : [~avcs_check_for_duplicates] Equals True
Write [Red] 'AVCS CORE: You must Delete this duplicate AVCS Profile from VoiceAttack!' to log
Write [Red] 'AVCS CORE: VoiceAttack must be restarted once you have deleted this duplicate' to log
Write [Red] 'AVCS CORE: Always switch to AVCS CORE first after importing any AVCS profile' to log
Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
Set Boolean [AVCS_INIT_Debug_TRIGGERED] to [Not Set]
Set Boolean [AVCS_PROFILE_SWITCH_SET] to [Not Set]
Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
Set Boolean [AVCS_Init_Bypass] to [Not Set]
Set Boolean [AVCS_REINIT] to [Not Set]
Set Boolean [AVCS_MUST_RESTART] to True
End Condition - Exit when condition met
//
Begin Boolean Compare : [AVCS_Init_Bypass] Does Not Equal True
Begin Condition : [{PROFILE}] Equals [AVCS_MAJOR_UPDATE] OR [{NEXTPROFILE}] Equals [AVCS_MAJOR_UPDATE]
Begin Text Compare : [{PROFILE}] Equals [AVCS_MAJOR_UPDATE]
Set text [AVCS_MAJOR_UPDATE] to [Not Set]
Set text [AVCS_DATA_UPDATE] to [Not Set]
Set text [AVCS_FORMER_UPDATE] to [Not Set]
Set Boolean [AVCS_UPDATED] to [Not Set]
Set Boolean [AVCS_MUST_RESTART] to True
Write [Gray] '==========UPDATE/INSTALLATION SUCCESSFUL!!! ==============' to log
Write [Green] 'AVCS CORE: You can now Delete this AVCS Profile from VoiceAttack' to log
End Condition - Exit when condition met or not met
End Condition - Exit when condition met
End Condition
//
Begin Boolean Compare : [AVCS_MUST_RESTART] Equals True
Write [Red] 'AVCS UPDATE: VoiceAttack must be restarted to finalize AVCS Profiles Update' to log
//=========================================================
Begin Condition : ([AVCS_UPDATED] Equals True AND [AVCS_MAJOR_UPDATE] Contains 'CORE' AND [{PROFILE}] Contains 'CORE' AND [{PROFILE}] Does Not Equal [AVCS_MAJOR_UPDATE])
Execute command, 'F_CORE_UPDATE' (by name)
End Condition - Exit when condition met
//=========================================================
End Condition - Exit when condition met
//
//
DISABLED - // DEV -- HARDSET DEBUG VARS --
DISABLED - Set Boolean [AVCS_Debug_ON] to True
DISABLED - Set integer [AVCS_Debug_QID] value to 4
//
//
// ===================================================================================================
// ============================INITIALIZATION COMMAND EXIT CHECKS============================================
// ===================================================================================================
//
Begin Text Compare : [{CMDACTION}] Equals 'ProfileUnloadClose'
Write [Gray] 'exiting AVCS4 and closing voiceattack...' to log
End Condition - Exit when condition met
//
// Stagger command execution for Reset Profile action running this command twice
Begin Text Compare : [{CMDACTION}] Equals 'ProfileUnloadChange'
Pause 1 second
Begin Boolean Compare : [AVCS_REINIT] Equals True
Exit Command
End Condition
End Condition
//
//
Begin Condition : ([{CMDACTION}] Equals 'ProfileUnloadChange' AND [AVCS_Init_Cancelled] Equals True)
Exit Command
End Condition
//
Begin Boolean Compare : [AVCS_Init_Cancelled] Equals True
Set Boolean [AVCS_Init_Cancelled] to [Not Set]
Exit Command
End Condition
//
// Check for Switch-To another CORE Profile (of a different version)
Begin Condition : ([{CMDACTION}] Equals 'ProfileUnloadChange' AND [{PROFILE}] Contains 'CORE' AND [{NEXTPROFILE_AT3}] Contains 'CORE' AND [{PROFILE}] Does Not Equal '{NEXTPROFILE}')
Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
Set Boolean [AVCS_INIT_Debug_TRIGGERED] to [Not Set]
Set Boolean [AVCS_PROFILE_SWITCH_SET] to [Not Set]
Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
Set Boolean [AVCS_Init_Bypass] to [Not Set]
Set Boolean [AVCS_REINIT] to [Not Set]
End Condition - Exit when condition met
//
//=========================================================
// DEBUGGING
Begin Boolean Compare : [AVCS_INIT_Debug_TRIGGERED] Equals False
Write [Gray] 'AVCS CORE has launched F_CORE_INITIALIZE... please stand by....' to log
Jump to Marker: AVCS_CORE_DEBUG
End Condition
//=========================================================
//
//
Begin Boolean Compare : [AVCS_Init_Bypass] Does Not Equal True
//
// ===================================================================================================
// ==========================PRE-INITIALIZATION DEBUG INFO===================================================
// ===================================================================================================
//
Set integer [~check_cmd_instance_id] value to the converted value of {INT:~cmd_instance_id:500}
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Condition : [~check_cmd_instance_id] Equals 500 OR [~check_cmd_instance_id] Equals 0
// -set initial vars depending on cmd type: {CMD} {PREFIX} {SUFFIX} {CMD_BEFORE} {CMD_WILDCARDKEY} {CMD_AFTER} || {CATEGORY} {PREFIX_CATEGORY} {SUFFIX_CATEGORY}
// -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
Set text [~avcs_CMD] to '{CMD}'
Set text [~avcs_CAT] to '{CATEGORY}'
Begin Boolean Compare : [AVCS_Debug_QRPT] Equals True
Set integer [AVCS_Debug_QSTP] to [AVCS_Debug_QSTP] plus 1
//
Set text [AVCS_Debug_TSTP_{INT:AVCS_Debug_QSTP}] to '{TXT:~avcs_CMD} || {TXT:~avcs_CAT}'
End Condition
// -generate unique instance ID for each command & bring in sub cmd return ID
Set integer [~cmd_instance_id] value as random from 1111 to 4444
Begin Text Compare : [{CMDISSUBCOMMAND}] Contains '1'
Set integer [~avcs_sub_CMD_RID] value to the converted value of {INT:AVCS_CMD_RID:500}
End Condition
// Prepare and send initial debug messages to the core function via "-log" parameter
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 1
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:...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 1
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
Else If : ([~check_cmd_instance_id] Is Greater Than 1110 AND [~check_cmd_instance_id] Is Less Than 4445)
// Prepare and send initial debug messages for marker jumps to the beginning
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
Else
// Report initial debug message error
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
//
//
//
// ===================================================================================================
// ==========================PRE-INITIALIZATION PROFILE AND ENVIRONMENT CHECKS===================================================
// ===================================================================================================
//
Begin Condition : ([AVCS_RELOAD_CORE] Equals True AND [{CMDACTION}] Equals 'ProfileUnloadChange')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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 ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Jump to Marker: AVCS_CORE_END
End Condition
//
Begin Condition : ([{TXTALPHA:"{NEXTPROFILE_AT3}"}] Does Not Contain 'AVCS' AND [{CMDACTION}] Equals 'ProfileUnloadChange')
Write [Blank] 'exiting AVCS CORE to non-AVCS profile....' to log
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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....'
End Condition
Jump to Marker: AVCS_CORE_END
End Condition
//
// QUICK INIT EXIT
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')
Write [Green] 'Profile Initialization Cancelled' to log
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Exit Command
End Condition
//
// INIT BYPASS
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')
Write [Red] 'Profile Initialization Bypass Enabled -- RCTRL+RSHFT+B Recognized' to log
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Set Boolean [AVCS_Init_Bypass] to True
Exit Command
End Condition
//
// Compatibility Check for JanJan plugin and AVCS4 BMS Radios profile
Begin Condition : ([AVCS_CORE_INIT] Equals True AND [{NEXTPROFILE}] Does Not Equal '')
Begin Text Compare : [{NEXTPROFILE_AT3}] Contains 'BMS'
Set text [~avcs_checkfor_janjanPlugin] to '{TXT:{TXT:AVCS_BMS_JANJAN_COMMAND_NAME}:inactive}'
Begin Text Compare : [~avcs_checkfor_janjanPlugin] Does Not Equal 'inactive'
Set text [{TXT:AVCS_BMS_JANJAN_COMMAND_NAME}] to [Not Set]
End Condition
End Condition
End Condition
//
//
//
// ===================================================================================================
// ==========================AVCS CORE PROFILE LISTINGS CHECKS===================================================
// ===================================================================================================
//
// Create AVCS Profile Listing for AVCS Profile(s)
Set text [~avcs_profiles_path] to '{VA_APPS}\AVCS'
Set text [~avcs_profiles_list_path] to '{TXT:~avcs_profiles_path}\avcs_profiles.txt'
Begin Boolean Compare : [AVCS_MUST_RESTART] Does Not Equal True
Begin Text Compare : [{STATE_DIRECTORYEXISTS:~avcs_profiles_path}] Contains '1'
// Profile Physical Versions will require AVCS CORE Version 0.87.2 or higher on, with core version on file
Set text [~avcs_core_profile_name] to '{TXT:~avcs_profiles_path}\avcs_core_profile.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
Begin Condition : ([~avcs_core_profile] Does Not Contain '{PROFILE}' AND [{PROFILE}] Contains 'AVCS CORE')
Write (overwrite), '{PROFILE}' to file '{TXT:~avcs_core_profile_name}'
// ================= AVCS CORE PROFILE UPDATE DETECTED!! ================
Inline VB Function: AVCS_DeleteCoreApp, wait until execution finishes
Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
//
End Condition
Else
Begin Text Compare : [{PROFILE}] Contains 'AVCS CORE'
Write (overwrite), '{PROFILE}' to file '{TXT:~avcs_core_profile_name}'
// ================= AVCS CORE PROFILE NEW INSTALL DETECTED!! ================
//
End Condition
End Condition
//
// Check for new profile listings and add to AVCS CORE Profiles List, clean up after
Set text [~avcs_profile_listing] to 'AVCS_PROFILE_{PROFILE_AT3}={PROFILE}'
Set text [~avcs_new_core_profile_list_path] to '{TXT:~avcs_profiles_path}\avcs_new_core_profile.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_new_core_profile_list_path}] Contains '1'
Set text [~avcs_new_profiles_list_path] to [~avcs_new_core_profile_list_path]
Else
Set text [~avcs_new_profiles_list_path] to '{TXT:~avcs_profiles_path}\avcs_new_profiles.txt'
End Condition
Begin Condition : ([{STATE_FILEEXISTS:~avcs_new_profiles_list_path}] Contains '1' AND [{STATE_FILEEXISTS:~avcs_profiles_list_path}] Does Not Contain '1')
// -- FOLDER HAS NO PROFILES LIST - COMPLETELY NEW USER OR FULL REINSTALL
Write [Green] 'New AVCS4 Profile(s) Found! Adding Profile to List of Names and cleaning up new profiles file afterwards....' to log
Set text [~avcs_new_profiles_list] to [{TXT:~avcs_new_profiles_list_path}] (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
//
//
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
// 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)
Set text [f_core_function] to 'clean up files'
Set text [f_core_module_GUID] to '{TXT:~avcs_new_profiles_list_path}'
Execute command, 'f_core_main' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
//
//
Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{TXT:~avcs_profiles_list_path}'
// -- Run Inline Function to Create Folder(s) if not already existing --
Set text [AVCS_SFS_UtilFolderPath] to '{VA_APPS}\AVCS\save_files\Util'
Set text [AVCS_SFS_UpdateFolderPath] to '{TXT:AVCS_SFS_UtilFolderPath}\update'
Set text [~avcs_folders] to '{VA_APPS}\AVCS\save_files(/n){TXT:AVCS_SFS_UtilFolderPath}(/n){TXT:AVCS_SFS_UpdateFolderPath}'
Inline VB Function: AVCS_CreateUpdateFolders, wait until execution finishes
Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\dmp.txt'
Write (overwrite), '' to file '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
Pause 2 seconds
//
//
Else If : ([{STATE_FILEEXISTS:~avcs_new_profiles_list_path}] Contains '1' AND [{STATE_FILEEXISTS:~avcs_profiles_list_path}] Contains '1')
//
Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
// -- FOLDER ALREADY HAS A PROFILES LIST - EXISTING USER / POSSIBLE UPDATE OR NEW PROFILE
Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
Inline C# Function: VA.ClearLog
End Condition
Write [Green] 'New AVCS4 Profile(s) Found! Adding Profile to List of Names and cleaning up new profiles file afterwards....' to log
Set text [~avcs_new_profiles_list] to [{TXT:~avcs_new_profiles_list_path}] (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
Set text [~avcs_old_profiles_list] to [{TXT:~avcs_profiles_list_path}] (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
Begin Text Compare : [~avcs_old_profiles_list] Starts With '{NEWLINE}'
Set text [~avcs_old_profiles_list] to '{TXTSUBSTR:~avcs_old_profiles_list:1:}' (Trim)
End Condition
//
Inline VB Function: AVCS_CheckForPreviousVersionProfile, wait until execution finishes
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Begin Integer Compare : [~avcs_imsg_debug_count] Is Greater Than 0
Start Loop : Repeat From 1 to [~avcs_imsg_debug_count]
Set text [~avcs_imsg_debug_text] to '{TXT:~avcs_imsg_debug_{INT:~i}}'
Set integer [~avcs_imsg_debug_wclr] value to the converted value of {INT:~avcs_imsg_debug_wclr_{INT:~i}:3}
Begin Text Compare : [~avcs_imsg_debug_text] Does Not Equal ''
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to the converted value of {INT:~avcs_imsg_debug_wclr:3}
Set text [AVCS_Debug_TMSG_{INT:AVCS_Debug_QMSG}] to '{TXTSUBSTR:"{TIMESTAMP}":8:9} CID:{INT:~cmd_instance_id} -DEBUG-a02c- || INFO: CheckForPreviousVersionProfile - INLINE...
End Condition
Set integer [~avcs_imsg_debug_wclr_{INT:~i}] value to [Not Set]
Set text [~avcs_imsg_debug_{INT:~i}] to [Not Set]
End Loop
Set integer [~avcs_imsg_debug_count] value to [Not Set]
Set integer [~avcs_imsg_debug_wclr] value to [Not Set]
Set text [~avcs_imsg_debug_text] to [Not Set]
End Condition
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// -- Run Inline Function to Create Folder(s) if not already existing --
Set text [AVCS_SFS_UtilFolderPath] to '{VA_APPS}\AVCS\save_files\Util'
Set text [AVCS_SFS_UpdateFolderPath] to '{TXT:AVCS_SFS_UtilFolderPath}\update'
Set text [~avcs_folders] to '{VA_APPS}\AVCS\save_files(/n){TXT:AVCS_SFS_UtilFolderPath}(/n){TXT:AVCS_SFS_UpdateFolderPath}'
Inline VB Function: AVCS_CreateUpdateFolders, wait until execution finishes
Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\dmp.txt'
//
Begin Text Compare : [~avcs_additional_new_profiles] Does Not Equal ''
Set text [~avcs_new_profiles_list] to [~avcs_first_new_profile]
// Replace unused New AVCS Profiles listed to new profiles list file
Write (overwrite), '{TXT:~avcs_additional_new_profiles}' to file '{TXT:~avcs_new_profiles_list_path}'
Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
// Set Must Restart Flag so Files Check will not happen (after the 1st) during any profile switches/restarts this session
Set Boolean [AVCS_MUST_RESTART] to True
Write [Yellow] 'AVCS INFO - Multiple Major Profile Updates detected - after initialization, RESTART VoiceAttack to run the Next Update' to log
Else
//
// 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)
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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 ...
End Condition
//
Set text [f_core_function] to 'clean up files'
Set text [f_core_module_GUID] to '{TXT:~avcs_new_profiles_list_path}'
Execute command, 'f_core_main' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
End Condition
//
//
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])
Begin Text Compare : [~avcs_old_profiles_list] Does Not End With '{NEWLINE}'
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}')
Else
Set text [~avcs_final_profiles_list] to '{TXT:~avcs_old_profiles_list}{TXT:~avcs_new_profiles_list}{NEWLINE}' (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
End Condition
//
// Update Currently Installed Profiles List with this new AVCS profile
Write (overwrite), '{TXT:~avcs_final_profiles_list}' to file '{TXT:~avcs_profiles_list_path}'
// -- Run Inline Function to Create Folder(s) if not already existing --
Set text [AVCS_SFS_UtilFolderPath] to '{VA_APPS}\AVCS\save_files\Util'
Set text [AVCS_SFS_UpdateFolderPath] to '{TXT:AVCS_SFS_UtilFolderPath}\update'
Set text [~avcs_folders] to '{VA_APPS}\AVCS\save_files(/n){TXT:AVCS_SFS_UtilFolderPath}(/n){TXT:AVCS_SFS_UpdateFolderPath}'
Inline VB Function: AVCS_CreateUpdateFolders, wait until execution finishes
Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
Write (overwrite), '{TXT:~avcs_new_profiles_list}' to file '{VA_APPS}\AVCS\save_files\Util\update\dmp.txt'
Pause 2 seconds
End Condition
//
//
End Condition
//
//
// Load Updated Profile Names LIst from Text Variable
Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
Inline VB Function: AVCS_LoadProfilesList, wait until execution finishes
//
//
Else
Write [Red] 'AVCS ERROR 0c- Import AVCS CORE Profile Package! (Allow Overwrite and Delete any Duplicate VoiceAttack AVCS Profiles created)' to log
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
Exit Command
// end of Profiles Listings in AVCS Apps Folder/file check
End Condition
// end of AVCS_MUST_RESTART bool check
End Condition
//
// end of Bypass Init bool check
End Condition
//
//
// ===================================================================================================
// ==========================AVCS CORE LOAD OPTIONS CHECKS===================================================
// ===================================================================================================
//
Begin Condition : [AVCS_LOAD_OPTIONS] Equals True OR [AVCS_ADVANCED_OPTIONS] Equals True
Set text [AVCS_ACTIVE_PROFILE] to 'CORE'
Begin Boolean Compare : [AVCS_LOAD_OPTIONS] Equals True
Jump to Marker: AVCS_LOAD_OPTIONS
Else If Boolean Compare : [AVCS_ADVANCED_OPTIONS] Equals True
Jump to Marker: AVCS_ADVANCED_OPTIONS
End Condition
Else If Boolean Compare : [AVCS_HELP_OPTIONS] Equals True
Jump to Marker: AVCS_ADVANCED_OPTIONS
End Condition
//
Set text [AVCS_ACTIVE_PROFILE] to 'CORE'
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to '{TXTNUM:"{PROFILE_AT3}"}'
// Bypass Profile Initialization by holding down Control + Shift keys after switching to any AVCS profile
Begin Text Compare : [{STATE_ANYKEYDOWN}] Equals '1'
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')
Write [Red] 'Keys Detected - Release Keys now to load profile -- (hold CTRL+SHFT for Load Options)' to log
Pause 1.5 seconds
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')
Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
Inline C# Function: VA.ClearLog
End Condition
Write [Orange] '(keep holding CTRL + SHFT to open options menu)' to log
Pause 2.5 seconds
// USER Load Options
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')
Marker: AVCS_LOAD_OPTIONS
Set Boolean [AVCS_LOAD_OPTIONS] to [Not Set]
Set Boolean [AVCS_ADVANCED_OPTIONS] to [Not Set]
Set Boolean [AVCS_HELP_OPTIONS] to [Not Set]
Set text [~avcs_load_option] to [Not Set]
//
Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
Inline C# Function: VA.ClearLog
End Condition
Write [Yellow] 'Opening load options...' to log
Begin Boolean Compare : [AVCS_LogClearing_ON] Equals True
Set text [~avcs_clear_log] to 'OFF'
Else
Set text [~avcs_clear_log] to 'ON'
End Condition
Pause 0.65 seconds
Get Choice Input [~avcs_load_option]
//
//
Begin Text Compare : [~avcs_load_option] Equals 'INIT: Cancel this AVCS4 profile initialization (just this time)'
Set Boolean [AVCS_Init_Cancelled] to True
Set text [~avcs_load_option] to [Not Set]
Write [Green] 'Profile Initialization Cancelled' to log
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
Exit Command
//
Else If Text Compare : [~avcs_load_option] Equals 'INIT: Disable all AVCS4 initialization commands (this session only)'
Set text [~avcs_load_option] to [Not Set]
Write [Green] 'Profile(s) Initialization Cancelled - this session only' to log
Write [Blank] 'Access Load Options again to reset, otherwise restart VoiceAttack' to log
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
Set Boolean [AVCS_Init_Bypass] to True
//
End Condition
//
// ====================================================================================================
// ========================== ADVANCED LOAD OPTIONS BEGIN ===================================================
// ====================================================================================================
Marker: AVCS_ADVANCED_OPTIONS
Begin Boolean Compare : [AVCS_ADVANCED_OPTIONS] Equals True
Set Boolean [AVCS_ADVANCED_OPTIONS] to [Not Set]
Set text [~avcs_load_option] to 'CONFIG: Open Advanced Configuration Options & Updates Control Menu'
End Condition
//
Begin Boolean Compare : [AVCS_HELP_OPTIONS] Equals True
Set Boolean [AVCS_ADVANCED_OPTIONS] to [Not Set]
Set Boolean [AVCS_HELP_OPTIONS] to [Not Set]
Set text [~avcs_load_option] to 'SUPPORT: Open Help and Support Menu for AVCS4 Profiles and Modules'
End Condition
//
Begin Boolean Compare : [AVCS_SFS_INIT] Equals False
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Execute command, 'F_CORE_SFS' (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
End Condition
//
// Load CORE User Configuration Settings from Save File
Begin Text Compare : [{STATE_FILEEXISTS:AVCS_CORE_SaveFilePath}] Equals '1'
Set text [~save_file] to [{TXT:AVCS_CORE_SaveFilePath}] (Trim)
Begin Text Compare : [~save_file] Does Not Equal ''
// Load All Variables from File/List to Profile (or clear/delete from profile)
Inline VB Function: AVCS_CORE_LoadAllToProfile, wait until execution finishes
End Condition
End Condition
Set text [~save_file] to [Not Set]
//
//
// ====================================================================================================
// ========================== TOGGLE VOICEATTACK EVENT LOG CLEARING ===================================================
// ====================================================================================================
//
Begin Text Compare : [~avcs_load_option] Starts With 'CONFIG: Toggle VoiceAttack Event Log Window Clearing '
Set text [~avcs_load_option] to [Not Set]
// Switch Save File Location to Core Save File, set temp holding var
Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
End Condition
//
Begin Boolean Compare : [AVCS_LogClearing_ON] Equals True
//
Set Boolean [AVCS_LogClearing_ON] to False
Set text [AVCS_SFS_SAVED_name_1] to 'AVCS_LogClearing_ON'
Set text [AVCS_SFS_SAVED_value_1] to 'False'
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set text [~avcs_sub_CMD_NAME] to 'F_SFS_TO_FILE'
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Set Boolean [AVCS_SFS_SORT_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
//
Else If Boolean Compare : [AVCS_LogClearing_ON] Equals False
Set Boolean [AVCS_LogClearing_ON] to True
Set text [AVCS_SFS_SAVED_name_1] to 'AVCS_LogClearing_ON'
Set text [AVCS_SFS_SAVED_value_1] to 'True'
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set text [~avcs_sub_CMD_NAME] to 'F_SFS_TO_FILE'
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Set Boolean [AVCS_SFS_SORT_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
//
End Condition
//
//
Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [Not Set]
End Condition
//
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
Set text [~avcs_load_option] to [Not Set]
Jump to Marker: AVCS_LOAD_OPTIONS
//
//
// ====================================================================================================
// ========================== SET NEW PREFERRED PROFILE TO SAVEFILE ===================================================
// ====================================================================================================
//
//
Else If Text Compare : [~avcs_load_option] Equals 'PROFILE: Show automatic profile switching menu (set/clear preferred profile)'
Set text [~avcs_load_option] to [Not Set]
Begin Condition : [AVCS_PREFERRED_PROFILE] Does Not Equal '' OR [AVCS_PREFERRED_PROFILE] Has Been Set
Get Choice Input [~avcs_choice_preferred]
Else
Set text [~avcs_choice_preferred] to 'Change the Preferred Profile'
End Condition
Begin Text Compare : [~avcs_choice_preferred] Equals 'Change the Preferred Profile'
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
// Load Updated Profile Names LIst from Text Variable
Set text [~avcs_core_profile_name] to '{TXT:~avcs_profiles_path}\avcs_core_profile.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
End Condition
Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
// If the only profile listed is NOT this profile (AVCS CORE) then provide Get Choice Box
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 '')
Set text [~avcs_profiles_default] to '{TXT:~avcs_core_profile} (none - cancel)'
Set text [~avcs_installed_profiles] to [~avcs_profiles_list] (Replace '{TXT:~avcs_core_profile}' with '{TXT:~avcs_profiles_default}')
Begin Text Compare : [~avcs_user_profiles_list] Does Not Equal ''
Set text [~avcs_installed_profiles] to '{TXT:~avcs_installed_profiles}{TXT:~avcs_user_profiles_list:}'
End Condition
// If preferred already set, add flag to it's name in the Get Choice box
Begin Text Compare : [AVCS_PREFERRED_PROFILE] Does Not Equal ''
Begin Text Compare : [~avcs_installed_profiles] Contains [AVCS_PREFERRED_PROFILE]
Set text [~avcs_preferred_current] to '{TXT:AVCS_PREFERRED_PROFILE} (preferred)'
Set text [~avcs_installed_profiles] to [~avcs_installed_profiles] (Replace '{TXT:AVCS_PREFERRED_PROFILE}' with '{TXT:~avcs_preferred_current}')
End Condition
End Condition
Set text [~previous_preferred_profile] to '{TXT:AVCS_PREFERRED_PROFILE:}'
Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
Get Choice Input [AVCS_PREFERRED_PROFILE]
Begin Condition : [AVCS_PREFERRED_PROFILE] Equals '' OR [AVCS_PREFERRED_PROFILE] Has Not Been Set OR [AVCS_PREFERRED_PROFILE] Equals [~avcs_profiles_default]
// If they chose nothing, restore previous preferred profile setting
Begin Text Compare : [~previous_preferred_profile] Does Not Equal ''
Set text [AVCS_PREFERRED_PROFILE] to [~previous_preferred_profile]
Write [Yellow] 'Preferred Profile not changed from current: {TXT:AVCS_PREFERRED_PROFILE}' to log
Write [Green] 'Say 'Open Core Options' anytime to change or set a new profile' to log
Else
// If they chose nothing, and it wasn't previously set, clear the variable
Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
Write [Yellow] 'Preferred Profile not set.... Automatic Profile Switching disabled.' to log
Write [Green] 'Say 'Open Core Options' anytime to change or set a new profile' to log
End Condition
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Else
// If they chose a profile:
Set text [AVCS_PREFERRED_PROFILE] to [AVCS_PREFERRED_PROFILE] (Replace ' (preferred)' with '')
// Continue Initialization with FIRSTRUN Set To 2 or greater (bypassing this choice at end)
Begin Integer Compare : [AVCS_FIRST_RUN] Is Less Than 2
Begin Integer Compare : [AVCS_FIRST_RUN] Equals 0
Set integer [AVCS_FIRST_RUN] value to 2
Else
Set integer [AVCS_FIRST_RUN] to [AVCS_FIRST_RUN] plus 1
End Condition
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_FIRST_RUN'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{INT:AVCS_FIRST_RUN}'
End Condition
//
// Save new Auto-Switch Profile to CORE Save File
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_PREFERRED_PROFILE'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to [AVCS_PREFERRED_PROFILE]
// Switch Save File Location to Core Save File, set temp holding var
Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
End Condition
//
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
// Save to File and Restore Save File Path (if changed)
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -- ...
End Condition
End Condition
// ==================== END ====================
Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [Not Set]
End Condition
//
Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
Inline C# Function: VA.ClearLog
End Condition
//
Write [Yellow] 'Preferred Profile Saved as: {TXT:AVCS_PREFERRED_PROFILE}' to log
Write [Green] 'AVCS CORE will always load itself, then load and switch to your preferred profile.' to log
Write [Green] 'Say 'Open Core Options' anytime to change or set a new profile' to log
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
//
// Proper initialization clears event log - provide short time for reading important new profile message
Pause 1 second
Write [Yellow] 'Continuing Initialization....' to log
Pause 4 seconds
//
Begin Condition : ([AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True AND [{PROFILE}] Does Not Equal [AVCS_PREFERRED_PROFILE])
// =================================================================================================PROFILE SWITCH
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
Begin Text Compare : [{NEXTPROFILE}] Equals ''
Switch to profile, '{TXT:AVCS_PREFERRED_PROFILE}' (by name)
End Condition
Jump to Marker: AVCS_CORE_END
// =================================================================================================PROFILE SWITCH
End Condition
//
End Condition
//
//
Else
// Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Write [Yellow] 'AVCS4 Profiles must be switched to or from at least once to set preferred profile' to log
Write [Yellow] '- This choice will be shown again once initialized' to log
Set integer [AVCS_FIRST_RUN] value to [Not Set]
// Proper initialization clears event log - provide short time for reading important new profile message
Pause 1 second
Write [Yellow] 'Continuing Initialization....' to log
Pause 6 seconds
End Condition
//
//
//
// ====================================================================================================
// ========================== CLEAR PREFERRED PROFILE FROM SAVEFILE ===================================================
// ====================================================================================================
//
Else If Text Compare : [~avcs_choice_preferred] Equals 'Remove the current Preferred Profile'
Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
//
// Switch Save File Location to Core Save File, set temp holding var
Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
End Condition
//
// Delete Preferred Profile Entry, and restore Save File Path (if changed)
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_PREFERRED_PROFILE'
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Execute command, 'F_SFS_DELETE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [Not Set]
End Condition
Set text [~avcs_load_option] to [Not Set]
Write [Green] 'Default Profile(s) Initialization Auto-Switch removed' to log
Write [Green] 'Say 'Open Core Options' anytime to change or set a new profile' to log
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
//
End Condition
//
//
//
// ====================================================================================================
// ========================== OPEN HELP AND SUPPORT MENU BEGIN ===================================================
// ====================================================================================================
//
Else If Text Compare : [~avcs_load_option] Equals 'SUPPORT: Open Help and Support Menu for AVCS4 Profiles and Modules'
Set text [~avcs_load_option] to [Not Set]
//
//
Inline VB Function: AVCS_GetHelpItemsList
Get Choice Input [~avcs_help_option]
//
Begin Text Compare : [~avcs_help_option] Does Not Equal ''
Begin Text Compare : [~avcs_help_option] Equals 'Open AVCS Website Homepage'
Set text [~avcs_core_website] to 'https://veterans-gaming.com/semlerpdx-avcs/home.html/'
Run application '{TXT:~avcs_core_website}'
End Condition - Exit when condition met
Start Loop : Repeat From 1 to [~avcs_help_items_count]
Set text [~avcs_help_item] to [AVCS_{TXT:AVCS_ACTIVE_PROFILE:CORE}_HelpMenu_Item_{INT:~i}]
Begin Condition : ([~avcs_help_option] Does Not Equal '' AND [~avcs_help_item] Contains [~avcs_help_option])
Set text [~~AVCS_QCC_COMMAND] to [AVCS_{TXT:AVCS_ACTIVE_PROFILE:CORE}_HelpMenu_Action_{INT:~i}]
End Condition
End Loop
Execute command, 'F_QCC_RUN' (by name)
Jump to Marker: AVCS_CMD_EXIT
Else
Set text [~avcs_load_option] to [Not Set]
Set Boolean [AVCS_ADVANCED_OPTIONS] to True
Jump to Marker: AVCS_LOAD_OPTIONS
End Condition
//
//
//
// ====================================================================================================
// ========================== OPEN ADVANCED LOAD OPTIONS MENU BEGIN ===================================================
// ====================================================================================================
//
Else If Text Compare : [~avcs_load_option] Equals 'CONFIG: Open Advanced Configuration Options & Updates Control Menu'
Set text [~avcs_load_option] to [Not Set]
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)
Set text [~avcs_live_updates] to '{TXT:AVCS_LIVE_UPDATES:ON}' (Upper Case)
Set text [~toggle_update_checks_choice] to 'UPDATE: Toggle all AVCS Profile Minor Update Prompts (currently: {TXT:~avcs_live_updates})'
//
Write [Yellow] 'Opening advanced load options...' to log
Get Choice Input [~avcs_load_option]
//
//
//
// ====================================================================================================
// ========================== TOGGLE ALL AVCS PROFILE MINOR UPDATE ===================================================
// ====================================================================================================
//
Begin Text Compare : [~avcs_load_option] Equals [~toggle_update_checks_choice]
// Save new Updates Setting to CORE Save File (set temp var to restore current save file path)
Begin Text Compare : [~avcs_live_updates] Equals 'ON'
Set text [AVCS_LIVE_UPDATES] to 'OFF'
Write [Red] 'ALL AVCS Profile Minor Update Checks are now OFF' to log
Else If Text Compare : [~avcs_live_updates] Equals 'OFF'
Set text [AVCS_LIVE_UPDATES] to 'ON'
Write [Green] 'ALL AVCS Profile Minor Update Checks are now ON' to log
End Condition
//
Set integer [AVCS_SFS_SAVED_requests] value to 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_LIVE_UPDATES'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to [AVCS_LIVE_UPDATES]
//
Set text [~current_sfs_savefilepath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -- ...
End Condition
End Condition
// ==================== END ====================
Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
//
Pause 0.2 seconds
//
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
Set text [~avcs_load_option] to [Not Set]
Set Boolean [AVCS_ADVANCED_OPTIONS] to True
Jump to Marker: AVCS_ADVANCED_OPTIONS
//
//
//
// ====================================================================================================
// ========================== TOGGLE A PROFILE MINOR UPDATE ROLLBACKS ===========================================
// ====================================================================================================
//
Else If Text Compare : [~avcs_load_option] Equals 'UPDATE: Open Menu to toggle an AVCS Profile Minor Update Version Rollback'
Marker: AVCS_ROLLBACK_OPTIONS
Set text [~avcs_load_option] to [Not Set]
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
//
//
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
//
Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
Set text [~avcs_default_choice] to '{PROFILE}'
End Condition
Get Choice Input [AVCS_INIT_PROFILE]
Set text [AVCS_INIT_PROFILE] to [AVCS_INIT_PROFILE] (Replace '{SPACE}ON (using Rollback version)' with '')
Set text [AVCS_INIT_PROFILE] to [AVCS_INIT_PROFILE] (Replace '{SPACE}OFF (using latest version)' with '')
//
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])
//===(if chosen)======================================================
Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
//
Write [Green] 'Profile Minor Version Rollback Toggled - re-initializing profile' to log
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
//
Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK'
//
Set text [~current_rollback_setting] to '{BOOL:AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK:false}'
Begin Text Compare : [~current_rollback_setting] Equals 'true'
//
Set Boolean [AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK] to [Not Set]
//
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Execute command, 'F_SFS_DELETE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
Else If Text Compare : [~current_rollback_setting] Equals 'false'
//
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to 'true'
Set Boolean [AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK] to True
//
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -- ...
End Condition
End Condition
// ==================== END ====================
End Condition
//
Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
Set Boolean [AVCS_REINIT] to True
Set Boolean [AVCS_SFS_INIT] to [Not Set]
Set Boolean [AVCS_CORE_INIT] to [Not Set]
Set Boolean [AVCS_CORE_FULLYLOADED] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
//
Reset the active profile
Exit Command
//=========================================================
//
Else
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Set text [~avcs_rollback_version_choice] to [Not Set]
Set text [~avcs_rollback_choice] to [Not Set]
//
End Condition
//
Else
// Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
Write [Red] 'No AVCS4 Profiles installed yet - This choice will box is available once AVCS4 Profiles initialized' to log
Set integer [AVCS_FIRST_RUN] value to [Not Set]
End Condition
//=========================================================
Pause 3 seconds
//
//
//
// ====================================================================================================
// ========================== REINSTALL/UNINSTALL PROFILE OR MODULE CONFIGS ======================================
// ====================================================================================================
//
Else If Text Compare : [~avcs_load_option] Equals 'UPDATE: Open Menu to select AVCS Profile Version for Uninstall or Reinstall'
Set text [~avcs_load_option] to [Not Set]
//
Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
//
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
//
Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
Set text [~avcs_default_choice] to '{PROFILE}'
End Condition
Get Choice Input [AVCS_INIT_PROFILE]
//
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])
Write [Red] 'Profile Initialization Cancelled - Choosing Profile or Module to Uninstall/Reinstall' to log
// Jump to Folder Delete Section just after Path Initialization -
Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [AVCS_PROFILE_AVCS{TXTUPPER:~profile_to_init}{TXT:~avcs_VN}] to [AVCS_INIT_PROFILE]
Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to True
Set text [AVCS_SFS_DELETE_ConfigFolderName] to [AVCS_INIT_PROFILE]
Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [~avcs_VN]
//
Set text [avcs_reinstall] to [Not Set]
Get Choice Input [avcs_reinstall]
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
//
Set Boolean [AVCS_LogClearing_ON] to False
Begin Text Compare : [avcs_reinstall] Equals 'Uninstall Profile'
Write [Red] 'When finished, delete the profile from VoiceAttack to complete uninstallation.' to log
Else
Write [Red] 'When finished, restart VoiceAttack and reinitialize Profile or Module to complete a reinstallation.' to log
End Condition
//
//
Set text [~avcs_core_profile_name] to '{VA_APPS}\AVCS\avcs_core_profile.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
Begin Text Compare : [{PROFILE}] Does Not Equal [~avcs_core_profile]
// Switch to this profile if CORE is not active profile
Switch to profile, '{TXT:~avcs_core_profile}' (by name)
End Condition - Exit when condition met
Jump to Marker: INIT_MODULE_PATHS
Jump to Marker: INIT_MODULE_PATHS
End Condition - Exit when condition not met
//
//
//=========================================================
// UNINSTALL/REINSTALL END
//=========================================================
//
Else
//
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Set text [AVCS_INIT_PROFILE] to [Not Set]
//
End Condition
//
Else
// Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
Write [Green] 'No AVCS4 Profile Config Folders installed yet - This choice will be shown again once initialized' to log
Set integer [AVCS_FIRST_RUN] value to [Not Set]
End Condition
// Give small pause for important message above
Pause 4 seconds
//
//
//
// ====================================================================================================
// ========================== EDIT CHOSEN CONFIG FOLDERS ===================================================
// ====================================================================================================
//
Else If Text Compare : [~avcs_load_option] Equals 'CONFIG: Select Profile Config File(s) to Edit (following AVCS edit rules)'
Marker: AVCS_EDITCONFIG_OPTIONS
Set text [~avcs_load_option] to [Not Set]
Set Boolean [AVCS_SFS_EDIT_ConfigFolder] to [Not Set]
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
//
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
//
Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
Set text [~avcs_default_choice] to '{PROFILE}'
End Condition
Get Choice Input [AVCS_INIT_PROFILE]
//
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])
Set text [~avcs_profiles_list] to [Not Set]
Write [Green] 'Profile Initialization Proceeding - Opening Config Folder(s) to Edit' to log
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
// Jump to Module Init Section with Edit Flag ON to present choices as they are loaded -
Set Boolean [AVCS_SFS_EDIT_ConfigFile] to True
Set Boolean [AVCS_REINIT] to True
Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
Jump to Marker: AVCS_EXIT_OPTIONS
//
Else
//
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Set text [AVCS_INIT_PROFILE] to [Not Set]
//
End Condition
//
Else
// Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
Write [Green] 'No AVCS4 Profile Config Folders installed yet - This choice will be shown again once initialized' to log
Set integer [AVCS_FIRST_RUN] value to [Not Set]
End Condition
// Give small pause for important message above
Pause 4 seconds
//
//
//
// ====================================================================================================
// ========================== RESTORE CHOSEN CONFIG FOLDERS ===================================================
// ====================================================================================================
//
Else If Text Compare : [~avcs_load_option] Equals 'CONFIG: Select Profile Config Folder(s) to Restore (delete user edits)'
Set text [~avcs_load_option] to [Not Set]
Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
//
Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
Set text [~avcs_default_choice] to '{PROFILE}'
End Condition
Get Choice Input [AVCS_INIT_PROFILE]
//
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])
Set text [~avcs_profiles_list] to [Not Set]
Write [Red] 'Profile Initialization Cancelled - Choosing Config Folder(s) to Restore' to log
Write [Red] 'When finished, reinitialize Profile or restart VoiceAttack to use AVCS4' to log
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
// Jump to Folder Delete Section just after Path Initialization -
Set Boolean [AVCS_REINIT] to True
Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to True
Set text [AVCS_SFS_DELETE_ConfigFolderName] to [AVCS_INIT_PROFILE]
Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [~avcs_VN]
//=========================================================
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
Set text [~avcs_core_profile_name] to '{VA_APPS}\AVCS\avcs_core_profile.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
Begin Text Compare : [{PROFILE}] Does Not Equal [~avcs_core_profile]
// Switch to this profile if CORE is not active profile
Switch to profile, '{TXT:~avcs_core_profile}' (by name)
End Condition - Exit when condition met
Jump to Marker: INIT_MODULE_PATHS
Jump to Marker: INIT_MODULE_PATHS
End Condition - Exit when condition not met
Else
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Set text [AVCS_INIT_PROFILE] to [Not Set]
Set text [~avcs_VN] to [Not Set]
End Condition
//
Else
// Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
Write [Green] 'No AVCS4 Profile Config Folders installed yet - This choice will be shown again once initialized' to log
Set integer [AVCS_FIRST_RUN] value to [Not Set]
End Condition
// Give small pause for important message above
Pause 4 seconds
//
//
//
// ====================================================================================================
// ========================== DELETE CHOSEN CONFIG FOLDERS ===================================================
// ====================================================================================================
//
Else If Text Compare : [~avcs_load_option] Equals 'CONFIG: Select Profile Config Folder(s) to Delete (restored if needed)'
Set text [~avcs_load_option] to [Not Set]
//
Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
Begin Condition : ([{STATE_DIRECTORYEXISTS:~module_folder_root}] Contains '1' AND [{STATE_DIRECTORYHASFILES:~module_folder_root}] Contains '1')
//
// Get List of Installed AVCS4 Profiles from their Apps Folder Names
Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
//
Begin Text Compare : [~avcs_profiles_list] Contains '{PROFILE}'
Set text [~avcs_default_choice] to '{PROFILE}'
End Condition
Get Choice Input [AVCS_INIT_PROFILE]
//
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])
//
Write [Red] 'Profile Initialization Cancelled - Choosing Config Folder(s) to Delete' to log
Write [Red] 'When finished, reinitialize Profile or restart VoiceAttack to use AVCS4' to log
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
Set text [~profile_to_init] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [~avcs_VN] to '{INT:~{TXT:AVCS_INIT_PROFILE}}'
Set text [AVCS_INIT_PROFILE] to '{TXT:~{TXT:AVCS_INIT_PROFILE}}'
// Jump to Folder Delete Section just after Path Initialization -
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INIT] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_INIT_PROFILE}_INITIALIZED] to [Not Set]
Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to True
Set text [AVCS_SFS_DELETE_ConfigFolderName] to [AVCS_INIT_PROFILE]
Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [~avcs_VN]
Set Boolean [AVCS_REINIT] to True
//=========================================================
Set text [~avcs_core_profile_name] to '{VA_APPS}\AVCS\avcs_core_profile.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
Begin Text Compare : [{PROFILE}] Does Not Equal [~avcs_core_profile]
// Switch to this profile if CORE is not active profile
Switch to profile, '{TXT:~avcs_core_profile}' (by name)
End Condition - Exit when condition met
Jump to Marker: INIT_MODULE_PATHS
End Condition - Exit when condition not met
//=========================================================
Else
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Set text [AVCS_INIT_PROFILE] to [Not Set]
Set text [~profile_to_init] to [Not Set]
Set text [~avcs_VN] to [Not Set]
End Condition
//
Else
// Cannot provide list of AVCS Profile for auto-switch because no Config Folders exist with data
Write [Green] 'No AVCS4 Profile Config Folders installed yet - This choice will be shown again once initialized' to log
Set integer [AVCS_FIRST_RUN] value to [Not Set]
End Condition
// Give small pause for important message above
Pause 4 seconds
//
//
//=========================================================
//=========================================================
//============== END OF ADVANCED OPTIONS SUB MENU ==============
//=========================================================
//=========================================================
//
//
Else If Text Compare : [~avcs_load_option] Equals '(go back to basic load options menu)'
Set text [~avcs_load_option] to [Not Set]
Jump to Marker: AVCS_LOAD_OPTIONS
//
//
ELSE IF --- Advanced Options Sub-Menu
End Condition
//end Load Options If/Then/Else
End Condition
//end AnyKey Down but D/B/Y/N combos below
End Condition
Set text [~avcs_load_option] to [Not Set]
Set Boolean [AVCS_LOAD_OPTIONS] to [Not Set]
Set Boolean [AVCS_ADVANCED_OPTIONS] to [Not Set]
Set Boolean [AVCS_HELP_OPTIONS] to [Not Set]
//
//=========================================================
// DEBUGGING & DEV LOGIN
Begin Condition : ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:D}] Equals '1')
Marker: AVCS_CORE_DEBUG
Begin Boolean Compare : [AVCS_INIT_Debug_TRIGGERED] Equals False
Set text [~avcs_dev_init_path] to '{VA_APPS}\AVCS\avcs_init_debug.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_dev_init_path}] Contains '1'
Set Boolean [AVCS_Debug_ON] to True
Set text [~avcs_dev_init_debug_check] to [{TXT:~avcs_dev_init_path}]
Begin Text Compare : [~avcs_dev_init_debug_check] Contains 'report'
Set Boolean [AVCS_Debug_QRPT] to True
Else
Set Boolean [AVCS_Debug_QRPT] to [Not Set]
End Condition
Begin Integer Compare : [AVCS_Debug_QID] Is Less Than 4
Begin Text Compare : [~avcs_dev_init_debug_check] Contains '4'
Set integer [AVCS_Debug_QID] value to 4
Else If Text Compare : [~avcs_dev_init_debug_check] Contains '3'
Set integer [AVCS_Debug_QID] value to 3
Else If Text Compare : [~avcs_dev_init_debug_check] Contains '2'
Set integer [AVCS_Debug_QID] value to 2
Else If Text Compare : [~avcs_dev_init_debug_check] Contains '1'
Set integer [AVCS_Debug_QID] value to 1
Else
Set Boolean [AVCS_Debug_ON] to [Not Set]
Set Boolean [AVCS_Debug_QRPT] to [Not Set]
Set integer [AVCS_Debug_QID] value to [Not Set]
End Condition
End Condition
End Condition
End Condition
//
Set Boolean [AVCS_INIT_Debug_TRIGGERED] to True
//
Set text [~avcs_load_option] to [Not Set]
Jump: Command Start
End Condition
//=========================================================
//
// QUICK INIT EXIT
Begin Condition : ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:Y}] Equals '1')
Write [Green] 'Profile Initialization Cancelled' to log
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Exit Command
End Condition
//
// INIT BYPASS
Begin Condition : ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:B}] Equals '1')
Write [Red] 'Profile Initialization Bypass Enabled -- RCTRL+RSHFT+B Recognized' to log
Say, '{TXT:AVCS_TTS_VAS_Cancelled:Command cancelled}'
Set Boolean [AVCS_Init_Bypass] to True
End Condition
//
//=========================================================
// INIT & DEV NORMALIZE
Begin Condition : ([{STATE_KEYSTATE:RCTRL}] Equals '1' AND [{STATE_KEYSTATE:RSHIFT}] Equals '1' AND [{STATE_KEYSTATE:N}] Equals '1')
Write [Red] 'Profile Initialization Restored to Default -- RCTRL+RSHFT+N Recognized' to log
Say, '{TXT:AVCS_TTS_COMMON_Completed:Done}' (and wait until it completes)
Set text [f_core_debug] to [Not Set]
Set Boolean [AVCS_Debug_ON] to [Not Set]
Set Boolean [AVCS_Init_Bypass] to [Not Set]
End Condition
//=========================================================
//
//
Begin Condition : ([AVCS_Init_Bypass] Does Not Equal True AND [{CMDACTION}] Equals 'Profile')
Write [Yellow] 'Continuing Initialization....' to log
//
//
Jump to Marker: AVCS_EXIT_OPTIONS
//
End Condition
//end AnyKey Down 2
End Condition
//end AnyKey Down 1
End Condition
End Condition
// =========END=================AVCS CORE LOAD OPTIONS CHECKS========================END===========================
//
//
//
//
// ===================================================================================================
// ================================COMMAND EXIT CHECKS===================================================
// ===================================================================================================
//
//
Begin Boolean Compare : [AVCS_Init_Bypass] Equals True
Write [Red] 'Profile Initialization Cancelled -- AVCS_Init_Bypass = TRUE' to log
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
Exit Command
End Condition
//
//
Begin Condition : ([{CMDACTION}] Does Not Equal 'Profile' AND [{CMDACTION}] Does Not Equal 'ProfileUnloadChange')
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
Write [Gray] 'exiting core command...' to log
Exit Command
End Condition
//=========================================================
//
//
Marker: AVCS_EXIT_OPTIONS
//
//
//
// ===================================================================================================
// ===============================SFS INITIALIZATION CHECK===================================================
// ===================================================================================================
//
Begin Boolean Compare : [AVCS_SFS_INIT] Equals False
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
End Condition
//
//
//
//
//
//=========================================================
Begin Boolean Compare : [AVCS_RELOAD_CORE] Equals True
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Jump to Marker: DISPLAY_CORE_TITLE
End Condition
//
Begin Condition : ([AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals False AND [AVCS_INIT_PROFILE] Equals '')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Jump to Marker: INIT_CORE_COMPLETE
End Condition
//=========================================================
//
//
//
//=========================================================
Begin Text Compare : [{CMDACTION}] Equals 'Profile'
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)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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....
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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...
End Condition
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Jump to Marker: DISPLAY_CORE_TITLE
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)
Set text [~check_switchfrom_profile] to '{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}' (Trim) (Replace 'AVCS' with '') (Upper Case)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set text [~check_switchfrom_init] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INIT:false}' (Lower Case)
Set text [~primary_module_fully_initialized] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INITIALIZED:false}' (Lower Case)
Begin Condition : ([~check_switchfrom_init] Does Not Contain 'true' AND [~primary_module_fully_initialized] Does Not Contain 'true')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
End Condition
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set text [AVCS_INIT_PROFILE] to [~check_switchfrom_profile]
Set text [~check_switchfrom_profile] to [Not Set]
Set text [~check_switchfrom_init] to [Not Set]
Set text [~primary_module_fully_initialized] to [Not Set]
Else
Set text [~check_switchfrom_profile] to [Not Set]
Set text [~check_switchfrom_init] to [Not Set]
Set text [~primary_module_fully_initialized] to [Not Set]
End Condition
End Condition
//=========================================================
//
Else If Text Compare : [{CMDACTION}] Equals 'ProfileUnloadChange'
Begin Condition : ([AVCS_INIT_PROFILE] Equals '' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
Set text [~check_switchto_profile] to '{TXTALPHA:"{NEXTPROFILE_AT3}"}' (Trim) (Replace 'AVCS' with '') (Upper Case)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
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:~...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set text [~check_switchto_init] to '{BOOL:AVCS_{TXT:~check_switchto_profile}_INIT:false}'
Begin Text Compare : [~check_switchto_init] Does Not Contain 'true'
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set text [AVCS_INIT_PROFILE] to [~check_switchto_profile]
Set text [~check_switchto_profile] to [Not Set]
Set text [~check_switchto_init] to [Not Set]
Else
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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)---> ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set text [~check_switchto_profile] to [Not Set]
Set text [~check_switchto_init] to [Not Set]
End Condition
End Condition
End Condition
//=========================================================
//
//
//
// ===================================================================================================
// ============================PROFILE INITIALIZATION BEGIN===================================================
// ===================================================================================================
//
//Common CORE Init Variables
Set text [~avcs_core_status] to '{VA_APPS}\AVCS\avcs_core_status'
Set text [~avcs_core_ops] to 'https://veterans-gaming.com/semlerpdx-avcs/core/'
Set text [~avcs_core_profiles] to 'https://veterans-gaming.com/semlerpdx-avcs/downloads/'
Set text [~avcs_core_applications] to 'https://veterans-gaming.com/semlerpdx-avcs/beta-applications/'
//
// Use Dynamic Variables to loop through entire section for any module by Jumping to this Marker
Marker: INIT_MODULES_BY_NAME
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
//
Begin Condition : ([AVCS_CORE_INIT] Equals False AND [~depmod_load] Equals False)
Set text [~profile_to_init] to 'CORE'
// Load CORE Configuration Settings from Save File
Begin Text Compare : [AVCS_SFS_CORE_LOADED] Does Not Contain 'complete'
AVCS_CORE_SaveFilePath AVCS_SFS_CORE_LOADED
Set text [~avcs_core_save_file_path] to '{VA_APPS}\AVCS\save_files\core_save\{TXTNUM:"{PROFILE_AT3}"}\save.txt'
Begin Text Compare : [AVCS_CORE_SaveFilePath] Does Not Equal ''
Set text [~avcs_core_save_file_path] to [AVCS_CORE_SaveFilePath]
End Condition
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_save_file_path}] Equals '1'
Set text [~save_file] to [{TXT:~avcs_core_save_file_path}] (Trim)
Begin Text Compare : [~save_file] Does Not Equal ''
// Load All Variables from File/List to Profile (or clear/delete from profile)
Inline VB Function: AVCS_LoadAllToProfile, wait until execution finishes
Set text [AVCS_SFS_CORE_LOADED] to 'complete'
End Condition
//
End Condition
End Condition
Set text [~save_file] to [Not Set]
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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'
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
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')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Begin Text Compare : [~next_avcs_profile] Equals ''
Set text [~next_avcs_profile] to '{NEXTPROFILE}'
End Condition
Set text [~profile_to_init] to [AVCS_INIT_PROFILE] (Trim) (Replace ' ' with '')
Set text [AVCS_INIT_PROFILE] to [Not Set]
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')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 1
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'
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Begin Text Compare : [~next_avcs_profile] Equals ''
Set text [~next_avcs_profile] to '{PREVIOUSPROFILE}'
End Condition
Set text [~profile_to_init] to [AVCS_INIT_PROFILE] (Trim) (Replace ' ' with '')
Set text [AVCS_INIT_PROFILE] to [Not Set]
End Condition
//
//
Set text [~check_data_profile_init] to [~profile_to_init]
Begin Condition : [~check_data_profile_init] Equals 'NOT SET' OR [~check_data_profile_init] Equals ''
Begin Condition : ([AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
Jump to Marker: DISPLAY_CORE_TITLE
End Condition
Set text [~profile_to_init] to 'CORE'
End Condition
//
//
Set text [~avcs_module_init] to '{BOOL:AVCS_{TXT:~profile_to_init}_INIT}' (Trim) (Replace ' ' with '')
Begin Boolean Compare : [AVCS_CORE_INIT] Equals False
// Hard Set Init Variables for this version of AVCS CORE Profile Framework
Set text [~avcs_AT1] to '{PROFILE_AT1}' (Trim) (Replace ' ' with '')
Set text [~avcs_AT2] to '{PROFILE_AT2}' (Trim) (Replace ' ' with '')
Set text [~avcs_VN] to '{TXTNUM:"{PROFILE_AT3}"}'
Set text [CORE] to [~avcs_VN]
Else If : ([~avcs_module_init] Does Not Contain 'true' AND [~depmod_load] Equals False AND [{CMDACTION}] Equals 'ProfileUnloadChange')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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 ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// Initiating Profile Module Loading Variables
Set text [~avcs_AT1] to '{NEXTPROFILE_AT1}' (Trim) (Replace ' ' with '')
Set text [~avcs_AT2] to '{NEXTPROFILE_AT2}' (Trim) (Replace ' ' with '')
Set text [~avcs_VN] to '{TXTNUM:"{NEXTPROFILE_AT3}"}' (Trim) (Replace ' ' with '')
Set text [{TXTUPPER:~profile_to_init}] to [~avcs_VN]
Else If : ([~avcs_module_init] Does Not Contain 'true' AND [~depmod_load] Equals False AND [{CMDACTION}] Equals 'Profile')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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 ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// Initiating Profile Module Loading Variables
Set text [~avcs_AT1] to '{PREVIOUSPROFILE_AT1}' (Trim) (Replace ' ' with '')
Set text [~avcs_AT2] to '{PREVIOUSPROFILE_AT2}' (Trim) (Replace ' ' with '')
Set text [~avcs_VN] to '{TXTNUM:"{PREVIOUSPROFILE_AT3}"}' (Trim) (Replace ' ' with '')
Set text [{TXTUPPER:~profile_to_init}] to [~avcs_VN]
Else If : ([~avcs_module_init] Does Not Contain 'true' AND [~depmod_load] Equals True)
// Dep. Module Loading Variables
Set text [~avcs_AT1] to [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_TV] (Trim) (Replace ' ' with '')
Set text [~avcs_AT2] to [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}] (Trim) (Replace ' ' with '')
Set text [~avcs_VN] to '{INT:AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_VN}' (Trim) (Replace ' ' with '')
Set text [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_TV] to [Not Set]
Set text [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}] to [Not Set]
Set integer [AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_VN] value to [Not Set]
Else If : ([AVCS_CORE_INIT] Equals True AND [~avcs_module_init] Contains 'true' AND [~depmod_load] Equals True)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 1
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'
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Jump to Marker: INIT_MODULE_DEPENDENCY
Else If : ([~avcs_module_init] Contains 'true' AND [AVCS_CORE_INIT] Equals True AND [~depmod_load] Equals False)
Jump to Marker: INIT_MODULES_COMPLETE
Else If : ([AVCS_INIT_PROFILE] Equals '' AND [~profile_to_init] Equals '' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Jump to Marker: DISPLAY_CORE_TITLE
End Condition
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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_...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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} || ...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
//
//
//
// ===================================================================================================
// ==========================MODULE FOLDER AND FILE PATH INIT================================================
// ===================================================================================================
//
Marker: INIT_MODULE_PATHS
Inline VB Function: AVCS_CheckValidATvars, wait until execution finishes
// --- Set Module Paths -------
Set text [~module_folder_root] to '{VA_APPS}\AVCS\CORE'
Set text [~module_file_root] to '{TXT:~module_folder_root}\{TXTUPPER:~profile_to_init}\{TXT:~avcs_VN:}'
Set text [~module_cfg_root] to '{TXT:~module_file_root}\config'
Set text [~module_upd_root] to '{TXT:~module_file_root}\update'
Begin Boolean Compare : [AVCS_SFS_DELETE_ConfigFolder] Equals True
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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 ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
// Set folders to requested delete folder
Set text [~avcs_del_ver] to '{TXTSUBSTR:AVCS_SFS_DELETE_ConfigFolderVersion:0:1}{TXTSUBSTR:AVCS_SFS_DELETE_ConfigFolderVersion:1:1}'
Begin Condition : [AVCS_SFS_DELETE_ConfigFolderVersion] Contains '8' OR [AVCS_SFS_DELETE_ConfigFolderVersion] Contains '9'
Begin Text Compare : [AVCS_SFS_DELETE_ConfigFolderVersion] Contains '8'
Set text [~avcs_del_ver] to 'ALPHA ({TXTSUBSTR:AVCS_SFS_DELETE_ConfigFolderVersion:1:1})'
Else
Set text [~avcs_del_ver] to 'BETA ({TXTSUBSTR:AVCS_SFS_DELETE_ConfigFolderVersion:1:1})'
End Condition
End Condition
//
Begin Text Compare : [avcs_reinstall] Does Not Equal ''
Set text [~avcs_delete_choice] to 'Yes'
Else
Get Choice Input [~avcs_delete_choice]
End Condition
//
Begin Text Compare : [~avcs_delete_choice] Equals 'Yes'
Set text [~avcs_folder] to '{TXT:~module_folder_root}\{TXT:AVCS_SFS_DELETE_ConfigFolderName}\{TXT:AVCS_SFS_DELETE_ConfigFolderVersion}'
Inline VB Function: AVCS_CheckForAndDeleteConfigFolders, wait until execution finishes
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
Write [Yellow] 'If changes are not immediately applied, try restarting VoiceAttack and loading AVCS Profile(s) again.' to log
Set Boolean [AVCS_{TXT:AVCS_SFS_DELETE_ConfigFolderName}_INIT] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_SFS_DELETE_ConfigFolderName}_INITIALIZED] to [Not Set]
Set Boolean [AVCS_{TXT:AVCS_SFS_DELETE_ConfigFolderName}_FULLYLOADED] to [Not Set]
Set text [AVCS_INIT_PROFILE] to [Not Set]
Set text [AVCS_SFS_DELETE_ConfigFolderName] to [Not Set]
Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [Not Set]
Begin Text Compare : [avcs_reinstall] Contains 'Uninstall Profile'
Set text [avcs_reinstall] to [Not Set]
Set text [AVCS_MAJOR_UPDATE] to [AVCS_PROFILE_AVCS{TXTUPPER:~profile_to_init}{TXT:~avcs_VN}]
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}}'
Set text [~avcs_old_profiles_list] to [{TXT:~avcs_profiles_list_path}] (Trim) (Replace '{TXT:~avcs_profile_delete_name}' with '')
Set text [~avcs_old_profiles_list] to [~avcs_old_profiles_list] (Trim) (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
Write (overwrite), '{TXT:~avcs_old_profiles_list}' to file '{TXT:~avcs_profiles_list_path}'
Write [Green] 'Please Delete the AVCS Profile from VoiceAttack now (if it is allowed to initialize again, deleted files will be restored)' to log
Set Boolean [AVCS_MUST_RESTART] to True
Exit Command
End Condition
Set text [avcs_reinstall] to [Not Set]
Reset the active profile
Exit Command
Else
Write [Red] 'Config Folder {TXTUPPER:AVCS_SFS_DELETE_ConfigFolderName} {TXT:~avcs_del_ver} Delete Cancelled' to log
Set text [AVCS_INIT_PROFILE] to [Not Set]
Set Boolean [AVCS_CORE_RELOADING] to [Not Set]
Set text [AVCS_SFS_DELETE_ConfigFolderName] to [Not Set]
Set text [AVCS_SFS_DELETE_ConfigFolderVersion] to [Not Set]
Jump: Command Start
End Condition
Else
// Set folders to those above and Create Config Folders if not present
Set text [~avcs_folders] to '{TXT:~module_folder_root}(/n){TXT:~module_file_root}(/n){TXT:~module_cfg_root}(/n){TXT:~module_upd_root}'
Inline VB Function: AVCS_CheckForOrCreateConfigFolders, wait until execution finishes
Set text [~avcs_folders] to [Not Set]
End Condition
//
// ====================================================================================================
// --- Set Apps File Paths -------
Set text [~update_ID_path] to '{TXT:~module_file_root}\avcs_{TXTLOWER:~profile_to_init}_versionID.core'
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set text [~changelog_path] to '{TXT:~module_file_root}\avcs_{TXTLOWER:~profile_to_init}_changelog.txt'
Set text [~check_cfg_path] to '{TXT:~module_file_root}\config\avcs_config_table.core'
Set text [~check_upd_path] to '{TXT:~module_file_root}\update\avcs_config_table.core'
Set text [~guid_apps_path] to '{TXT:~module_file_root}\avcs_{TXTLOWER:~profile_to_init}_moduleID.core'
Set text [~uuid_apps_path] to '{TXT:~module_file_root}\avcs_{TXTLOWER:~profile_to_init}_betatestID.core'
// ====================================================================================================
// --- Set URL File Paths -------
Set text [~check_updateID_url] to '{TXT:~module_url_root}/info/avcs_{TXT:~profile_to_init}_version.htm/'
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
Set text [~changelog_url] to '{TXT:~module_url_root}/info/avcs_{TXT:~profile_to_init}_changelog.htm/'
Set text [~update_table_url] to '{TXT:~module_url_root}/update/avcs_{TXT:~profile_to_init}_table.htm/'
Set text [~config_table_url] to '{TXT:~module_url_root}/config/avcs_{TXT:~profile_to_init}_table.htm/'
// ====================================================================================================
//
//
//
// ===================================================================================================
// ==============================MODULE GUID VALIDATION INIT================================================
// ===================================================================================================
//
// Generate New Module GUID
Begin Boolean Compare : [~depmod_load] Equals False
//
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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) ...
End Condition
End Condition
//
// Run Inline Function providing GUID + all needed params to get GUUID and verify Module GUID on file (if not there) and verify validity
Set text [f_core_module_NM] to '{TXT:~profile_to_init}' (Upper Case)
Set text [f_core_module_VN] to '{TXT:~avcs_VN}'
Inline VB Function: AVCS_InitializeModule, wait until execution finishes
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Begin Integer Compare : [~avcs_imsg_debug_count] Is Greater Than 0
Start Loop : Repeat From 1 to [~avcs_imsg_debug_count]
Set text [~avcs_imsg_debug_text] to '{TXT:~avcs_imsg_debug_{INT:~i}}'
Set integer [~avcs_imsg_debug_wclr] value to the converted value of {INT:~avcs_imsg_debug_wclr_{INT:~i}:3}
Begin Text Compare : [~avcs_imsg_debug_text] Does Not Equal ''
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to the converted value of {INT:~avcs_imsg_debug_wclr:3}
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...
End Condition
Set integer [~avcs_imsg_debug_wclr_{INT:~i}] value to [Not Set]
Set text [~avcs_imsg_debug_{INT:~i}] to [Not Set]
End Loop
Set integer [~avcs_imsg_debug_count] value to [Not Set]
Set integer [~avcs_imsg_debug_wclr] value to [Not Set]
Set text [~avcs_imsg_debug_text] to [Not Set]
End Condition
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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)'
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Begin Integer Compare : [~avcs_imsg_debug_count] Is Greater Than 0
Start Loop : Repeat From 1 to [~avcs_imsg_debug_count]
Set integer [~avcs_imsg_debug_wclr_{INT:~i}] value to [Not Set]
Set text [~avcs_imsg_debug_{INT:~i}] to [Not Set]
End Loop
End Condition
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
End Condition
// ==================== END ====================
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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)'
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
//
Set text [f_core_module_GUID] to [Not Set]
Set text [~avcs_core_guuid_hsh] to [f_core_return] (Trim) (Replace ' ' with '')
Set text [f_core_return] to [Not Set]
//
// Log current AVCS CORE Live Status
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_status}] Contains '1'
Set text [~check_core_online] to [{TXT:~avcs_core_status}]
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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'
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Else
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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'
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set text [~check_core_online] to 'false'
End Condition
End Condition
//
//
//
// ===================================================================================================
// ==============================MINOR PROFILE UPDATE CHECK================================================
// ===================================================================================================
//
// Log current Module Update ID
Set integer [~module_update_ID] value to 11111111
Begin Text Compare : [{STATE_FILEEXISTS:~update_ID_path}] Contains '1'
Set text [~update_ID_text] to [{TXT:~update_ID_path}] (Trim) (Replace ' ' with '')
Begin Text Compare : [~update_ID_text] Does Not Equal ''
Set integer [~module_update_ID] value to the converted value of {TXT:~update_ID_text}
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Else
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
End Condition
Else
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
End Condition
//
Begin Text Compare : [~check_core_online] Contains 'true'
Set text [~check_update_ID] to [{TXT:~check_updateID_url}] (Trim) (Replace ' ' with '')
Begin Text Compare : [~check_update_ID] Starts With '2'
Set integer [~online_update_ID] value to the converted value of {TXT:~check_update_ID}
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Else
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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 = ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
End Condition
End Condition
// ====================================================================================================
//
//
//
// ===================================================================================================
// ==============================MODULE SPECIFIC UPDATE ROLLBACK================================================
// ===================================================================================================
//
// Check for Forced Rollback to Default Config - this method is used to avoid conversion/comparison errors in event log
Set Boolean [~check_minor_ver_rollback] to [Not Set]
Convert true/false (boolean) [AVCS_{TXT:~profile_to_init}{TXT:~avcs_VN}_ROLLBACK] to true/false (boolean) [~check_rollback]
Begin Boolean Compare : [~check_rollback] Equals True
Set Boolean [~check_minor_ver_rollback] to True
End Condition
Set Boolean [~check_rollback] to [Not Set]
// ====================================================================================================
//
//
//
//
// ===================================================================================================
// ====================================DATA DENC TABLE INIT================================================
// ===================================================================================================
//
Begin Boolean Compare : [~AVCS_DENC_INIT] Equals False
Set text [~AVCS_CORE_KEY1] to '<span hidden>'
Set text [~{TXT:~AVCS_CORE_KEY1}] to ''
Set text [~AVCS_CORE_KEY2] to '</span hidden>'
Set text [~{TXT:~AVCS_CORE_KEY2}] to ''
//
Set Boolean [~AVCS_DENC_INIT] to True
End Condition
// =============================================================================
//
//
//
// ===================================================================================================
// ====================================DATA TABLE LOADING================================================
// ===================================================================================================
//
// Load Module Config Table
Set text [~configs_load_method] to 'update'
Marker: CORE_TABLE_LOAD
//
//
//
// ===================================================================================================
// ====================================MINOR UPDATES & ROLLBACK CHECK=======================================
// ===================================================================================================
//
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')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
//
Begin Condition : [~check_minor_ver_rollback] Equals True OR [AVCS_LIVE_UPDATES] Equals 'OFF'
Write [Red] 'New Version Available for the {TXTUPPER:~profile_to_init} Profile but AVCS Update Prompts are OFF' to log
Pause 0.75 seconds
Write [Red] 'If you want to re-enable Updates now -- hold CTRL+SHFT until menu appears' to log
Pause 0.5 seconds
Write [Blank] '-- otherwise, profile will continue loading current version...' to log
Pause 3.25 seconds
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')
Pause 1.25 seconds
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')
Pause 1.25 seconds
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')
Write [Orange] 'Opening AVCS Live Updates toggle confirmation...' to log
Set text [~avcs_live_updates] to '{TXT:AVCS_LIVE_UPDATES:ON}' (Upper Case)
//
Set text [~toggle_update_checks_choice] to 'UPDATE: Toggle all AVCS Profile Minor Update Prompts (currently: {TXT:~avcs_live_updates})'
Set text [~update_choice_TITLE] to 'AVCS4 - Toggle all Minor Profile Update Prompts (currently: {TXT:AVCS_LIVE_UPDATES:ON})'
Get Choice Input [~avcs_doublecheck_choice]
//
Begin Text Compare : [~avcs_doublecheck_choice] Equals 'Yes'
Begin Text Compare : [~avcs_live_updates] Equals 'ON'
Set text [AVCS_LIVE_UPDATES] to 'OFF'
Set Boolean [~postpone_update] to True
Write [Green] 'ALL AVCS Profile Minor Update Checks are now OFF' to log
Else If Text Compare : [~avcs_live_updates] Equals 'OFF'
Set text [AVCS_LIVE_UPDATES] to 'ON'
Set Boolean [~postpone_update] to False
Write [Green] 'ALL AVCS Profile Minor Update Checks are now ON' to log
End Condition
//
Begin Text Compare : [~avcs_doublecheck_choice] Does Not Equal ''
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_LIVE_UPDATES'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to [AVCS_LIVE_UPDATES]
Set text [~current_sfs_savefilepath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Set Boolean [AVCS_SFS_SORT_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -- ...
End Condition
End Condition
// ==================== END ====================
Set text [AVCS_SFS_SaveFilePath] to [~current_sfs_savefilepath]
End Condition
//
Else
// ((Else If Text Compare : [~avcs_doublecheck_choice] Equals 'No (cancel)' ))
Set Boolean [~postpone_update] to True
End Condition
//
// Give short time for message and then proceed
//===================MINOR PATCH UPDATE======================================
Pause 1.5 seconds
// Jump back to start of this If/Then/Else, run through it again with new choice
Jump to Marker: CORE_TABLE_LOAD
//
End Condition
Else
Set Boolean [~postpone_update] to True
Jump to Marker: CORE_TABLE_LOAD
End Condition
Else
Set Boolean [~postpone_update] to True
Jump to Marker: CORE_TABLE_LOAD
End Condition
End Condition
//
//
//
//=========================================================
//===================MINOR PATCH UPDATE======================================
//=========================================================
//
// Get Choice for Minor Patch/Bug Fix Update
Marker: CORE_UPDATE_MINOR
Begin Integer Compare : [~module_update_ID] Does Not Equal 11111111
Get Choice Input [~update_choice]
//
Begin Text Compare : [~update_choice] Equals 'View Changelog'
Set text [~changelog_latest] to [{TXT:~changelog_url}]
// Check changelog on file and replace with new information if not already matching/existing
Begin Text Compare : [{STATE_FILEEXISTS:~changelog_path}] Contains '1'
Set text [~changelog_file] to [{TXT:~changelog_path}]
Begin Text Compare : [~changelog_file] Does Not Equal '~changelog_latest'
//Get New Changelog from URL > Overwrite Changelog at root only if different
Write (overwrite), '{TXT:~changelog_latest}' to file '{TXT:~changelog_path}'
End Condition
Else
Write (overwrite), '{TXT:~changelog_latest}' to file '{TXT:~changelog_path}'
End Condition
// Display Changelog for this module with default program set for opening .txt files in user Windows Envir.
Begin Text Compare : [AVCS_CORE_Notepad] Equals ''
Run application '{TXT:~changelog_path}' - wait until it completes
Else
Run application '{TXT:AVCS_CORE_Notepad:Notepad.exe}' -with parameters '{TXT:~changelog_path}'
End Condition
Set text [~changelog_latest] to [Not Set]
Set text [~changelog_file] to [Not Set]
Jump to Marker: CORE_UPDATE_MINOR
Else If Text Compare : [~update_choice] Equals 'No'
Set Boolean [~postpone_update] to True
Set text [~changelog_latest] to [Not Set]
Set text [~changelog_file] to [Not Set]
Jump to Marker: CORE_TABLE_LOAD
End Condition
End Condition
//=========================================================
// APPLY MINOR UPDATE --PATCH-- NOT First Run, AND Online Ver DOES NOT match File Ver AND Ver Rollback is False -- LOAD FROM URL
//=========================================================
//
Set text [~config_file_enc] to [{TXT:~check_upd_path}]
Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_cfg_path}'
Set text [~config_file_enc] to [{TXT:~update_table_url}]
Set text [~config_file_enc] to [~config_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
Set text [~config_file_enc] to [~config_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_upd_path}'
Write (overwrite), '{INT:~online_update_ID}' to file '{TXT:~update_ID_path}'
Set Boolean [~configs_updated] to True
//=========================================================
//===================END MINOR PATCH UPDATE==================================
//=========================================================
//
//
//
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')
// --- FIRST RUN -- INFORM USER OF UPDATES METHOD - ALLOW THEM TO SET NOW
Begin Condition : ([~module_update_ID] Equals 11111111 AND [AVCS_LIVE_UPDATES] Does Not Equal 'OFF' AND [AVCS_LIVE_UPDATES] Does Not Equal 'ON')
Set text [~update_choice] to [Not Set]
Set text [~update_mastermode_choice] to [Not Set]
Set text [~update_choice_LEAVEON] to 'YES - (will give you choice box when updates found)'
Set text [~update_choice_TURNOFF] to 'NO - (updates not applied, message in VoiceAttack event log only)'
Set text [~update_choice_module_check] to [~profile_to_init] (Upper Case)
Begin Text Compare : [~update_choice_module_check] Does Not Equal 'CORE'
Begin Text Compare : [AVCS_LIVE_UPDATES] Equals 'OFF'
Set text [~update_mastermode_choice] to 'NO - (updates not applied, message in VoiceAttack event log only)'
Set text [AVCS_LIVE_UPDATES] to 'OFF'
Else
Set text [~update_mastermode_choice] to 'YES - (will give you choice box when updates found)'
Set text [AVCS_LIVE_UPDATES] to 'ON'
End Condition
Else
Set text [~update_choice_TITLE] to 'AVCS4 - Toggle all Minor Profile Update Prompts (currently {TXT:AVCS_LIVE_UPDATES:ON})'
Get Choice Input [~update_mastermode_choice]
End Condition
Set text [~current_live_updates_setting] to '{TXT:AVCS_LIVE_UPDATES:ON}'
//
Begin Condition : ([~update_mastermode_choice] Equals [~update_choice_TURNOFF] AND [~current_live_updates_setting] Equals 'ON')
Set text [AVCS_LIVE_UPDATES] to 'OFF'
Else If : ([~update_mastermode_choice] Equals [~update_choice_LEAVEON] AND [~current_live_updates_setting] Equals 'OFF')
Set text [AVCS_LIVE_UPDATES] to 'ON'
End Condition
//
Write [Green] 'Continuing Initialization....' to log
//
Set integer [AVCS_SFS_SAVED_requests] value to 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_LIVE_UPDATES'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{TXT:AVCS_LIVE_UPDATES:ON}'
//
Begin Text Compare : [{STATE_FILEEXISTS:AVCS_CORE_SaveFilePath}] Equals '1'
Set text [~avcs_check_for_backupindex] to [{TXT:AVCS_CORE_SaveFilePath}]
Else
Set text [~avcs_check_for_backupindex] to ''
End Condition
Begin Text Compare : [~avcs_check_for_backupindex] Does Not Contain 'AVCS_SFS_SaveFileBackupCount'
Set integer [AVCS_SFS_SaveFileBackupCount] value to 0
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_SFS_SaveFileBackupCount'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{INT:AVCS_SFS_SaveFileBackupCount:0}'
End Condition
Begin Text Compare : [~avcs_check_for_backupindex] Does Not Contain 'AVCS_SFS_CurrentBackupIndex'
Set integer [AVCS_SFS_CurrentBackupIndex] value to 0
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_SFS_CurrentBackupIndex'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{INT:AVCS_SFS_CurrentBackupIndex:0}'
End Condition
//
// Save new Updates Setting to CORE Save File (set temp var to restore current save file path)
Set text [~current_sfs_savefilepath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Set Boolean [AVCS_SFS_SORT_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -- ...
End Condition
End Condition
// ==================== END ====================
// Restore previous save file path
Set text [AVCS_SFS_SaveFilePath] to [~current_sfs_savefilepath]
//
End Condition
//
//
// IF First Run, Core ONLINE and Table/Data NOT in APPS folder yet
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// Create Config Folder on First Use
Set text [~config_file_enc] to [{TXT:~config_table_url}]
Set text [~config_file_enc] to [~config_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
Set text [~config_file_enc] to [~config_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_cfg_path}'
// Create Update Folder on First Use
Set text [~config_file_enc] to [{TXT:~update_table_url}]
Set text [~config_file_enc] to [~config_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
Set text [~config_file_enc] to [~config_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_upd_path}'
// Create Changelog and Update ID Files
Set text [~changelog_latest] to [{TXT:~changelog_url}]
Write (overwrite), '{TXT:~changelog_latest}' to file '{TXT:~changelog_path}'
Write (overwrite), '{INT:~online_update_ID}' to file '{TXT:~update_ID_path}'
//
Else If : ([~check_minor_ver_rollback] Equals True AND [{STATE_FILEEXISTS:~check_cfg_path}] Contains '1')
// NOT First Run, File Exists AND Rollback is TRUE -- LOAD FROM CONFIG File Path
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set text [~config_file_enc] to [{TXT:~check_cfg_path}]
Set text [~configs_load_method] to 'config'
Set Boolean [~configs_load_apps] to True
Else If : ([~check_minor_ver_rollback] Equals False AND [{STATE_FILEEXISTS:~check_upd_path}] Contains '1')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// NOT First Run, AND Offline OR Online Ver matches File Ver AND Rollback is False -- LOAD FROM UPDATE File Path
Set text [~config_file_enc] to [{TXT:~check_upd_path}]
Set Boolean [~configs_load_apps] to True
Else If Text Compare : [{STATE_FILEEXISTS:~check_cfg_path}] Contains '1'
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// NOT First Run, UPD File Does not Exist AND Offline OR Online Ver matches File Ver AND Rollback is False -- LOAD FROM FILE
Set text [~config_file_enc] to [{TXT:~check_cfg_path}]
Set text [~configs_load_method] to 'config'
Set Boolean [~configs_load_apps] to True
Else If : ([~check_minor_ver_rollback] Equals True AND [{STATE_FILEEXISTS:~check_cfg_path}] Does Not Contain '1' AND [~check_core_online] Contains 'true')
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// 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
Set text [~config_file_enc] to [{TXT:~config_table_url}]
Set text [~config_file_enc] to [~config_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
Set text [~config_file_enc] to [~config_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
Write (overwrite), '{TXT:~config_file_enc}' to file '{TXT:~check_cfg_path}'
Set text [~configs_load_method] to 'config'
Else
// IF First Run, Core OFFLINE and Table/Data NOT in APPS folder yet
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
// Clean Up useless folders created (in preparation for New Install of Current Version without benefit of standard updating cleanup methods)
Set text [~avcs_installed_profiles_list_path] to '{VA_APPS}\AVCS\save_files\Util\update\dmp.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_installed_profiles_list_path}] Equals '1'
Set text [~avcs_installed_profiles_list] to [{VA_APPS}\AVCS\save_files\Util\update\dmp.txt]
Begin Condition : ([~avcs_installed_profiles_list] Does Not Equal '' AND [~avcs_installed_profiles_list] Starts With 'AVCS_PROFILE_AVCS')
Inline VB Function: AVCS_GetInstalledProfileNames, wait until execution finishes
Begin Text Compare : [avcs_installed_profiles_names] Does Not Equal ''
Set text [~avcs_profiles_list_path] to '{VA_APPS}\AVCS\avcs_profiles.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_profiles_list_path}] Equals '1'
Set text [~avcs_installed_profiles_list] to [{TXT:~avcs_profiles_list_path}] (Replace '{TXT:~avcs_installed_profiles_names}' with '')
Write (overwrite), '{TXT:~avcs_installed_profiles_list:}' to file '{TXT:~avcs_profiles_list_path}'
Write (overwrite), '{TXT:~avcs_installed_profiles_names:}' to file '{TXT:~avcs_new_profiles_list_path}'
End Condition
End Condition
End Condition
End Condition
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_...
Inline VB Function: AVCS_CheckForAndDeleteConfigFolders, wait until execution finishes
//
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
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
//
Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
Set Boolean [AVCS_INIT_Debug_TRIGGERED] to [Not Set]
Set Boolean [AVCS_PROFILE_SWITCH_SET] to [Not Set]
Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
//
Exit Command
End Condition
//
//
//
// ===================================================================================================
// ====================================TABLE AND DATA DENC LOOP===========================================
// ===================================================================================================
//
Marker: CORE_DENC_LOAD
Begin Text Compare : [~config_file_enc] Starts With '%'
Inline VB Function: AVCS_DATA_DENC, wait until execution finishes
Begin Text Compare : [~config_file] Contains '%22'
Set text [~config_file] to [~config_file] (Replace '%22' with '"')
End Condition
Begin Text Compare : [~config_file] Contains '%27'
Set text [~config_file] to [~config_file] (Replace '%27' with ''')
End Condition
Begin Text Compare : [~config_file] Contains '%0d'
Set text [~config_file] to [~config_file] (Replace '%0d' with '{NEWLINE}')
End Condition
Else
Set text [~config_file] to [~config_file_enc]
End Condition
//
//
//
// ===================================================================================================
// ======================================DATA FILE EDITING SECTION==========================================
// ===================================================================================================
//
// Find out if TABLE or DATA
Begin Boolean Compare : [~data_file_load] Equals True
//
// Overwrite DENC Data to data file path
Begin Text Compare : [~config_file_enc] Does Not Equal [~config_file]
Write (overwrite), '{TXT:~config_file}' to file '{TXT:~check_cfg_path}'
End Condition
//
Begin Boolean Compare : [AVCS_SFS_EDIT_ConfigFile] Equals True
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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 --...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
//
Write [Gray] 'Config Data File opened in Notepad... close this file (saving changes if desired) to load next data file for editing...' to log
// OPEN File in Notepad or Preferred Notepad (If Set)
Run application '{TXT:AVCS_SFS_DefaultNotepad:notepad.exe}' -with parameters '{TXT:~check_cfg_path}' - wait until it completes
Set text [~config_file] to [{TXT:~check_cfg_path}]
//
End Condition
//
End Condition
//
//
//
// ===================================================================================================
// =============================TABLE AND DATA LOAD INLINE FUNCTION===========================================
// ===================================================================================================
//
// LOAD ALL from Text Variable (List) (doesn't save to profile)
Inline VB Function: AVCS_LoadConfigData, wait until execution finishes
//
Begin Boolean Compare : [~data_file_load] Equals True
Set Boolean [~data_file_load] to False
Jump to Marker: CORE_DATA_LOAD
End Condition
//
//
//
// ===================================================================================================
// ====================================CLOSED BETA TEST PROFILE CHECK=======================================
// ===================================================================================================
//
Marker: CORE_MAJ_UPDATE
// Bypass Auth & Major Profile Update Check for Profile Dependent Sub-Modules Loading
Begin Boolean Compare : [~depmod_load] Equals False
Set integer [~avcs_module_mustauth] value to the converted value of {INT:{TXT:~profile_to_init:CORE}_AUTH:0}
Begin Integer Compare : [~avcs_module_mustauth] Does Not Equal 0
Begin Text Compare : [~check_core_online] Contains 'true'
Set text [~avcs_module_hsh_table] to [{TXT:~avcs_module_users_url}]
Begin Text Compare : [~avcs_module_hsh_table] Contains [~avcs_core_guuid_hsh]
Set integer [~max_use_count] value to the converted value of {INT:{TXT:~profile_to_init}_MAXUSE}
Begin Integer Compare : [~max_use_count] Is Greater Than 0
Begin Integer Compare : [~days_used_count] Is Greater Than [~max_use_count]
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
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
//
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
// 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)
Set text [f_core_function] to 'clean up files'
Set text [f_core_module_GUID] to '{TXT:~uuid_apps_path}'
Execute command, 'f_core_main' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
//
Exit Command
//
Else
//
// Generate APROV key for offline authorization (if not already on file)
Write (overwrite), '{TXT:~avcs_core_guuid_apr}' to file '{TXT:~uuid_apps_path}'
//
Get Text Input [~avcs]
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
End Condition
End Condition
//
Else
// ---------------------- USER IS NOT AUTHORIZED -- RETURN MESSAGE ABOUT THIS MODULE / VERSION / AND IF/HOW TO BECOME AUTHORIZED USER -----------------------
Set text [{TXT:~avcs_core_guuid_hsh}] to 'false'
// ====================OFFER UID HASH AND LINK TO/AUTO-OPEN WEBSITE FOR SIGNUP IN CHOICE BOX=========================================================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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 ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// =============================================================================
// ====================OFFER UID HASH AND LINK TO/AUTO-OPEN WEBSITE FOR SIGNUP IN CHOICE BOX=========================================================
Pause 0.05 seconds
Get Choice Input [~avcs_auth_option]
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)'
Begin Text Compare : [~avcs_auth_option] Equals 'Already applied for this Private Beta Test (use temp authorization)'
Set Boolean [~avcs_skip_application] to True
End Condition
Pause 0.05 seconds
Begin Boolean Compare : [~avcs_skip_application] Does Not Equal True
Run application '{TXT:~avcs_core_applications}'
Pause 0.05 seconds
Get Text Input [~avcs]
Else
Set Boolean [~avcs_skip_application] to [Not Set]
End Condition
// =============================================================================
// =============================================================================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
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
Write [Yellow] 'TESTING Can Pause == {BOOL:~avcs_update_canpause}' to log
End Condition
End Condition
Begin Boolean Compare : [~avcs_update_canpause] Equals True
Begin Integer Compare : [~max_use_pause_int] Is Greater Than 0
Begin Integer Compare : [~days_used_count] Is Greater Than [~max_use_pause_int]
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
Write [Blank] 'Thank you for checking out AVCS! I hope to have a public version of this Beta Test soon! -SemlerPDX' to log
Exit Command
Else
Get Text Input [~avcs]
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
End Condition
End Condition
End Condition
// =============================================================================
Else If Text Compare : [~avcs_auth_option] Equals 'Decline participation - cancel and exit (public beta version will be out soon!)'
Write [Blank] 'Thank you for checking out AVCS! I hope to have a public version of this Beta Test soon! -SemlerPDX' to log
Exit Command
End Condition
// =============================================================================
End Condition
Else
// Check for APROV key for offline authorization (if not already on file)
Begin Text Compare : [~module_uuid_hsh_value] Does Not Contain 'true'
// =============================================================================
//
//
// =============================================================================
// ---------------------- CORE OFFLINE DURING FIRST USE OF MUSTAUTH MODULE - USER CANNOT AUTHORIZE -- RETURN MESSAGE ABOUT THIS MODULE / VERSION / AND IF/HOW TO BECOME AUTHORIZED USER -----------------------
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// ---------------------- CORE OFFLINE - USER CANNOT AUTHORIZE -- RETURN MESSAGE ABOUT HOW TO BECOME AUTHORIZED USER -----------------------
// ---------------------- ERROR -- CORE OFFLINE DURING AUTHORIZATION CHECK -- -----------------------
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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 ...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
// =============================================================================
End Condition - Exit when condition met
End Condition
End Condition
//
//
//
// ===================================================================================================
// ====================================MAJOR PROFILE UPDATE CHECK================================================
// ===================================================================================================
//
// MAJOR PROFILE UPDATE CHECK --- ALSO INCLUDES CHECK Days Used is Factor for this Major Update / Previous Profile Use
Convert true/false (boolean) [AVCS_{TXT:~profile_to_init}_MAJ_UPDATE] to true/false (boolean) [~avcs_module_hasupdate]
Begin Boolean Compare : [~avcs_module_hasupdate] Equals True
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}'
Convert true/false (boolean) [AVCS_{TXT:~profile_to_init}_CANPAUSE] to true/false (boolean) [~avcs_update_canpause]
Begin Boolean Compare : [~avcs_update_canpause] Equals True
Set integer [~max_use_count] value to the converted value of {INT:{TXT:~profile_to_init}_MAXUSE}
Begin Integer Compare : [~max_use_count] Is Greater Than 1
// At this point we are fully authorized but can still check use count for restricted uses/closed tests/dev team access
Begin Text Compare : [{STATE_FILEEXISTS:~guid_apps_path}] Contains '1'
Set text [~module_guid] to [{TXT:~guid_apps_path}]
Else
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
Exit Command
End Condition
//
// =============================================================================
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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 =...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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}...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
//
Begin Integer Compare : [~days_used_count] Is Greater Than [~max_use_count]
// ====================================================================================================
// USER MUST DOWNLOAD AND INSTALL NEW PROFILE VERSION - THIS VERSION IS CLOSED / DEPRECIATED / NO LONGER HOSTED
// INFORM USER PROFILE WILL CONTINUE TO FUNCTION BUT WILL NOT RECIEVE FURTHER PATCH UPDATES
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Write [Pink] '~max_use_count = {INT:~max_use_count} || ~days_used_count = {INT:~days_used_count}' to log
End Condition
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// ====================================================================================================
//
// Get User Input -- MAJOR PROFILE UPDATE DOWNLOAD
Pause 0.05 seconds
Get Choice Input [~update_choice]
Begin Text Compare : [~update_choice] Equals 'Open Downloads Webpage (cancel profile initialization)'
Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to False
Set text [~avcs_update_website] to '{TXT:AVCS_{TXT:~profile_to_init}_URL_UPDATE}'
Run application '{TXT:~avcs_update_website:~avcs_core_profiles}'
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
End Condition
Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to [Not Set]
Set text [AVCS_ACTIVE_PROFILE] to [Not Set]
Exit Command
Exit Command
//
// ====================================================================================================
Else
// ================NOTIFY USER OF NEW PROFILE VERSION - EXECUTE SUB COMMAND FUNCTION UPDATE====================================================================================
// CAN CONTINUE TO USE OUTDATED PROFILE BUILD VERSION -- FILES STILL HOSTED AT AVCS CORE - BUT INFORM USER OF END COMING IN (MAX USE) Days
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 7
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:...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// ====================================================================================================
//
// Get User Input -- MAJOR PROFILE UPDATE DOWNLOAD
Pause 0.05 seconds
Get Choice Input [~update_choice]
Begin Text Compare : [~update_choice] Equals 'Open Downloads Webpage (cancel profile initialization)'
Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to False
Set text [~avcs_update_website] to '{TXT:AVCS_{TXT:~profile_to_init}_URL_UPDATE}'
Run application '{TXT:~avcs_update_website:~avcs_core_profiles}'
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
End Condition - Exit when condition met
//
// ====================================================================================================
End Condition
Else
// ================NOTIFY USER OF NEW PROFILE VERSION - EXECUTE SUB COMMAND FUNCTION UPDATE====================================================================================
//
// CAN CONTINUE TO USE OUTDATED PROFILE BUILD VERSION INDEFINITELY
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// ====================================================================================================
//
// Get User Input -- MAJOR PROFILE UPDATE DOWNLOAD
Pause 0.05 seconds
Get Choice Input [~update_choice]
Begin Text Compare : [~update_choice] Equals 'Open Downloads Webpage (cancel profile initialization)'
Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to False
Set text [~avcs_update_website] to '{TXT:AVCS_{TXT:~profile_to_init}_URL_UPDATE}'
Run application '{TXT:~avcs_update_website:~avcs_core_profiles}'
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to [Not Set]
Set text [AVCS_ACTIVE_PROFILE] to [Not Set]
End Condition - Exit when condition met
//
// ====================================================================================================
End Condition
Else
// ====================================================================================================
// USER MUST DOWNLOAD AND INSTALL NEW PROFILE VERSION - THIS VERSION IS CLOSED / DEPRECIATED / NO LONGER HOSTED
// INFORM USER PROFILE WILL CONTINUE TO FUNCTION BUT WILL NOT RECIEVE ANY FURTHER UPDATES
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// ====================================================================================================
//
// Get User Input -- MAJOR PROFILE UPDATE DOWNLOAD
Pause 0.05 seconds
Get Choice Input [~update_choice]
Begin Text Compare : [~update_choice] Equals 'Open Downloads Webpage (cancel profile initialization)'
Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to False
Set text [~avcs_update_website] to '{TXT:AVCS_{TXT:~profile_to_init}_URL_UPDATE}'
Run application '{TXT:~avcs_update_website:~avcs_core_profiles}'
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
End Condition
Inline VB Function: AVCS_CORE_ClearInitVariablesReinitialization, wait until execution finishes
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to [Not Set]
Set text [AVCS_ACTIVE_PROFILE] to [Not Set]
Exit Command
// ====================================================================================================
End Condition
Else
// ====================================================================================================
// CAN CONTINUE - CURRENT VERSION IS HIGHEST VERSION FOR PROFILE BUILD
Begin Boolean Compare : [~check_minor_ver_rollback] Equals True
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
Else
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
End Condition
Pause 0.5 seconds
// ====================================================================================================
End Condition
End Condition
//
//
//
// ===================================================================================================
// ====================================DATA FILE LOADING SECTION================================================
// ===================================================================================================
//
Begin Boolean Compare : [~data_file_load] Equals False
Set integer [~data_index] value to 0
Set integer [~config_data_count] value to the converted value of {INT:AVCS_{TXT:~profile_to_init}_CFG_COUNT}
End Condition
//
// Load All Config Data Files for Module
Marker: CORE_DATA_LOAD
Begin Integer Compare : [~config_data_count] Is Greater Than 0
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Begin Integer Compare : [~data_index] Is Less Than [~config_data_count]
Begin Boolean Compare : [~depmod_load] Equals False
Write [Gray] 'Loading {TXTUPPER:~profile_to_init} Profile configuration Data File {EXP:({INT:~data_index:0} + 1)}' to log
Else
Write [Gray] 'Loading {TXTUPPER:~profile_to_init} Module configuration Data File {EXP:({INT:~data_index:0} + 1)}' to log
End Condition
End Condition
Set integer [~data_index] to [~data_index] plus 1
Begin Integer Compare : [~data_index] Is Less Than Or Equals [~config_data_count]
Set Boolean [~data_file_load] to True
// Evaluate Config Data File Load Method
Begin Boolean Compare : [~configs_updated] Equals True
// APPLY MINOR UPDATE --PATCH-- NOT First Run, AND Online Ver DOES NOT match File Ver AND Ver Rollback is False -- LOAD FROM URL
Set text [~data_file_path] to '{TXT:~module_file_root}\update\avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.cfg'
Begin Text Compare : [{STATE_FILEEXISTS:~data_file_path}] Contains '1'
Set text [~data_file_enc] to [{TXT:~module_file_root}\update\avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.cfg]
Write (overwrite), '{TXT:~data_file_enc}' to file '{TXT:~module_file_root}\config\avcs_{TXTLOWER:~profile_to_init}_data_{INT:~data_index}.cfg'
End Condition
Set text [~data_file_enc] to [{TXT:~module_url_root}/update/avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.htm/]
Set text [~data_file_enc] to [~data_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
Set text [~data_file_enc] to [~data_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
Write (overwrite), '{TXT:~data_file_enc}' to file '{TXT:~module_file_root}\update\avcs_{TXTLOWER:~profile_to_init}_data_{INT:~data_index}.cfg'
Else
Set text [~check_cfg_path] to '{TXT:~module_file_root}\{TXT:~configs_load_method}\avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.cfg'
Begin Text Compare : [{STATE_FILEEXISTS:~check_cfg_path}] Contains '1'
Set text [~data_file_enc] to [{TXT:~module_file_root}\{TXT:~configs_load_method}\avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.cfg]
Else If : ([{STATE_FILEEXISTS:~check_cfg_path}] Does Not Contain '1' AND [~check_core_online] Contains 'true')
// IF First Run, Core ONLINE and Table/Data NOT in APPS folder yet
Set text [~data_file_enc] to [{TXT:~module_url_root}/config/avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.htm/]
Set text [~data_file_enc] to [~data_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
Set text [~data_file_enc] to [~data_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
Write (overwrite), '{TXT:~data_file_enc}' to file '{TXT:~module_file_root}\config\avcs_{TXTLOWER:~profile_to_init}_data_{INT:~data_index}.cfg'
Set text [~data_file_enc] to [{TXT:~module_url_root}/update/avcs_{TXT:~profile_to_init}_data_{INT:~data_index}.htm/]
Set text [~data_file_enc] to [~data_file_enc] (Replace '{TXT:~AVCS_CORE_KEY1}' with '{TXT:~{TXT:~AVCS_CORE_KEY1}}')
Set text [~data_file_enc] to [~data_file_enc] (Trim) (Replace '{TXT:~AVCS_CORE_KEY2}' with '{TXT:~{TXT:~AVCS_CORE_KEY2}}')
Write (overwrite), '{TXT:~data_file_enc}' to file '{TXT:~module_file_root}\update\avcs_{TXTLOWER:~profile_to_init}_data_{INT:~data_index}.cfg'
Else
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
End Condition
End Condition
// Loop Through All Data Files
Set text [~config_file_enc] to [~data_file_enc]
Jump to Marker: CORE_DENC_LOAD
//
End Condition
End Condition
Set Boolean [~configs_updated] to [Not Set]
Set Boolean [~data_file_load] to [Not Set]
Set integer [~config_data_count] value to [Not Set]
//
//
//
// ===================================================================================================
// ====================================DEPENDENT MODULE LOAD SECTION================================================
// ===================================================================================================
//
// Based on Dep Mod Count, Load All Dep Mod Config & Data Files
// Load Dependent Modules based on Dep Mod Count Var, Load All Dep Mod Config & Data Files || AVCS_CORE_DEPMOD_COUNT=1 *(VAS)
Begin Boolean Compare : [~depmod_load] Equals False
Set integer [~depmod_index] value to 0
Set integer [~dep_modules_count] value to the converted value of {INT:AVCS_{TXT:~profile_to_init}_DEPMOD_COUNT:0}
Set integer [AVCS_{TXT:~profile_to_init}_DEPMOD_COUNT] value to [Not Set]
Set text [~primary_init_profile] to [~profile_to_init]
Set text [~primary_init_profileVN] to [~avcs_VN]
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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 = ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
End Condition
//
// Load All Profile Miscellaneous Commands
Inline VB Function: AVCS_LoadAllProfMiscCommands, wait until execution finishes
//
// Clear Config Table Loading Variables from Profile
Set integer [AVCS_{TXT:~profile_to_init}_CFG_COUNT] value to [Not Set]
//
Marker: INIT_MODULE_DEPENDENCY
// Set Module which was just loaded to "TRUE"
Set Boolean [AVCS_{TXT:~profile_to_init}_INIT] to True
Begin Integer Compare : [~dep_modules_count] Is Greater Than 0
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
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 = {...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set integer [~depmod_index] to [~depmod_index] plus 1
Begin Integer Compare : [~depmod_index] Is Less Than Or Equals [~dep_modules_count]
Set Boolean [~depmod_load] to True
Set Boolean [~configs_load_apps] to False
// Loop Through all Dependent Modules
Set text [~profile_to_init] to '{TXT:AVCS_{TXT:~primary_init_profile}_DEPMOD{INT:~depmod_index}_NM}' (Trim) (Replace ' ' with '') (Upper Case)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Begin Condition : [~profile_to_init] Equals '' OR [~profile_to_init] Equals 'Not set'
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
// ---- ---- ---- END ---- ---- ----//
End Condition - Exit when condition met
Jump to Marker: INIT_MODULES_BY_NAME
//
End Condition
End Condition
//
//
Set text [AVCS_CONFIG_TITLE] to [Not Set]
Set Boolean [~depmod_load] to [Not Set]
Set integer [~dep_modules_count] value to [Not Set]
Write [Gray] '{TXTUPPER:~primary_init_profile} Data Load Complete - VoiceAttack is now loading profile....' to log
//
//
// ---- ---- ---- EXIT ---- ---- ----
Begin Boolean Compare : [AVCS_SFS_EDIT_ConfigFile] Equals True
Set Boolean [AVCS_SFS_EDIT_ConfigFile] to [Not Set]
Set text [~avcs_edit_core_check] to '{TXTUPPER:~primary_init_profile}'
Begin Text Compare : [~avcs_edit_core_check] Contains 'CORE'
Set text [AVCS_INIT_PROFILE] to [Not Set]
Set Boolean [AVCS_CORE_INIT] to [Not Set]
Set Boolean [AVCS_CORE_FULLYLOADED] to [Not Set]
Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
Set Boolean [AVCS_PROFILE_SWITCH_SET] to [Not Set]
End Condition
Reset the active profile
End Condition - Exit when condition met
// ---- ---- ---- END ---- ---- ----
//
// ===================================================================================================
// ====================================PROFILE INITIALIZATION END================================================
// ===================================================================================================
//
// Verify Primary Module has been Initialized -else jump to beginning
Marker: INIT_MODULES_COMPLETE
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')
Set text [~primary_module_initialized] to '{BOOL:AVCS_{TXT:AVCS_INIT_PROFILE:CORE}_INIT:false}'
Begin Text Compare : [~primary_module_initialized] Contains 'false'
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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 -...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set Boolean [~configs_load_apps] to False
Jump to Marker: INIT_MODULES_BY_NAME
End Condition
End Condition
//
Set Boolean [AVCS_SFS_DELETE_ConfigFolder] to [Not Set]
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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} ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
//
// ===================================================================================================
// ====================================NEXT PROFILE MODULE SWITCH CHECKS================================================
// ===================================================================================================
//
Begin Condition : ([~next_avcs_profile] Does Not Equal '' AND [~next_avcs_profile] Does Not Equal 'Not set' AND [AVCS_CORE_FULLYLOADED] Equals True)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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')---(...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// -- Re-init SFS Variables in ACTIVE PROFILE format, creating save folders if not yet in place
Set text [AVCS_ACTIVE_PROFILE] to [~primary_init_profile] (Upper Case)
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to [~primary_init_profileVN]
Set Boolean [AVCS_SFS_INIT] to False
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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 ...
End Condition
//
Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
// -- Variables to Load from File (or create file on first run) After CORE has finished intializing profile --
Begin Text Compare : [{STATE_FILEEXISTS:AVCS_SFS_SaveFilePath}] Equals '1'
// ====================================================================================================
// ====================================================================================================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 10
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'
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// ====================================================================================================
// ====================================================================================================
Set text [~data_loaded] to [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}_LOADED]
Set text [~saved_data] to [{TXT:AVCS_SFS_SaveFilePath}]
Begin Condition : ([~saved_data] Does Not Equal '' AND [~data_loaded] Does Not Contain 'complete')
// ====================================================================================================
// ====================================================================================================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 --------'
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// ====================================================================================================
// ====================================================================================================
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Execute command, 'F_SFS_LOAD_ALL' (by name) (and wait until it completes)
Set text [~data_loaded] to [Not Set]
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -...
End Condition
End Condition
// ==================== END ====================
End Condition
Else
// ====================================================================================================
// ====================================================================================================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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'
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
// ====================================================================================================
// ====================================================================================================
Append, '' to file '{TXT:AVCS_SFS_SaveFilePath}'
End Condition
//
Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
//
Begin Condition : ([AVCS_LOAD_OPTIONS] Equals False AND [AVCS_ADVANCED_OPTIONS] Equals False)
Begin Boolean Compare : [AVCS_PROFILE_SWITCH_SET] Does Not Equal True
Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
//
Begin Text Compare : [{NEXTPROFILE}] Equals ''
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
Switch to profile, '{TXT:~next_avcs_profile}' (by name)
//
End Condition
End Condition
Else
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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 ...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Begin Boolean Compare : [AVCS_LOAD_OPTIONS] Equals True
Jump to Marker: AVCS_LOAD_OPTIONS
Else If Boolean Compare : [AVCS_ADVANCED_OPTIONS] Equals True
Jump to Marker: AVCS_ADVANCED_OPTIONS
End Condition
End Condition
//
End Condition
//
//
//
// ===================================================================================================
// ====================================CORE PROFILE SFS LOAD SECTION================================================
// ===================================================================================================
//
// ==================IF AVCS_CORE IS ACTIVE PROFILE===========================================================
Set integer [AVCS_FIRST_RUN] to [AVCS_FIRST_RUN] plus 1
Marker: INIT_CORE_COMPLETE
Set text [AVCS_ACTIVE_PROFILE] to 'CORE'
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to '{TXTNUM:"{PROFILE_AT3}"}'
Set Boolean [AVCS_RELOAD_CORE] to True
//
// -- Variables to Load from File (or create file on first run) After CORE has finished intializing profile --
Begin Text Compare : [{STATE_FILEEXISTS:AVCS_SFS_SaveFilePath}] Equals '1'
Set text [~saved_data] to [{TXT:AVCS_SFS_SaveFilePath}]
Begin Text Compare : [~saved_data] Does Not Equal ''
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set integer [AVCS_FIRST_RUN] value to [Not Set]
Execute command, 'F_SFS_LOAD_ALL' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -...
End Condition
End Condition
// ==================== END ====================
Begin Condition : [AVCS_FIRST_RUN] Equals 0 OR [~saved_data] Does Not Contain 'AVCS_FIRST_RUN'
Set integer [AVCS_FIRST_RUN] value to 1
Else
Set integer [AVCS_FIRST_RUN] to [AVCS_FIRST_RUN] plus 1
End Condition
End Condition
Set text [~data_loaded] to [Not Set]
Else
// Ensure CORE Save File Paths are current active set
Set Boolean [AVCS_SFS_INIT] to False
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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 ...
End Condition
//
Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
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}'
//
End Condition
// =============================================================================
//
Set text [~avcs_updated_profiles_list_path] to '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
Begin Condition : ([{STATE_FILEEXISTS:~avcs_updated_profiles_list_path}] Equals '1' AND [AVCS_UPDATED] Equals True)
Set text [~avcs_updated_profiles_list] to [{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt]
Begin Text Compare : [~avcs_updated_profiles_list] Does Not Equal ''
Inline VB Function: AVCS_GetUpdatedProfileName, wait until execution finishes
Set text [~avcs_updated_profile_shortname] to '{TXTSUBSTR:~avcs_updated_profile_name:0:10}'
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])
Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
Write (overwrite), '' to file '{VA_APPS}\AVCS\save_files\Util\update\avcs_last_updated_profile.txt'
// Switch Save File Location to Core Save File, set temp holding var
Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
End Condition
//
Set integer [AVCS_SFS_SAVED_requests] value to 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_PREFERRED_PROFILE'
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Set Boolean [AVCS_SFS_SORT_bypass] to True
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Execute command, 'F_SFS_DELETE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -- ...
End Condition
End Condition
// ==================== END ====================
Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [Not Set]
End Condition
End Condition
End Condition
End Condition
//
//
//
// ===================================================================================================
// ====================================FIRST PROFILE USE SECTION================================================
// ===================================================================================================
//
// Save FIRSTRUN Information to file (bypassing this choice in future initializations)
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_FIRST_RUN'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to '{INT:AVCS_FIRST_RUN}'
//
Begin Condition : ([AVCS_FIRST_RUN] Equals 1 AND [{PROFILE}] Contains 'AVCS CORE')
// Get List of Installed AVCS4 Profiles from list
Set text [~avcs_profiles_list] to [{TXT:~avcs_profiles_list_path}]
Set text [~avcs_core_profile_name] to '{TXT:~avcs_profiles_path}\avcs_core_profile.txt'
Begin Text Compare : [{STATE_FILEEXISTS:~avcs_core_profile_name}] Equals '1'
Set text [~avcs_core_profile] to [{TXT:~avcs_core_profile_name}]
End Condition
Inline VB Function: AVCS_GetProfilesList, wait until execution finishes
// If the only profile listed is NOT this profile (AVCS CORE) then provide Get Choice Box
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 '')
Set text [~avcs_profiles_default] to '{TXT:~avcs_core_profile} (none - cancel)'
Set text [~avcs_installed_profiles] to [~avcs_profiles_list] (Replace '{TXT:~avcs_core_profile}' with '{TXT:~avcs_profiles_default}')
Begin Text Compare : [~avcs_user_profiles_list] Does Not Equal ''
Set text [~avcs_installed_profiles] to '{TXT:~avcs_installed_profiles}{TXT:~avcs_user_profiles_list:}'
End Condition
// If preferred already set, add flag to it's name in the Get Choice box
Begin Text Compare : [AVCS_PREFERRED_PROFILE] Does Not Equal ''
Begin Text Compare : [~avcs_installed_profiles] Contains [AVCS_PREFERRED_PROFILE]
Set text [~avcs_preferred_current] to '{TXT:AVCS_PREFERRED_PROFILE} (preferred)'
Set text [~avcs_installed_profiles] to [~avcs_installed_profiles] (Replace '{TXT:AVCS_PREFERRED_PROFILE}' with '{TXT:~avcs_preferred_current}')
End Condition
End Condition
Set text [~previous_preferred_profile] to '{TXT:AVCS_PREFERRED_PROFILE:}'
Get Choice Input [AVCS_PREFERRED_PROFILE]
Begin Condition : [AVCS_PREFERRED_PROFILE] Equals '' OR [AVCS_PREFERRED_PROFILE] Has Not Been Set OR [AVCS_PREFERRED_PROFILE] Equals [~avcs_profiles_default]
// If they chose nothing, restore previous preferred profile setting
Begin Condition : ([~previous_preferred_profile] Does Not Equal '' AND [~previous_preferred_profile] Does Not Equal 'Not set')
Set text [AVCS_PREFERRED_PROFILE] to [~previous_preferred_profile]
Write [Yellow] 'Preferred Profile not changed from current: {TXT:AVCS_PREFERRED_PROFILE}' to log
Write [Gray] 'Say 'Open Core Options' anytime to change or set a new profile' to log
Else
// If they chose nothing, and it wasn't previously set, clear the variable
Set text [AVCS_PREFERRED_PROFILE] to [Not Set]
Write [Yellow] 'Preferred Profile not set.... Automatic Profile Switching disabled.' to log
Write [Gray] 'Say 'Open Core Options' anytime to change or set a new profile' to log
End Condition
//
//
Else
// If they chose a profile:
// Continue Initialization with FIRSTRUN Set To 2 or greater (bypassing this choice at end)
Begin Integer Compare : [AVCS_FIRST_RUN] Is Less Than 2
Begin Integer Compare : [AVCS_FIRST_RUN] Equals 0
Set integer [AVCS_FIRST_RUN] value to 2
Else
Set integer [AVCS_FIRST_RUN] to [AVCS_FIRST_RUN] plus 1
End Condition
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests:1}] to 'AVCS_FIRST_RUN'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests:1}] to '{INT:AVCS_FIRST_RUN}'
End Condition
//
// Save new Auto-Switch Profile to CORE Save File
Set integer [AVCS_SFS_SAVED_requests] to [AVCS_SFS_SAVED_requests] plus 1
Set text [AVCS_SFS_SAVED_name_{INT:AVCS_SFS_SAVED_requests}] to 'AVCS_PREFERRED_PROFILE'
Set text [AVCS_SFS_SAVED_value_{INT:AVCS_SFS_SAVED_requests}] to [AVCS_PREFERRED_PROFILE]
//
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
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...
End Condition
//
//
// Switch Save File Location to Core Save File, set temp holding var
Begin Text Compare : [AVCS_SFS_SaveFilePath] Does Not Equal [AVCS_CORE_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [AVCS_SFS_SaveFilePath]
Set text [AVCS_SFS_SaveFilePath] to [AVCS_CORE_SaveFilePath]
End Condition
//
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
Set Boolean [AVCS_SFS_SORT_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Text Compare : [~avcs_current_SaveFilePath] Does Not Equal ''
Set text [AVCS_SFS_SaveFilePath] to [~avcs_current_SaveFilePath]
Set text [~avcs_current_SaveFilePath] to [Not Set]
End Condition
//
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 --...
End Condition
End Condition
// ==================== END ====================
//
Write [Yellow] 'Preferred Profile Saved as: {TXT:AVCS_PREFERRED_PROFILE}' to log
Write [Green] 'AVCS CORE will always load itself, then load and switch to your preferred profile.' to log
Write [Gray] 'Say 'Open Core Options' anytime to change or set a new profile' to log
//
End Condition
// Proper initialization clears event log - provide short time for reading important new profile message
Write [Yellow] 'Continuing Initialization....' to log
Pause 1 second
Else
// Cannot provide list of AVCS Profile for auto-switch because no profiles listed other than CORE
End Condition
End Condition
//
Begin Text Compare : [{STATE_FILEEXISTS:AVCS_SFS_SaveFilePath}] Equals '1'
Set text [~avcs_save_file_index_check] to [{TXT:AVCS_SFS_SaveFilePath}]
Begin Text Compare : [~avcs_save_file_index_check] Does Not Contain 'AVCS_SFS_CurrentBackupIndex'
Append, '{NEWLINE}AVCS_SFS_CurrentBackupIndex=0' to file '{TXT:AVCS_SFS_SaveFilePath}'
End Condition
Begin Text Compare : [~avcs_save_file_index_check] Does Not Contain 'AVCS_SFS_SaveFileBackupCount'
Append, '{NEWLINE}AVCS_SFS_SaveFileBackupCount=0' to file '{TXT:AVCS_SFS_SaveFilePath}'
End Condition
Begin Text Compare : [~avcs_save_file_index_check] Does Not Contain 'AVCS_FIRST_RUN'
Append, '{NEWLINE}AVCS_FIRST_RUN={INT:AVCS_FIRST_RUN:3}' to file '{TXT:AVCS_SFS_SaveFilePath}'
End Condition
Set text [~avcs_save_file_index_check] to [{TXT:AVCS_SFS_SaveFilePath}]
Begin Text Compare : [~avcs_save_file_index_check] Contains '{NEWLINE}{NEWLINE}'
Set text [~avcs_save_file_index_check] to [~avcs_save_file_index_check] (Replace '{NEWLINE}{NEWLINE}' with '{NEWLINE}')
Write (overwrite), '{TXT:~avcs_save_file_index_check}' to file '{TXT:AVCS_SFS_SaveFilePath}'
End Condition
Else
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}'
End Condition
//
Begin Integer Compare : [AVCS_SFS_SAVED_requests] Is Greater Than 0
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_FULLYLOADED] Equals False AND [AVCS_PROFILE_SWITCH_SET] Equals False)
Set Boolean [AVCS_SFS_BACKUP_bypass] to False
Else
Set Boolean [AVCS_SFS_BACKUP_bypass] to True
End Condition
Set Boolean [AVCS_SFS_SORT_bypass] to True
Execute command, 'F_SFS_TO_FILE' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 --...
End Condition
End Condition
// ==================== END ====================
End Condition
//
//
//
// ===================================================================================================
// ====================================CORE PROFILE RESET SECTION================================================
// ===================================================================================================
//
Begin Boolean Compare : [AVCS_CORE_FULLYLOADED] Equals False
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set Boolean [AVCS_CORE_FULLYLOADED] to True
Begin Condition : ([AVCS_UPDATED] Equals True AND [~avcs_updated_profile_name] Contains 'AVCS' AND [{PROFILE}] Does Not Equal [~avcs_updated_profile_name])
Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
Switch to profile, '{TXT:~avcs_updated_profile_name}' (by name)
End Condition
Reset the active profile
Jump to Marker: AVCS_CORE_END
End Condition
//
//
//
// ===================================================================================================
// ====================================CORE TITLE FINALIZATION SECTION================================================
// ===================================================================================================
//
Marker: DISPLAY_CORE_TITLE
Set Boolean [AVCS_RELOAD_CORE] to [Not Set]
//
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}'
Set text [AVCS_ACTIVE_PROFILE_VERSION] to [~profile_ver]
//
Set text [~profile_date] to '{TXT:AVCS_{TXT:AVCS_ACTIVE_PROFILE}_VER_DATE}'
Set text [~avcs_profile_title] to '{TXT:AVCS_{TXT:AVCS_ACTIVE_PROFILE}_VER_TITLE}' (Replace '(((ProfVer)))' with '{TXT:~profile_ver}')
Set text [~avcs_profile_title] to [~avcs_profile_title] (Replace '(((VerDate)))' with '{TXT:~profile_date}')
Set text [AVCS_AFM_SoundFilePath] to [AVCS_AFM_SoundFilePath] (Replace '(((VA_SOUNDS)))' with '{VA_SOUNDS}')
Set text [AVCS_AFM_SoundFile] to [AVCS_AFM_SoundFilePath] (Replace '(((Channel)))' with '{TXT:AVCS_AFM_Audio_Channel:LEFT}')
//
Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_FULLYLOADED] Equals True AND [AVCS_PROFILE_SWITCH_SET] Equals False)
Begin Condition : ([AVCS_Debug_ON] Equals False AND [AVCS_LogClearing_ON] Equals False)
Inline C# Function: VA.ClearLog
End Condition
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Write [Blank] 'ID:{INT:~cmd_instance_id} - {TXT:~avcs_profile_title}' to log
Else
Write [Blank] '{TXT:~avcs_profile_title}' to log
End Condition
//
// Profile Command Miscellaneous Operating System - Pre-Conclusion Command Fire (var fixes, etc.)
Set integer [~avcs_pcmos_pre] value to the converted value of {INT:AVCS_{TXT:AVCS_ACTIVE_PROFILE:CORE}_PCMOS_PRE:0}
Begin Integer Compare : [~avcs_pcmos_pre] Is Greater Than 0
Set text [~~AVCS_QCC_COMMAND] to '{TXT:AVCS_{TXT:AVCS_ACTIVE_PROFILE:CORE}_DATA_MISC_{INT:~avcs_pcmos_pre}}'
Execute command, 'F_QCC_RUN' (by name) (and wait until it completes)
End Condition
//
End Condition
// =============================================================================
//
//
//
// Handle International Decimal Separators
Inline VB Function: AVCS_RecastWithCulturalDecimalSeparator, wait until execution finishes
// Initialize PTT Key Down Monitor (if PTT on)
Begin Boolean Compare : [AVCS_CORE_RadioButtons_ON] Equals True
Set integer [AVCS_PTT_MODE] value to [Not Set]
Execute command, 'F_QCC_PTTMON' (by name)
Begin Integer Compare : [AVCS_CORE_PTT_MODE] Equals 1
Set integer [AVCS_PTT_MODE] value to 1
Stop VoiceAttack listening
End Condition
Else
Set Boolean [AVCS_RadioButtons_ON] to False
End Condition
//
// ===================================================================================================
// ====================================FINAL PROFILE SWITCH CHECKS================================================
// ===================================================================================================
//
// Skip Final profile switch checks if containing old version
Begin Boolean Compare : [AVCS_UPDATED] Equals True
Begin Condition : [{PREVIOUSPROFILE}] Equals [AVCS_MAJOR_UPDATE] OR [{NEXTPROFILE}] Equals [AVCS_MAJOR_UPDATE]
Jump to Marker: AVCS_CORE_END
End Condition
End Condition
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Equals 3
Set text [~check_switchfrom_profile] to '{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}' (Trim) (Replace 'AVCS' with '') (Upper Case)
Set text [~check_switchfrom_init] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INITIALIZED:false}'
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 8
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...
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
Set text [~check_switchfrom_profile] to [Not Set]
Set text [~check_switchfrom_init] to [Not Set]
//
//
Set text [~check_switchfrom_profile] to '{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}' (Upper Case)
Begin Condition : ([~check_switchfrom_profile] Contains 'AVCS' AND [~check_switchfrom_profile] Does Not Contain 'CORE' AND [AVCS_PROFILE_SWITCH_SET] Does Not Equal True)
Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
// --COMING FROM AVCS PROFILE THAT MAY NOT BE FULLY INITIALIZED ---
Set text [~check_switchfrom_profile] to '{TXTALPHA:"{PREVIOUSPROFILE_AT3}"}' (Trim) (Replace 'AVCS' with '') (Upper Case)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
Set text [~check_switchfrom_init] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INIT:false}' (Lower Case)
Set text [~primary_module_fully_initialized] to '{BOOL:AVCS_{TXT:~check_switchfrom_profile}_INITIALIZED:false}' (Lower Case)
//
Begin Condition : ([~check_switchfrom_init] Contains 'true' AND [~primary_module_fully_initialized] Does Not Contain 'true')
// --COMING FROM AVCS PROFILE THAT HAS BEEN LOADED BUT IS NOT FULLY INITIALIZED ---
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 3
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
//
Set text [AVCS_ACTIVE_PROFILE] to [~check_switchfrom_profile]
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to '{TXTNUM:"{PREVIOUSPROFILE_AT3}"}'
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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 ...
End Condition
//
Set Boolean [AVCS_SFS_INIT] to [Not Set]
Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
//
//
Set text [~data_loaded] to [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}_LOADED]
Set text [~saved_data] to [{TXT:AVCS_SFS_SaveFilePath}]
Begin Condition : ([~saved_data] Does Not Equal '' AND [~data_loaded] Does Not Equal 'complete')
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Execute command, 'F_SFS_LOAD_ALL' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -...
End Condition
End Condition
// ==================== END ====================
//
End Condition
Set text [~data_loaded] to [Not Set]
Set text [~saved_data] to [Not Set]
//
Set text [~check_switchfrom_profile] to [Not Set]
Set text [~check_switchfrom_init] to [Not Set]
Set text [~primary_module_fully_initialized] to [Not Set]
//
Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
Begin Text Compare : [{NEXTPROFILE}] Equals ''
Switch to profile, '{PREVIOUSPROFILE}' (by name)
End Condition
//
End Condition
End Condition
//
Else
Begin Text Compare : [~check_switchfrom_profile] Does Not Contain 'AVCS'
// else coming from non-AVCS profile - check for PREFERRED PROFILE and switch to if set
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)
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 2
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
End Condition
End Condition
Set Boolean [AVCS_PROFILE_SWITCH_SET] to True
Begin Text Compare : [{NEXTPROFILE}] Equals ''
Switch to profile, '{TXT:AVCS_PREFERRED_PROFILE}' (by name)
End Condition
//
End Condition
End Condition
End Condition
//
//
// ---- ---- ---- EXIT ---- ---- ----
Marker: AVCS_CORE_END
//
// --Checking for Switch-Back to Fully Initialized AVCS4 Profile to Reload Save File if needed ---
Set text [~check_switchto_profile] to '{TXTALPHA:"{NEXTPROFILE_AT3}"}' (Upper Case)
Begin Condition : ([~check_switchto_profile] Contains 'AVCS' AND [~check_switchto_profile] Does Not Contain 'AVCSCORE')
Begin Condition : ([{CMDACTION}] Equals 'ProfileUnloadChange' AND [AVCS_CORE_INIT] Equals True AND [AVCS_CORE_FULLYLOADED] Equals True)
Set text [~check_switchto_profile] to '{TXTALPHA:"{NEXTPROFILE_AT3}"}' (Replace 'AVCS' with '') (Upper Case)
Set text [~check_switchto_init] to '{BOOL:AVCS_{TXT:~check_switchto_profile}_INIT:false}' (Lower Case)
Set text [~switchto_module_fully_initialized] to '{BOOL:AVCS_{TXT:~check_switchto_profile}_INITIALIZED:false}' (Lower Case)
Begin Condition : ([~check_switchto_init] Contains 'true' AND [~switchto_module_fully_initialized] Contains 'true')
// --SWITCHING BACK TO AVCS4 PROFILE THAT HAS BEEN LOADED AND IS FULLY INITIALIZED -- RELOAD SAVE FILE BEFORE SWITCHING ---
//
Set text [AVCS_ACTIVE_PROFILE] to [~check_switchto_profile]
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}] to '{TXTNUM:"{NEXTPROFILE_AT3}"}'
Set text [AVCS_SFS_{TXT:AVCS_ACTIVE_PROFILE}_LOADED] to [Not Set]
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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 ...
End Condition
//
Set Boolean [AVCS_SFS_INIT] to [Not Set]
Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
End Condition
// ==================== END ====================
//
Set text [~saved_data] to [{TXT:AVCS_SFS_SaveFilePath}]
Begin Text Compare : [~saved_data] Does Not Equal ''
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
Execute command, 'F_SFS_LOAD_ALL' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -...
End Condition
End Condition
// ==================== END ====================
//
End Condition
//
Set text [~saved_data] to [Not Set]
Set text [~check_switchto_profile] to [Not Set]
Set text [~check_switchto_init] to [Not Set]
Set text [~switchto_module_fully_initialized] to [Not Set]
//
End Condition
End Condition
End Condition
//
//
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)
Begin Text Compare : [AVCS_ACTIVE_PROFILE] Does Not Equal 'CORE'
Set text [AVCS_ACTIVE_PROFILE] to 'CORE'
End Condition
// ==================== SUB ====================
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_CMD_RID] value as random from 1111 to 4444
Set integer [~avcs_sub_CMD_VID] value to the converted value of {EXP:({INT:AVCS_CMD_RID:500} + 234)}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 5
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...
End Condition
//
// Ensure CORE SFS Path Variables are set following switch back from AVCS4 Profile(s)
Execute command, 'F_CORE_SFS' (by name) (and wait until it completes)
//
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
// Evaluate Return ID against Valid Increment Send Error to Log if not equal
Set integer [~avcs_sub_CMD_VID] value to the converted value of {INT:AVCS_CMD_RID:500}
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Begin Integer Compare : [~avcs_sub_CMD_VID] Does Not Equal [AVCS_CMD_RID]
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 4
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...
// Prepare and send debug messages to the core function via "-log" parameter for live output (if Lv.3 or higher Debug Mode)
Begin Integer Compare : [AVCS_Debug_QID] Is Greater Than Or Equals 3
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
Else
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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 -...
End Condition
End Condition
// ==================== END ====================
Say, '{TXT:AVCS_TTS_COMMON_InitializationComplete:Core initialization error detected}'
//
Begin Boolean Compare : [AVCS_UPDATED] Equals True
Execute command, 'F_CORE_UPDATE' (by name)
End Condition
//
End Condition
//
Marker: AVCS_CMD_EXIT
Begin Boolean Compare : [AVCS_Debug_ON] Equals True
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 9
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...
Begin Condition : ([{CMDACTION}] Equals 'Profile' AND [AVCS_CORE_FULLYLOADED] Equals True AND [AVCS_RELOAD_CORE] Does Not Equal True)
Set integer [AVCS_Debug_QMSG] to [AVCS_Debug_QMSG] plus 1
Set integer [AVCS_Debug_WCLR_{INT:AVCS_Debug_QMSG}] value to 2
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...
End Condition
Execute command, 'f_core_debug -log' (by name) (and wait until it completes)
End Condition
//
Begin Boolean Compare : [AVCS_REINIT] Equals True
Pause 2 seconds
Set Boolean [AVCS_REINIT] to [Not Set]
End Condition
// ---- ---- ---- END ---- ---- ----
Comments