tironci Posted March 13, 2009 Share Posted March 13, 2009 Hi i am trying to write a script that takes a parameter from a vbscript and then goes on and checks that parameter and does the conversions it is supposed to do. i have looked in the help file and i cant find an example on how to call the autoit .exe from the vbscript file. could someone please help. this is the code CODE$edition = 0 If $CmdLine[0] = 1 Then $edition = $CmdLine[1] EndIf If $edition = 'Developer' Then ; Run Deverloper and convert all the Report Batches, Reports and Dashboards Run("C:\Program Files (x86)\\\.exe"); path where .exe file is located Sleep(5000) report($edition) ElseIf $edition = 'Developerx86' Then Run("C:\Program Files (x86)\\\.exe") ;path to where the .exe file is located ElseIf $edition = 'officex86' Then Run("C:\Program Files (x86)\\\.exe") EndIf Func Report($editions) all i want to get from the vbscript is on parameter which gives the name of the edition. this is what i have but this only opens the converter0.3.exe CODEdim shell set shell=createobject("wscript.shell") shell.run "C:\Users\dh\Desktop\automation\conversion0.3.exe" set shell=nothing any help is appreciated. Link to comment Share on other sites More sharing options...
evilertoaster Posted March 13, 2009 Share Posted March 13, 2009 Command Line Parameters have a section in the help file. Use the special variable $CmdLine[0],$CmdLine[1],$CmdLine[2] ect for each paramater. Link to comment Share on other sites More sharing options...
martin Posted March 13, 2009 Share Posted March 13, 2009 Hi i am trying to write a script that takes a parameter from a vbscript and then goes on and checks that parameter and does the conversions it is supposed to do. i have looked in the help file and i cant find an example on how to call the autoit .exe from the vbscript file. could someone please help. this is the code CODE$edition = 0 If $CmdLine[0] = 1 Then $edition = $CmdLine[1] EndIf If $edition = 'Developer' Then ; Run Deverloper and convert all the Report Batches, Reports and Dashboards Run("C:\Program Files (x86)\\\.exe"); path where .exe file is located Sleep(5000) report($edition) ElseIf $edition = 'Developerx86' Then Run("C:\Program Files (x86)\\\.exe") ;path to where the .exe file is located ElseIf $edition = 'officex86' Then Run("C:\Program Files (x86)\\\.exe") EndIf Func Report($editions) all i want to get from the vbscript is on parameter which gives the name of the edition. this is what i have but this only opens the converter0.3.exe CODEdim shell set shell=createobject("wscript.shell") shell.run "C:\Users\dh\Desktop\automation\conversion0.3.exe" set shell=nothing any help is appreciated.Since my knowledge of vbscript is close to zero I probably shouldn't even answer, but I think it should be as simple as dim shell set shell=createobject("wscript.shell") shell.run """C:\Users\dh\Desktop\automation\conversion0.3.exe"" ""Developer""" set shell=nothing (the quotes are x3 then x2 then a space then x2 then x3) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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