AutoHotkey Community

It is currently May 26th, 2012, 8:47 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: August 29th, 2009, 12:43 am 
Offline

Joined: September 10th, 2005, 10:24 pm
Posts: 32
I have a script below I am testing. see below.

Run, C:\Program Files\Windows NT\Accessories\wordpad.exe
WinWait, Document - WordPad
WinActivate, Document - WordPad
WinWait, Document - WordPad


Send,
<table width="747" cellspacing="9" border="0" height="149">
<tr>
<td height="0">
<center>
<table width="93%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="27%">

All I want to do is open wordpad and type out the info you see after the Send, command. I get an error line 9 saying I am using illegal characters.

What is the best way for my goal to work. Can I even do it? Do I need a string thing or something. I dont understand strings anyway but...
Anyone have ideas on solving my problem?
thanks


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 29th, 2009, 1:09 am 
Offline

Joined: August 3rd, 2009, 4:44 pm
Posts: 69
Location: UK
The second winwait was pointless so i took it out, also the error was caused because you didnt put the delimiter "`" in front of your % signs so it thought you were placing variables

Code:
Run, C:\Program Files\Windows NT\Accessories\wordpad.exe
WinWait, Document - WordPad
WinActivate, Document - WordPad

Send, <table width="747" cellspacing="9" border="0" height="149">{enter}<tr>{enter}<td height="0">{enter}<center>{enter}<table width="93`%" border="0" cellspacing="0" cellpadding="0">{enter}<tr> {enter}<td width="27`%">


btw sendinput is faster than send


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2009, 1:57 am 
Offline

Joined: September 10th, 2005, 10:24 pm
Posts: 32
Thanks on both counts. I didnt know about sendinput.

Can you answer this question for me?
When using sendinput or send does autohotkey always finish that which is typed out after using send before beginning the next autohotkey script line.
Or would I need some kind of wait command to wait for lines to be typed?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2009, 2:05 am 
Offline

Joined: August 3rd, 2009, 4:44 pm
Posts: 69
Location: UK
the send command wont complete untill it has sent everything, so autohotkey wont go to the next script line untill the send has finished


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2009, 4:17 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
horntail wrote:
the send command wont complete untill it has sent everything, so autohotkey wont go to the next script line untill the send has finished


As an addendum to that, you may come across instances where it appears the script has advanced past a Send command even though not all text to be sent appeared to be sent, or, the text was sent incorrectly. You'll have to bear in mind that AHK only sends the data to another program, it has nothing to do with whether the other program receives/processes all of the data, or receives/processes all of it correctly. In most of these instances making script adjustments via SetKeyDelay will usually correct the problem.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: coinman, joetazz, Leef_me, tidbit, Yahoo [Bot] and 63 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