Hi, I have a script that presses the keys A, then S, then D, then F.
I want to then send a SPACE after one of those letters depending on which item on my combobox is selected. here is how my code looks like
Func Example()
Local $idComboBox = GUICtrlCreateCombo("After A", 20, 20, 150, 20)
GUICtrlSetData($idComboBox, "After S|After D|After F", "After A")
; Display the GUI.
GUISetState(@SW_SHOW, $hGUI)
ControlSend("NotePad","","","A")
Sleep (150)
ControlSend("NotePad","","","S")
Sleep (150)
ControlSend("NotePad","","","D")
Sleep (150)
ControlSend("NotePad","","","F")
Sleep (150)
I tried to a line like this after each of the other command but it didnt work.
If $idComboBox = "After A" Then ControlSend("NotePad","","","{SPACE}")
If $idComboBox = "After S" Then ControlSend("NotePad","","","{SPACE}")
If $idComboBox = "After D" Then ControlSend("NotePad","","","{SPACE}")
If $idComboBox = "After F" Then ControlSend("NotePad","","","{SPACE}")
What would be the best way?