Jump to content

Passing variable to a program via Send function


Recommended Posts

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..

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...