sunny Posted April 24, 2009 Share Posted April 24, 2009 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? Link to comment Share on other sites More sharing options...
Mat Posted April 24, 2009 Share Posted April 24, 2009 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 AutoIt Project Listing Link to comment Share on other sites More sharing options...
ericksoncl23 Posted April 24, 2009 Share Posted April 24, 2009 posting up code snippets would help meh Link to comment Share on other sites More sharing options...
sunny Posted April 24, 2009 Author Share Posted April 24, 2009 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).MDieselThaks for the infomy basic problem here is that i want to connect to a sql server database and want to capture some values by queriesplease help me in this regardsince 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 fileplease let me know the solution in either of one casethat is GREAT HELP!!!!!!!!!!!!!!!!!!!!!!Regards Link to comment Share on other sites More sharing options...
Mat Posted April 24, 2009 Share Posted April 24, 2009 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 AutoIt Project Listing Link to comment Share on other sites More sharing options...
sunny Posted April 24, 2009 Author Share Posted April 24, 2009 Thaks for the infomy basic problem here is that i want to connect to a sql server database and want to capture some values by queriesplease help me in this regardsince 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 fileplease let me know the solution in either of one casethat is GREAT HELP!!!!!!!!!!!!!!!!!!!!!!RegardsHi 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).valuemsgbox rs(0).valuemy basic problem here is that i want to connect to a sql server database and want to capture some values by queriesplease help me in this regardsince 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 fileplease let me know the solution in either of one casethat is GREAT HELP!!!!!!!!!!!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
Mat Posted April 24, 2009 Share Posted April 24, 2009 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 AutoIt Project Listing Link to comment Share on other sites More sharing options...
ericksoncl23 Posted April 24, 2009 Share Posted April 24, 2009 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 Link to comment Share on other sites More sharing options...
sunny Posted April 24, 2009 Author Share Posted April 24, 2009 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 databasePLS HELP!!!!!!!!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
Mat Posted April 24, 2009 Share Posted April 24, 2009 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. AutoIt Project Listing Link to comment Share on other sites More sharing options...
picea892 Posted April 24, 2009 Share Posted April 24, 2009 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now