Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I wish I knew about this site years ago. It would have saved me a lot of heartaches..."

Geography

Where in the world do Tek-Tips members come from?
badtech (TechnicalUser)
22 May 08 9:35
I wrote a script to add mailboxes. It works fine but it waits 30 seconds before it starts to add the next one. How can I cut down the time to 5 seconds.
thanx
knob (Programmer)
22 May 08 11:02
If it's pausing 30 seconds, one possible problem is that you have a waitfor command that is timing out due to the string not being received (the timeout by default is 30 seconds).

http://www.aspectscripting.com

geirendre (Vendor)
22 May 08 13:32
If you posted your script it would be even easyer to tell winky smile
 
badtech (TechnicalUser)
22 May 08 14:48
sorry about that. Be easy this is the first one I tried to write

thanx

proc main

string sline, name,ext1
fopen 0 "try1.txt" read ;open data file
while not feof 0;while the file still has data
fgets 0 sline   ;read the line of data
strtok name sline "`t" 1  ; get line of first field
strtok ext1 sline "`t" 1  ; get line  of second field


set txpace 50

   waitfor "Name (last first) : "
   transmit name
   waitfor "Class Number        :  "
   transmit "10^M"
   waitfor "Extension            [1]   "
   transmit ext1
   waitfor "Extension            [2]   "
   transmit "^M"
   waitfor "PhoneMail Password  : (Default = ##########):  "
   transmit "^M"
   waitfor "Group Name          : (Default = ):  "
   transmit ";^M"
   
endwhile

fclose 0

endproc
knob (Programmer)
23 May 08 3:04
Yep, I would definitely check those waitfors.  Just watch your script execute and see if the contents of the transmit strings are sent immediately after the text from the preceding waitfor commands appears.  If not, then you likely need to trim and/or double-check the strings in the waitfor commands.

http://www.aspectscripting.com

geirendre (Vendor)
24 May 08 11:25
It's generaly not necessary (and not recommended) to
match a line so explicitly as you do.
A line like:

CODE

waitfor "Group Name          : (Default = ):  "
could probably been replaced with something like:

CODE

waitfor "= ):  "
That is, only the end of the line.

By redusing the matching text you increase the likelyhood of making a match.
As longe as yout matching text is unique to what you expect, then your good to go.

HTH  smile
 
kcfonman (TechnicalUser)
1 Jul 08 13:43
Your application is missing the string "Name (last first) : " while reading the values in during the loop.   You need to put your statment    waitfor "Name (last first) : " at the the end and then loop back to the top to read your new data.  The following change should work.  I also corrected your nesting to reflect the DoWhile loop.



proc main

string sline, name,ext1
fopen 0 "try1.txt" read ;open data file

while not feof 0;while the file still has data
   fgets 0 sline   ;read the line of data
   strtok name sline "`t" 1  ; get line of first field
   strtok ext1 sline "`t" 1  ; get line  of second field
   set txpace 50
   transmit name
   waitfor "Class Number        :  "
   transmit "10^M"
   waitfor "Extension            [1]   "
   transmit ext1
   waitfor "Extension            [2]   "
   transmit "^M"
   waitfor "PhoneMail Password  : (Default = ##########):  "
   transmit "^M"
   waitfor "Group Name          : (Default = ):  "
   transmit ";^M"
   waitfor "Name (last first) : "

   
endwhile

fclose 0

endproc  

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close