AutoHotkey Community

It is currently May 26th, 2012, 11:15 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Send command
PostPosted: November 14th, 2009, 10:54 pm 
Offline

Joined: November 14th, 2009, 10:13 pm
Posts: 1
Hello All,
New to AHK. I've tried 'everything, but the simple snippet does not work.
That is, Notepad is launched, but 'Something' is not written in Notepad:

Code:
p::Run notepd.exe
Send Something
exit


However, when I do:
Code:
p::Run notepd.exe
q::
Send Something
exit

It works fine.
What am I doing wrong?
Thanks for any help.
Krid


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Send command
PostPosted: November 14th, 2009, 11:02 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
krid wrote:
Code:
p::Run notepd.exe
Send Something
exit


Correct would be:
Code:
p::
Run notepd.exe
Send Something
exit


Code:
p::Run Notepad.exe ;one line hotkey
c:: ;subroutine hotkey
Run calc.exe
Return

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Send command
PostPosted: November 15th, 2009, 1:02 am 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6067
Location: San Diego, California
You get a better result with proper spelling, and there might be the need for a delay:
Code:
p::
Run notepad.exe
sleep, 2000
Send Something
exit


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Cerberus, JSLover, Maestr0, rbrtryn, Tipsy3000 and 67 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group