AutoDEV Posted August 24, 2024 Posted August 24, 2024 Hello, i have this code : Global $fFile = "Configs\" & $Config FileWriteLine($fFile, "COMPILE=" & $os) Why my text is write on line 1 and not on end line ? Thank you
ioa747 Posted August 24, 2024 Posted August 24, 2024 (edited) It work for me Global $fFile = @ScriptDir & "\Configs.txt" $os = "win32" FileWriteLine($fFile, "COMPILE=" & $os) $os = "win64" FileWriteLine($fFile, "COMPILE=" & $os) ShellExecute($fFile) Edited August 24, 2024 by ioa747 I know that I know nothing
AutoDEV Posted August 24, 2024 Author Posted August 24, 2024 Thank you. Now i have one other problem. I have this : If _IsChecked($win32) Then $win32 = "checked" If _IsChecked($win64) Then $win64 = "checked" If _IsChecked($linux) Then $linux = "checked" If _IsChecked($other) Then $other = "checked" Dim $arr[4][2] = [["win32", $win32], ["win64", $win64], ["linux", $linux], ["other", $other]] Global $fFile = "/OsList/os.txt" IniWriteSection($fFile, "OS", "") If IsArray($arr) Then For $i = 0 to UBound($arr) - 1 ; ConsoleWrite($arr[$i][0] & ":" & $arr[$i][1] & @LF) FileWriteLine($fFile, $arr[$i][0] & "=" & $arr[$i][1]) Next ExitLoop EndIf How ty make more easy for create section and key plz.
ioa747 Posted August 24, 2024 Posted August 24, 2024 Local $win32 =0, $win64=1, $linux=0, $other=0 Dim $arr[4][2] = [["win32", $win32], ["win64", $win64], ["linux", $linux], ["other", $other]] Global $fFile = @ScriptDir & "/OsList.txt" IniWriteSection($fFile, "OS", $arr, 0) I know that I know nothing
AutoDEV Posted August 25, 2024 Author Posted August 25, 2024 THX. I have one question.My for is required ? And your code is a best like my code ?
ioa747 Posted August 25, 2024 Posted August 25, 2024 (edited) I don't understand the question please rephrase or use google translation Edited August 25, 2024 by ioa747 I know that I know nothing
AutoDEV Posted August 25, 2024 Author Posted August 25, 2024 My final code can be : If _IsChecked($win32) Then $win32 = "checked" If _IsChecked($win64) Then $win64 = "checked" If _IsChecked($linux) Then $linux = "checked" If _IsChecked($other) Then $other = "checked" Dim $arr[4][2] = [["win32", $win32], ["win64", $win64], ["linux", $linux], ["other", $other]] Global $fFile = "/OsList/os.txt" If IsArray($arr) Then IniWriteSection($fFile, "OS", $arr, 0) ExitLoop EndIf ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now