RyukShini Posted June 16, 2016 Posted June 16, 2016 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idOK Local $emails = "email.txt" ;sets file path Local $pwd = "pwd.txt" ;sets file path Local $ArrayEmail[2], $ArrayPwd[2] ;declares array for email & pwd .txt _FileReadToArray($emails, $ArrayEmail) ;converts .txt file to array _FileReadToArray($pwd, $ArrayPwd);converts .txt file to array $username = $ArrayEmail[1] ; username variable $password = $ArrayPwd[1] right now the ArrayEmail[1] read the first line in the file and inputs it, would it be possible to run trough the entire files lines instead of 1 line? I would have to make some sort of variable I guess, tried with ubound but it didn't really work.... Thanks in advance
water Posted June 16, 2016 Posted June 16, 2016 You need to use a Loop statement. This is described in the help file -> Language Reference -> Loop statements My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
RyukShini Posted June 16, 2016 Author Posted June 16, 2016 47 minutes ago, water said: You need to use a Loop statement. This is described in the help file -> Language Reference -> Loop statements Would I be able to make a loop adding a +1 to the $username = $ArrayEmail[1] then make it $username = $ArrayEmail[+1] or $username = $ArrayEmail[++1]
water Posted June 16, 2016 Posted June 16, 2016 That's what the Loop statements do. You set a counter variable, define the start and end value. Everything else is being done by AutoIt. The help file and the wiki tutorial about arrays are your friends My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
RyukShini Posted June 16, 2016 Author Posted June 16, 2016 7 minutes ago, water said: That's what the Loop statements do. You set a counter variable, define the start and end value. Everything else is being done by AutoIt. The help file and the wiki tutorial about arrays are your friends Thanks a lot! I will look at this when I get home. I just ran in to another problem giving me a headache but that has nothing to do with AutoIT, but thats the world of IT I guess, troubleshooting, troubleshooting, troubleshooting and fixing things Thanks again.
water Posted June 16, 2016 Posted June 16, 2016 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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