Sign in to follow this  
Followers 0
DaRkMaDnEsS

help with $CmdLine

6 posts in this topic

#1 ·  Posted (edited)

well hello

what i'm searching for expanding the $CmdLine with more option

just line in the command prompt the %1 get the input and %~f1 full path name

here is the a list

shows what i'm talking about hope any one can help me

i need the path one as i need to run my program like this

DM.exe file name

it get called from a cmd and the DM.exe is in the system32

i want it to get the full file name with path

Edited by DaRkMaDnEsS

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Did you look at the macro section in the helpfile?

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Did you look at the macro section in the helpfile?

well i have looked into the help file

but i couldn't find any thing to help

and searched the forum but couldn't find any thing that can help me

i'm working on a console version of autoit

so from the cmd when i call the program with a parameters (file name)

the program gets the parameters correct but it needs the path to the file i sent

so i can work on it

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@ScriptFullPath is @ScriptDir and @ScriptName combined

the first commandline parameter is $CMDLINE[1]. $CMDLINE[0] number of parameters.

You can find all this in the helpfile. What else do you need?

maybe @WorkingDir is the current working directory?

With these variables and macros you can build the path you need.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

To add, if this program's path is recorded in the registry you could use; $var = RegRead ("keyname", "valuename")

Hope that helps.

Share this post


Link to post
Share on other sites

@ScriptFullPath is @ScriptDir and @ScriptName combined

the first commandline parameter is $CMDLINE[1]. $CMDLINE[0] number of parameters.

You can find all this in the helpfile. What else do you need?

maybe @WorkingDir is the current working directory?

With these variables and macros you can build the path you need.

thx the macro i didn't test was @WorkingDir

it seems that it gets the dir from the cmd

thx that what i was searching for

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  
Followers 0