Jump to content

File name from $changer


xdp22
 Share

Recommended Posts

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

  • Moderators

xdp22

This code should make file with name $name+$name2[].html

Your file name will be whatever is in the variable $plik followed by [].html - not $name+$name2[].html. What is in $plik? ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

xdp22,

Can you please post the whole script, including the array declaration? ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Sure, thanks for answer from you

Here code

#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 by xdp22
Link to comment
Share on other sites

  • Moderators

xdp22,

And do not expect any more help on this one either! ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

@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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...