This is just a lazy way to try and get someonelse to write this code for me.
Hilarious... However, thanks to
this bug, you may not actually be able to replicate this:
I would list the items that can be assigned to slots instead:
Equip [Fire Extinguisher;First Aid Kit;Flashlight;Scanner] slot[1..5]Say, '{CMDSEGMENT:1}, slot {CMDSEGMENT:3}?'
Wait for spoken response: 'yes;no'
Begin Text Compare : [~responsee] Does Not Equal 'yes'
Write [Blue] 'Assignment cancelled.' to log
Say, 'Assignment cancelled.'
End Condition - Exit when condition met
Set Text [>>slot{CMDSEGMENT:3}] to '{CMDSEGMENT:1}' (save value to profile)
Set Text [>>slotItems] to '{TXT:>>slot1};{TXT:>>slot2};{TXT:>>slot3};{TXT:>>slot4};{TXT:>>slot5}'
Write [Blue] 'Slot{CMDSEGMENT:3} mapped to '{CMDSEGMENT:1}'' to log
Say, 'Slot{CMDSEGMENT:3} mapped to '{CMDSEGMENT:1}'' (and wait until it completes)
Reset the active profile
But if you want to use dictation:
Dictate slot[1..5]Say, 'Speak the item for slot {CMDSEGMENT:1}'
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Say, '{DICTATION}, slot {CMDSEGMENT:1}?'
Wait for spoken response: 'yes;no'
Begin Text Compare : [~responsee] Does Not Equal 'yes'
Write [Blue] 'Assignment cancelled.' to log
Say, 'Assignment cancelled.'
End Condition - Exit when condition met
Set Text [>>slot{CMDSEGMENT:1}] to '{DICTATION}' (save value to profile)
Set Text [>>slotItems] to '{TXT:>>slot1};{TXT:>>slot2};{TXT:>>slot3};{TXT:>>slot4};{TXT:>>slot5}'
Write [Blue] 'Slot{CMDSEGMENT:1} mapped to '{TXT:>>slot{CMDSEGMENT:1}}'' to log
Say, 'Slot{CMDSEGMENT:1} mapped to '{TXT:>>slot{CMDSEGMENT:1}}'' (and wait until it completes)
Reset the active profile
[Equip;Switch to;Use;] [{TXT:>>slotItems};Slot 1;Slot 2;Slot 3;Slot 4;Slot 5]Begin Condition : [{CMDSEGMENT:1}] Equals 'Slot 1' OR ([{CMDSEGMENT:1}] Equals [>>slot1] AND [>>slot1] Has Been Set)
Press 1 key and hold for 0,06 seconds and release
Else If : [{CMDSEGMENT:1}] Equals 'Slot 2' OR ([{CMDSEGMENT:1}] Equals [>>slot2] AND [>>slot2] Has Been Set)
Press 2 key and hold for 0,06 seconds and release
Else If : [{CMDSEGMENT:1}] Equals 'Slot 3' OR ([{CMDSEGMENT:1}] Equals [>>slot3] AND [>>slot3] Has Been Set)
Press 3 key and hold for 0,06 seconds and release
Else If : [{CMDSEGMENT:1}] Equals 'Slot 4' OR ([{CMDSEGMENT:1}] Equals [>>slot4] AND [>>slot4] Has Been Set)
Press 4 key and hold for 0,06 seconds and release
Else If : [{CMDSEGMENT:1}] Equals 'Slot 5' OR ([{CMDSEGMENT:1}] Equals [>>slot5] AND [>>slot5] Has Been Set)
Press 5 key and hold for 0,06 seconds and release
End Condition
This checks whether the slot has been assigned, as otherwise a lower slot may be matched if a higher slot is spoken, and both are "Not Set".
This command should run when the profile loads, to retrieve the previously set values:
Profile SetupBegin Boolean Compare : [>>profileSetup] Does Not Equal True
Set Text [>>slot1] to [Saved Value]
Set Text [>>slot2] to [Saved Value]
Set Text [>>slot3] to [Saved Value]
Set Text [>>slot4] to [Saved Value]
Set Text [>>slot5] to [Saved Value]
Set Text [>>slotItems] to '{TXT:>>slot1};{TXT:>>slot2};{TXT:>>slot3};{TXT:>>slot4};{TXT:>>slot5}'
Set Boolean [>>profileSetup] to True
Reset the active profile
End Condition
This sets a flag, because the profile reset would otherwise cause a loop.
EDIT:
The profile is attached, merry Christmas.