Basic auto run notepad + type

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 10 Sep 2018, 20:51

Basic auto run notepad + type

10 Sep 2018, 21:01

Hey I've been working on the ahk for about 4 days now and I seriously need some help.
It really seems like there's nothing wrong with my script but every time I try and use it.. it doesn't work.
Mine looks the same as the other scripts... in my point of view :/
I need you guys to take a look and see what's wrong .

Code: Select all

WORKING SCRIPT(got it from the internet)
Run, Notepad
Send, Hello`n 
Send, I'm a student. `n 

MY SCRIPT (which doesn't work properly)
LAlt & n::
Run, Notepad
Send, nd1126 `n 
Send,this is my id`n
(5.53 KiB) Downloaded 80 times
Last edited by nd1126 on 10 Sep 2018, 23:58, edited 1 time in total.
Posts: 22
Joined: 09 Aug 2018, 04:41

Re: Basics

11 Sep 2018, 06:47

tomoe_uehara wrote:

Code: Select all

msgbox ok
As already said.
Take a look at this to learn more.

Code: Select all

; Your code
User avatar
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Basic auto run notepad + type

11 Sep 2018, 07:24

- Your original script worked for me. Perhaps you could explain further what doesn't work.
- I've added some code to make sure that it writes to the new window. Cheers.

Code: Select all

LAlt & n::
Run, notepad,,, vPID
WinWait, % "ahk_class Notepad ahk_pid " vPID
hWnd := WinExist()
WinActivate, % "ahk_id " hWnd
Send, nd1126 `n
Send, this is my id`n
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask For Help”

Who is online

Users browsing this forum: ark, Google [Bot], Spawnova and 37 guests