0

I think first i should know the window program's id or somthing . Is it right? Or is there other way? I will input the text file using python or something... Let me know about it Have a nice day Thanks

  • 1
    Why did you tag your question java and C but not Python? Is any programming language OK? – Nicolas Raoul Jan 15 '19 at 10:25
  • Because this site does not offer phthon tag yet. I can handle java phthon c# – slowyturtle Jan 18 '19 at 3:03
  • What is "phthon"? Please post the URL of a website talking about phthon, thanks! – Nicolas Raoul Jan 18 '19 at 3:15
  • Sorry that is a mistake ... did not catch it thank you – slowyturtle Jan 19 '19 at 4:02
  • Please edit your question to fix it, thanks! Also, post a screenshot of the window showing the field to input text into. – Nicolas Raoul Jan 19 '19 at 5:39
0

You could easily do this with AHK

https://autohotkey.com/docs/commands/ControlFocus.htm

https://autohotkey.com/docs/commands/WinActivate.htm

Example: https://autohotkey.com/board/topic/97969-how-to-put-a-text-into-a-textbox-in-an-other-program/

I believe with some tabs and text input you will be able to do this easily and export the result into an exe file without the need of AHK being installed on your computer.

0

Personally, I always use AutoIt to automate any Windows tasks

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages.

I am not sure about AutoHotKey, but one big feature of AutoIt is that it will locate a window, or wait for it to become active. It doesn’t rely on X/Y coordinates, you can resize, move, or even minimize or hide a program and your script will still run.

Here’s a simple script which opens Notepad, writes to its input and saves the file:

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Save")
;WinWaitActive("Notepad", "Do you want to save") ; When running under Windows XP
Send("!n")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.