ZahidAli Posted September 6, 2020 Posted September 6, 2020 Hello, I just started using Auto It Scripting Language i am slowly learning things how i can make my daily routine task on auto pilot as much as possible. I am having issue to make script for my requirement right now. I want script to read my text file (Line by Line) and store it in a variable and and when i want it Type/Sent that text to textbox in website. I want to use HotKey to trigger that function. Lets say i want to enter data on Text Box from the File which have 10 Lines but i want all to be written in text box 1 by 1 when i press my desired hotkey it read the line and enter that text to textbox and pause/stop it self and when i again press my HotKey it start with second line and enter that text into textbox and so on until all line in text file complete.
Moderators JLogan3o13 Posted September 6, 2020 Moderators Posted September 6, 2020 @ZahidAli welcome to the forum. Please look at FileRead and FileReadyToArray in the help file. As always, there are multiple ways to skin the proverbial cat, but with either of those you can read an text file into a variable, and then use it as needed later in your script. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
ZahidAli Posted September 6, 2020 Author Posted September 6, 2020 On 9/6/2020 at 5:30 PM, JLogan3o13 said: @ZahidAli welcome to the forum. Please look at FileRead and FileReadyToArray in the help file. As always, there are multiple ways to skin the proverbial cat, but with either of those you can read an text file into a variable, and then use it as needed later in your script. Expand Just Simple Test with my Current Little Knowledge HotKeySet("{F1}", "uName") Global $file = "names.txt" FileOpen($file, 0) Func uName() For $s = 1 to _FileCountLines($file) $line = FileReadLine($file, $s) msgbox(0,'','the line ' & $s & ' is ' & $line) Next EndFunc Now i want is to Show each line one by one in MsgBox whenever press F1. I mean if it show Line 1 and next time i press F1 it should show Line 2 and so on
Developers Jos Posted September 6, 2020 Developers Posted September 6, 2020 See other thread as I can only assume this is about the same topic. 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.
Moderators JLogan3o13 Posted September 6, 2020 Moderators Posted September 6, 2020 Agreed. @ZahidAli you made it clear in the other thread that you are fully aware what you are doing violates Google TOS. Be aware you have called into question any future posts by doing so. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts