Jump to content

Recommended Posts

Posted

Hi all,

I have a function, lots of variables

And I want use my function simultaneously with differents variables instead of browse all variables one by one

 

Thanks in advance

  • Moderators
Posted

ATR,

I am afraid you will need to use the Alpha 3.4.11.1 version which will be released some time in early 2017. :)

Seriously, how can you expect a serious answer to such a vague question? How about showing us the function and explaining what all these variables are? ;)

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

 

Posted

$i = 1
$x = 1
$Dossier = @WorkingDir & "\Folder\"
$Recherche = FileFindFirstFile($Dossier & "*.txt")
While 1
    $Fichier = FileFindNextFile($Recherche)
    If @error Then ExitLoop
    $Read = FileRead($Dossier & $Fichier)
    $Vars = StringSplit($Read, ';', 2)
    $Fichiers = FileOpen(@WorkingDir & "\File_" & $x & ".txt", 138)
    For $Var In $Vars
        TraySetToolTip("Siren n° : " & $i)
        FileWrite($Fichiers, Function($Var))
        $i += 1
        If $i = 15000 Then
            FileClose($Fichiers)
            $Fichiers = FileOpen(@WorkingDir & "\Sortie\SIRENS_" & $x & ".txt", 138)
            $i = 1
            $x += 1
        EndIf
    Next
WEnd
FileClose($Recherche)

Func Function($Var)
    Local $Data  = ""
    $Data = $Var * Random(1, 10, 1)
EndFunc

  • Moderators
Posted

ATR,

Firstly, why do you even have a function for such a small code snippet? Just use:

FileWrite($Fichiers, $Var * Random(1, 10, 1))
Secondly, what exactly are you asking? To be able to simultaneously FileWrite multiple lines of the randomly multipled elements of the $Vars array? If so, then you cannot. :(

But what exactly asre you trying to do with this script? If we knew its purpose, we might be able to offer you a better way to go about it. ;)

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

 

Posted

In real, my function is longer. This function is for example.

I must read 500 files and I want use my function for the thirst file. And outside to wait the end of the frst file, use this function for the second file simultaneously

  • Moderators
Posted

ATR,

Then you will need to start separate processes to run each instance of the function - not something I would want to consider given that you will doubtless need to recover some form of return value from each. :(

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

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...