Jump to content
Sign in to follow this  
Jasdeep

Passing variable to a program via Send function

Recommended Posts

Jasdeep

Hello all,

I need some help with an AutoIt script that i'm developing. Here's what my script is supposed to do:

First Input:

Ask the users to enter the no. of URLs to open in a Browser

Second Input:

Ask the user to enter these URLs. This input loops around, based on the above input.

Eg, If i wanted to open yahoo.com and google.com. I would answer the first question as 2. Then loop the second question twice to enable the user to enter yahoo.com and google.com

to take both inputs i'm using InputBox() function.

I'm storing the URLs in an array, say

$url[]

Going by the example,

$url[0] must be yahoo.com
$url[1] must be google.com

After these variables has been collected i open Mozilla firefox, and using Send() function i try to send these URLs to Address bar of Mozilla Firefox.

Here's what my code looks like:

Send("{"&$url[$x]&"}")
;x is the index here.

After i run the script, i see that only 'y' of Yahoo and 'G' of google is sent to the browser and nothing else.

So, can any one here help me, so that i can send the whole string "yahoo.com" and "google.com" to the browser...

Or if anything is wrong with my Send syntax, please help me correct it..

Share this post


Link to post
Share on other sites
Jasdeep

Bump!

Please help me get this work done, i'll be very much grateful to you!

Share this post


Link to post
Share on other sites
oMBRa

this

Send("{"&$url[$x]&"}")

should be

Send($url[$x])

you need " { } " only for special characters like ENTER etc...

Share this post


Link to post
Share on other sites
Jasdeep

this

Send("{"&$url[$x]&"}")

should be

Send($url[$x])

you need " { } " only for special characters like ENTER etc...

Thanx a ton oMBRa..!!

My app is working now!! All thanx to you...

Looking forward to develop wonderful apps with AutoIt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×