Jump to content
Sign in to follow this  
Crash

Reading a parameter from another autoit

Recommended Posts

Crash

I have two scripts over here: one is main.au3 and the other is action.au3

The main.exe (compiled) is to be running in the background and the action.exe will be executed by main.exe whenever the user choose an action that requires admin rights (there will be a #RequireAdmin in action.exe)

Why: So that main.exe can be run by all users and when the user needed some "actions", they will have to enter admin passwords, Instead of needed to enter password when main.exe is run.

So there will be several "actions" written in action.exe and only one will be executed.

So, I think I will use parameters:

ShellExecute("action.exe", 1)

(with one as the parameter)

The action.exe will then GET the parameter, which in this case is 1, and run action 1.

If the parameter is 2, then it will run action 2 and so on.

So my question is HOW I CAN MAKE action.exe READ THE PARAMETER?

Or, is my idea possible to work? If not, why?

Please help me!! :)

Edited by Crash

JPGRARMouse Lock | My website | Thanks so much for your help! ❤️

Share this post


Link to post
Share on other sites
dantay9

Look for $cmdline in the help file. The topic is "Running scripts". I think you will find everything you need there.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

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  

×