Lapinos Posted September 7, 2021 Share Posted September 7, 2021 Hola, I have worked with Powershell and the function For each and i'm looking to apply it in autoit. I think my research go in the wrong way and i require your help please I trying to import a csv (or any other way) with one column to create a "foreach" loop. The script has to be a au3 only. Example : $users = toto,tata,tutu foreach ($user in $users) send ("$user") I apologize about my Autoit scripting knowless and i hope you will be easy with me for this time ^^ Link to comment Share on other sites More sharing options...
Zedna Posted September 7, 2021 Share Posted September 7, 2021 $users = 'toto,tata,tutu' $users = StringSplit($users,',') For $i = 1 To UBound($users) - 1 $user = $users[$i] ConsoleWrite($user & @CRLF) ;~ Send ($user) Next Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
spudw2k Posted September 8, 2021 Share Posted September 8, 2021 Or this also $users = 'toto,tata,tutu' $users = StringSplit($users,',') For $user In $users ConsoleWrite($user & @CRLF) Next Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Musashi Posted September 8, 2021 Share Posted September 8, 2021 1 hour ago, spudw2k said: Or this also or without the return count in the first element $users = 'toto,tata,tutu' $users = StringSplit($users,',', 2) ; 2 = disable the return count in the first element For $user In $users ConsoleWrite($user & @CRLF) Next seadoggie01 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
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