Jump to content

maurocav

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by maurocav

  1. Please i need still a help: I ave more same strings within a file,how delete all doubles ? Tank
  2. Tank you Iave resolved with $WinText = WinGetText('Program') best regard
  3. And if beginning and end of visible text is unknow ? best regard
  4. I ave this tried but not work Other examples ave not found please help me #include <ExcelCOM_UDF.au3> Dim $FilePat WinActivate("Microsoft Excel", "") $FilePath = ObjGet("","Microsoft Excel") $FilePat = ControlGetHandle($FilePath, "", "") $File = _ExcelBookOpen($FilePat); Open the workbook Local $cell = _ExcelReadCell($File,"A5") MsgBox(0, "", $cell)
  5. Please help me I ave this,but result 0 Tank #include <ExcelCOM_UDF.au3> Dim $FilePat WinActivate("Microsoft Excel", "") $FilePath = ControlGetHandle("Microsoft Excel", "", "test.xls") $File = _ExcelBookOpen($FilePath); Open the workbook Local $cell = _ExcelReadCell($File,"A5") MsgBox(0, "", $cell)
  6. I ave already running a instance of Excel (test.xls) How can it paste into $file ? like this $File = _ExcelBookOpen($FilePath) ; Open the workbook Local $cell = _ExcelReadCell($FilePath,"e5") .... Tank
  7. Why it work with FileOpenDialog and not with FileOpen? Tank #include <file.au3> #include <GUICONSTANTS.au3> Global $a_csv ;$s_Path = FileOpenDialog("Select csv File", @ScriptDir, "csv (*.csv)") $s_Path = FileOpen("test.csv", 0) If @error Then MsgBox(4096, "", "No File(s) chosen") Exit Else _FileReadToArray($s_Path, $a_csv) GUICreate("csv Listview", 220, 250, -1, -1) $listview = GUICtrlCreateListView("Col1 |Col2 ", 10, 10, 200, 210) GuiSetState() For $i = 1 To UBound($a_csv) - 1 $s_temp = StringReplace($a_csv[$i], ",", "|") GUICtrlCreateListViewItem($s_temp, $listview) Next EndIf While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Exit
  8. Thank you Bert ,but i know to here: #include <GuiConstants.au3> $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() $file = FileOpen("C:\file.csv", 0) $sWFound= '' While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop If StringInStr(" "&$line,$sRead) > 0 Then $sWFound &= $line & @LF EndIf WEnd EndFunc Do you write me the rest ? tank you
  9. Please help me,i need this: Search from combo a|b|c| into csv file x;y;z;a d;a;y;z s;b;k;r populate the same combo wiht the line found select 1 line split line into array Tank you very much
  10. 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
  11. Tank , it work fine !
  12. Not work, $line is empty tank
  13. Please help me: $file = FileOpen("test.txt", 0) $word=InputBox("Question", "What word?", "", "", -1, -1) While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop if StringInStr(" "&$line,$word)>0 then MsgBox(1, "Found"& $word, $line) Wend ClipPut($line) i need to copy $line into clipboard tank
×
×
  • Create New...