Please help me
This work same the first time, if i select once again,not work. Why ?
Thank
#include <GuiConstants.au3>
$file = FileOpen("C:\file.csv", 0)
$data = "string1|string2|string3|string4|Exit"
$sGUI = GUICreate("WinBar App", 100, 20, @DesktopWidth / 2 + 320, @DesktopHeight / 170, BitOR($WS_POPUP, $WS_EX_TOPMOST), $WS_EX_TOOLWINDOW)
$sInput = GUICtrlCreateCombo("", -1, -1, 102, 22)
GUICtrlSetData($sInput, $data)
GUISetState()
WinSetOnTop($sGUI, "", 1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $sInput
$sRead = GUICtrlRead($sInput)
If $sRead = "EXIT" Then
Exit
Else
ToDo()
EndIf
EndSwitch
WEnd
Func ToDo()
$sWFound= ''
While 1
$line = FileReadLine($file)
If @error = -1 Then ExitLoop
If StringInStr(" "&$line,$sRead) > 0 Then
$sWFound &= $line & @LF
EndIf
Wend
WinActivate("UEStudio", "")
$array = StringSplit($sWFound, ';', 1)
$file = FileOpen("test.txt", 1)
FileWriteLine($file, $array[1] & @CRLF)
FileWriteLine($file, $array[2] & @CRLF)
FileWriteLine($file, $array[3] & @CRLF)
Send($array[1])
send("{TAB}")
Send($array[2])
send("{TAB}")
Send($array[3])
EndFunc