Jump to content
Sign in to follow this  
sunny

can i retrive a vbscript file output?

Recommended Posts

sunny

hi

I am writing a query in vbscript whcih gives one value

I want to call this vbscript and want to assign the ouput of that vbscript file to a auto it v3 variable

can i do that?

Share this post


Link to post
Share on other sites
Mat

re write the vb script in autoit!! ^_^

If you really must use vb then what variable do you need to assign...

how does it output the variable more importantly, e.g. if it brings up a msgbox with a value etc. (in that case you'll have to edit the vb if you want it to look and work professionally).

MDiesel

Share this post


Link to post
Share on other sites
ericksoncl23

posting up code snippets would help


meh

Share this post


Link to post
Share on other sites
sunny

re write the vb script in autoit!! ^_^

If you really must use vb then what variable do you need to assign...

how does it output the variable more importantly, e.g. if it brings up a msgbox with a value etc. (in that case you'll have to edit the vb if you want it to look and work professionally).

MDiesel

Thaks for the info

my basic problem here is that i want to connect to a sql server database and want to capture some values by queries

please help me in this regard

since i couldnt able to do it in auto it,i have written a vbscript file which connects to sql server database and queries one table and gets one single value.

this value i am trying to capture.this value stored in local variable of vbscript file

please let me know the solution in either of one case

that is GREAT HELP!!!!!!!!!!!!!!!!!!!!!!

Regards

Share this post


Link to post
Share on other sites
Mat

once again, the helpfile is your friend and teacher.

To do it in autoit look at the sqlite functions, probably these particular ones:

_SQLite_GetTable

_SQLite_Query

I've never used those before, so I presume they do what they say on the tin... Play around with it, if its not possible with the basic functions, search exaple scripts.

MDiesel

Share this post


Link to post
Share on other sites
sunny

Thaks for the info

my basic problem here is that i want to connect to a sql server database and want to capture some values by queries

please help me in this regard

since i couldnt able to do it in auto it,i have written a vbscript file which connects to sql server database and queries one table and gets one single value.

this value i am trying to capture.this value stored in local variable of vbscript file

please let me know the solution in either of one case

that is GREAT HELP!!!!!!!!!!!!!!!!!!!!!!

Regards

Hi

This is my code in vb script:

Set cn= CreateObject("ADODB.Connection")

set rs = CreateObject("ADODB.Recordset")

cn.Open "Driver={SQL Server};" & _

"Server=databaseserver\instance;" & _

"Database=databasename;" & _

"user id=username;" & _

"password=password;"

rs=cn.execute ("select rate from fxrate where fromcurrencyid like 'USD' and ToCurrencyId like 'GRD'")

value = rs(0).value

msgbox rs(0).value

my basic problem here is that i want to connect to a sql server database and want to capture some values by queries

please help me in this regard

since i couldnt able to do it in auto it,i have written a vbscript file which connects to sql server database and queries one table and gets one single value.

this value i am trying to capture.this value stored in local variable of vbscript file

please let me know the solution in either of one case

that is GREAT HELP!!!!!!!!!!!!!!!!!!!!!!

Share this post


Link to post
Share on other sites
Mat

I think my previous reply answers that...

Try it, it will probably be quite easy as vb will need the same variables as autoit, a bit of tinkering and you'll be good!

MDiesel

Share this post


Link to post
Share on other sites
ericksoncl23

From looking at those _SQLite* statements .. it looks like it just makes an SQL database in memory. It doesn't actually connect to a real database.


meh

Share this post


Link to post
Share on other sites
sunny

From looking at those _SQLite* statements .. it looks like it just makes an SQL database in memory. It doesn't actually connect to a real database.

you are right.

Thats why i am seeking some help to get a way to connect to the existing database

PLS HELP!!!!!!!!!!!!!!!!!!!

Share this post


Link to post
Share on other sites
Mat

Please don't open multiple threaads about the exact same thing.

read the other thread and don't reply in this one, it just gets messy otherwise.

I have replied in the other one with a very similar reply to what I have already told you... Please test it, and don't reply again without having tried.

Share this post


Link to post
Share on other sites
picea892

transferring information back and forth between scripts is very difficult. I looked into this once and found two options

1) Write information into a temporary text file and then read the file with autoit

2) Set an windows environmental variable and reference it.

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  

×