Kris123 Posted September 24, 2009 Share Posted September 24, 2009 Deal All, i compiled my script and made as an exe. Now i want to pass a parameter to that exe and bassed on the value i want to make chnages in my exe. it is like command line arguements. how can i do that. Please help........... Link to comment Share on other sites More sharing options...
jvanegmond Posted September 24, 2009 Share Posted September 24, 2009 $CmdLine variable. Look it up in help file. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Kris123 Posted September 24, 2009 Author Share Posted September 24, 2009 Im sorry i could not find. Please give some more details. Link to comment Share on other sites More sharing options...
jvanegmond Posted September 24, 2009 Share Posted September 24, 2009 (edited) Step 1) Open the help fileStep 2) Open the "Search" tabStep 3) Enter $CmdLine in the search boxStep 4) Press the enter key Step 5) Choose the first result from the list that appears (Edit: You do this by double clicking the item)Step 6) A page appears on your right, read it Edited September 24, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Kris123 Posted September 24, 2009 Author Share Posted September 24, 2009 Thanks i found the help. But i have a doubt. currently i am running an exe in my script as follows. Run(@ScriptDir & "\Wrong Format1.exe") so how to pass arguements in that command and in the same way how to get those arguements in Wrong Format1.au3 and process. Please help. Link to comment Share on other sites More sharing options...
Juvigy Posted September 24, 2009 Share Posted September 24, 2009 You can do something like : Run(@ScriptDir & "\Wrong Format1.exe param1 'some param info'") in your wrong format1.exe $CmdLineRaw equals... param1 "some param info" $CmdLine[0] equals... 2 $CmdLine[1] equals... param1 $CmdLine[2] equals... "some param info" Link to comment Share on other sites More sharing options...
spudw2k Posted September 24, 2009 Share Posted September 24, 2009 http://www.autoitscript.com/autoit3/docs/intro/running.htm#CommandLine Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
martin Posted September 24, 2009 Share Posted September 24, 2009 Thanks i found the help. But i have a doubt. currently i am running an exe in my script as follows. Run(@ScriptDir & "\Wrong Format1.exe") so how to pass arguements in that command and in the same way how to get those arguements in Wrong Format1.au3 and process. Please help. You can pass arguments to the script if you run it from SciTE. Choose the view menu then parameters. You are limited to a maximum of 4 parameters though. You can also use RUN and then you can have as many parameters as you like. $AutoItProdexePath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","InstallDir");installDir for production $AutoItBetaexePath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","betaInstallDir");installDir for production $AutoItexePath = $AutoItBetaexePath;default to beta?? Run( '"' & $AutoItexePath & '\AutoIt3.exe" $ScriptFolder & "\Wrong Format1.au3" ' & $param1 & ' ' & $param2 & ' ' & $param3) 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...
Kris123 Posted September 25, 2009 Author Share Posted September 25, 2009 (edited) Dear all, i tried by giving following way.... but is giving errors. Run( '"' & $AutoItexePath & "\AutoIt3.exe" @ScriptDir & "\Wrong Format1.au3" & 10) Please help. Edited September 25, 2009 by Kris123 Link to comment Share on other sites More sharing options...
jvanegmond Posted September 25, 2009 Share Posted September 25, 2009 (edited) You need spaces. What you have now results into: "C:\Program Files\AutoIt3\AutoIt3.exe\C:\Users\You\yourscript.au3\Wrong Format1.au310" The error is caused by this: Run( '"' & $AutoItexePath & "\AutoIt3.exe" @ScriptDir & "\Wrong Format1.au3" & 10) ; . . . . . . . . . . . . . . . . . . . . ^ no & Edited September 25, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
jvanegmond Posted September 25, 2009 Share Posted September 25, 2009 Then read it again. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Kris123 Posted September 25, 2009 Author Share Posted September 25, 2009 i tried by removing '&', but still same error.....syntax error. Link to comment Share on other sites More sharing options...
jvanegmond Posted September 25, 2009 Share Posted September 25, 2009 Then try adding a &. github.com/jvanegmond 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