Jump to content

BlueLord

Active Members
  • Posts

    29
  • Joined

  • Last visited

BlueLord's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hello, Basically I want to know if the value of Status 5 is less than the value of Minim from Part 1. If it's smaller then I want to write in a file certain data, such Part1 and difference values ​​between Minim and Status 5. Thanks,
  2. Hello everybody, I want to start a script and did some research on the forum but I have not a clearly answer for a question about SQL database search. It is possible to compare a value from a column with another value from another column but the same row? In attachment I put a representative picture for my question Thanks, Have a nice Week!!!
  3. Hy, I have tries the version with arrayunique #include <file.au3> #include <Array.au3> Dim $aRecords $input = "input.txt" $output = FileOpen("output.txt", 1) _FileReadToArray($input, $aRecords) $aNewArray = _ArrayUnique($aRecords) _FileWriteFromArray($output,$aNewArray) FileClose($output) But it put only a uniq value from line. This is the script i have tried to build, but my programing skills are not so good $file1 = FileOpen ( "input.txt", 0 ) $file2 = FileOpen ( "output.txt", 1 ) While 1 For $_I = 1 To 5 $line = FileReadLine ( $file1 ) If @error = -1 Then ExitLoop ;how to compare lines Next FileWrite ( $file2, $line & @Crlf ) Wend FileClose ( $file1 ) FileClose ( $file2 ) ShellExecute ( "output.txt") In atachament i put the input file and output file so i want to be. input.txt output.txt
  4. Hy all, I have a file with 100 entries, each 10 entries are the same: entries.txt 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 etc until 100 entries. I need to make a script which read 10 lines check if value is the same and write only an entry on new file new.txt 1 2 3 4 5 6 etc until 10 entries Some hints exm Thanks
  5. yes! it's ok thanks. three times was like exemple
  6. sorry.... i have this file test.txt with 1 2 3 in new file i need to copy the content of initial file 3 times in same order 1 2 3 1 2 3 1 2 3
  7. Hy, Where i'm got wrong? I need to reset loop $i each time loop $j is incresing. This is the result Loopj1 ......Loopi1 ......Loopi2 ......Loopi3 ......Loopi4 ......Loopi5 Loopj2 Loopj3 Loopj4 Loopj5 Loopj6 Loopj7 Loopj8 Loopj9 Loopj10 I need loop :Loopi1 to Loopi5 to appear in Loopj2 to Loopj10 I think i need to reset FileReadLine but i don't know how $file1 = FileOpen ( "D:\test\test.csv", 0 ) $file2 = FileOpen ( "D:\test\test1.csv", 1 ) FDHYV() Func FDHYV() For $j = 1 to 10 ConsoleWrite ( "Loop" & $j & @Crlf ) For $i = 1 to 5 $line = FileReadLine ( $file1 ) If @error = -1 Then ExitLoop ;ConsoleWrite ( "Line read : " & $line & @Crlf ) FileWrite ( $file2, $line & @Crlf ) ConsoleWrite ( " Loop" & $i & @Crlf ) Next Next EndFunc FileClose ( $file1 ) FileClose ( $file2 ) ShellExecute ( "D:\test\test1.csv") test.csv 1 2 3 4 5
  8. yes... Thanks...
  9. Hy all, I need a hint how to make a script which reade value from a file (*.csv) and create a new file with each value multiplied by x time ( in column) Exemple: File test.csv: 1 2 3 New file contain each value multiplied by 3 times: 1 1 1 2 2 2 3 3 3 Thanks
  10. hy, where i find :"<GDIP.au3>" Thanks
  11. Hy Melba, You have right!Sorry. I use your idea and i added something in plus after the "While 1" which is continues check the status of the check box's and change the status of $hButton. It's work's but not 100%, the button blink's. is there a way to solve this? #include <GUIConstantsEx.au3> #include <Array.au3> ; Read file $sIni = "dat2.dat" $aChecks = IniReadSection($sIni, "1") ; Create GUI $hGUI = GUICreate("Test", 500, 500) ; Create progress $hProgress = GUICtrlCreateProgress(10, 10, 480, 20) ; Create CheckBoxes For $i = 1 To $aChecks[0][0] $aChecks[$i][0] = GUICtrlCreateCheckbox($aChecks[$i][1], 10, ($i * 30) + 20, 100, 20) Next ; Create button $hButton = GUICtrlCreateButton("Go", 10, 460, 80, 30) GUICtrlSetState($hButton,$GUI_DISABLE) ; Here i disable button, initial status is disable GUISetState() While 1 ; I use your ideea and put this "script" wich is continues check the status of the checkbox's and change ;the status of hButton. It's work's but not 100%, the button blink's. $iCount = 0 For $i = 1 To $aChecks[0][0] If GUICtrlRead($aChecks[$i][0]) = 1 Then $iCount += 1 Next If $iCount > 0 Then GUICtrlSetState($hButton,$GUI_ENABLE) If $iCount = 0 Then GUICtrlSetState($hButton,$GUI_DISABLE) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton ; Coutn number of checked Checkboxes ;$iCount = 0 For $i = 1 To $aChecks[0][0] If GUICtrlRead($aChecks[$i][0]) = 1 Then $iCount += 1 Next ; If at least 1 is checked If $iCount > 0 Then ; How much is each checkbox worth? $iSegment = Int(100 / $iCount) ; Now increase the progress by that amount each time Do GUICtrlSetData($hProgress, GUICtrlRead($hProgress) + $iSegment) $iCount -= 1 Sleep(1000) Until $iCount < 0 ; Wait 10 secs Sleep(10000) EndIf ; And exit Exit EndSwitch WEnd
  12. Hy, It's posible to use this UDF to display in a table data from a sql database (from a month by example) If it is can somebody to guide me with a small example? Thanks,
  13. That is menu from picture, it's ok. What i need it's a way how to print a file calling this "profile". For example: I have a profile set for landscape and an another set for portrait and color. Let's say that i want to print a file via a function which call a certain printer with a specific profile (settings). It's posible
  14. Hy, I need for my script a way to use printer profile(you can see in pict about what i speak). I have searched the forum and i don't have any ideea if it's posible. Please give me some hint's. I attach my script until now Thank's prt2.au3
  15. Hy, I need a way to set the number of checked box. Then i can to use this formula to use this formula to set the value of progres: GUICtrlSetData($CtrlProgress2,(($i/NUMBER OF CHECKED CHECBOX"S)*100)) i attached my script with coments. How to handle it? I think is need of second array. I'm not good at array, can somebody help me? second issue: I need a hint how to create a messagebox or better to activate button only when a checkbox is checked, this is to not stat progress if no checkebox is activated and third issue: how to autoclose progress gui after 10sec Thanks, content of dat2.dat [1] 1=1 2=2 3=3 4=4 5=5 6=6 7=7 8=8 9=9 Checkbox_Progress.au3
×
×
  • Create New...