Read from file and print it Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Corvin1
Posts: 6
Joined: 26 Apr 2018, 11:48

Read from file and print it

26 Apr 2018, 11:59

Hello there I was tryin to write a programm that reads from a txt file and for each line prints it into a textfield and presses Enter.
Guest

Re: Read from file and print it

26 Apr 2018, 12:22

There are various ways to go about it but have a look at the example here (bottom of page) https://autohotkey.com/docs/commands/Fi ... tm#Example

You can replace the
MsgBox, 4, , Line #%A_Index% is "%line%". Continue?
IfMsgBox, No
return
lines with

Code: Select all

SendRaw %line%
Send {enter}
and that would be your script basically.
Now you would need to assign it to a hotkey and make sure you are in the first text field when you start the script using the hotkey.

Look at the https://autohotkey.com/docs/Tutorial.htm to learn the basics - how to setup a hotkey etc.
gregster
Posts: 9029
Joined: 30 Sep 2013, 06:48

Re: Read from file and print it

26 Apr 2018, 12:38

Oh yeah? Grooovy... ! What have you tried?
Probably FileRead and Send/ControlSend and stuff, after you learned all the basics from the tutorial.

How did it go? You know, you can post your script here so that people can learn... or even help you!
You could get a little more specific, though... well, wouldn't hurt.
Corvin1
Posts: 6
Joined: 26 Apr 2018, 11:48

Re: Read from file and print it

26 Apr 2018, 12:49

thats the probleme I dont even know the basics of Autohotkey im just getting started
Corvin1
Posts: 6
Joined: 26 Apr 2018, 11:48

Re: Read from file and print it

26 Apr 2018, 12:51

So it would be nice if you could give me an exaple if it isn't too much work
gregster
Posts: 9029
Joined: 30 Sep 2013, 06:48

Re: Read from file and print it

26 Apr 2018, 13:00

If you don't know the basics, you should read the tutorial (<<<< this is a link) first and try the examples there. So that we can build on some general principles... and so that you get a feeling for the syntax.
I also linked to some commands that might be useful for your project. There are examples included, too.

You could still add more specific information about what you are trying to do... which program to you want to paste into? Or is it a game?
Corvin1
Posts: 6
Joined: 26 Apr 2018, 11:48

Re: Read from file and print it

26 Apr 2018, 13:06

I want to insert a list of passworts into the login programm of my scool because they just use dates
gregster
Posts: 9029
Joined: 30 Sep 2013, 06:48

Re: Read from file and print it

26 Apr 2018, 13:10

Is this a legitimate use case?
Perhaps I just don't understand what that means... :think: I think I am still missing a bit of context here.
Last edited by gregster on 26 Apr 2018, 13:12, edited 1 time in total.
Corvin1
Posts: 6
Joined: 26 Apr 2018, 11:48

Re: Read from file and print it

26 Apr 2018, 13:11

I want to show it to my IT teacher.
Because it's no secret how the passwords are build up it just the birth date.
gregster
Posts: 9029
Joined: 30 Sep 2013, 06:48

Re: Read from file and print it  Topic is solved

26 Apr 2018, 13:16

If everybody knows it and you just want to proove something, why not try to write a script yourself?

I would still strongly advise against logging into accounts that are not yours, even if it is to demonstrate a password security problem. You will be on thin ice, legally, if you don't have official permission to the test the security of the system.
If it is no secret anyway, you probably should rather discuss it with your teachers, parents and/or the school's administration, instead of hacking into the system.
Last edited by gregster on 26 Apr 2018, 13:19, edited 1 time in total.
Corvin1
Posts: 6
Joined: 26 Apr 2018, 11:48

Re: Read from file and print it

26 Apr 2018, 13:19

Yeah you'r right I just wanted to try it but i guess I will just stick with python

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: just me, KolaBorat and 121 guests