prasadstudy Posted September 12, 2017 Share Posted September 12, 2017 (edited) I would like to know how to call a variable from one AutoIT script to Another. There are few questions posted in similar grounds in this forum but apparently still not getting what to be done. My scripts are:- Script1:- $TestInputspath=IniRead("XXXX") Global $TestInputsWorkBook=_Excel_BookOpen($OpenExcel,$TestInputspath) The variable '$TestInputsWorkBook' is been used in many places through out the script1. Script2:- I would like to call the same variable '$TestInputsWorkBook' here in script2 as well. So that the same variable can be used in remaining portion of script2. For the time being, I am have kept the script1 line repeated in script2 as well but each time the excel sheet is getting opened again which is why I wanted to reuse the already declared variable from script1. Hope my question is clear to all. Edited September 12, 2017 by prasadstudy Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted September 12, 2017 Share Posted September 12, 2017 Hi @prasadstudy, and welcome to the AutoIt forum Why do you divided the _Excel* management and you would like to use a variable which point to an Excel Workbook handle? Can you please post your code ( or a replication of it ), in order to let us understand what you don't want to repeat in your first script? Thanks Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette 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