Lambort Posted October 22, 2006 Share Posted October 22, 2006 I'm curious how I could make a program in autoit that will run the .exe's you select. For Example: Say you want to run 3 .exe files. the files are located at c:\1.exe, c:\2.exe, and c:\3.exe there are 3 selection boxes where the user clicks and can navigate to select the 3 .exe's First one for 1.exe Second for 2.exe Third for 3.exe Then the person clicks "ok" or "done" or whatever and it shows them links they can click to execute the 3 exe's like: 1 2 3 And each of the links runs the .exe you selected. Also, when you boot it up the next time I want it to save a log or something to where the 3 files can still be executed through the links. Thanks in advance for any help. -Alyssa Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 22, 2006 Moderators Share Posted October 22, 2006 Array + Loop + FileOpenDialog() + ShellExecute() (latest Beta) or Run() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
alex OF DEATH Posted October 22, 2006 Share Posted October 22, 2006 (edited) Would it not be easier to simpy open the three Chosen .exe's?Or is there a particular reason for these 'links?'Also, for the Log thing, do you mean, if the files were moved, the log would still show where the .exe's are located, or do you mean, it just shows what .exe's were executed? Edited October 22, 2006 by alex OF DEATH Link to comment Share on other sites More sharing options...
smashly Posted October 22, 2006 Share Posted October 22, 2006 I just made something similar to what you asked about Lambort.But my utter no skill n00b over bloated autoit script is poor example to go by .. But have a look for kicks if you like...utilitray(A shameful chance to plug my script , I just couldn't resist. :"> ) Link to comment Share on other sites More sharing options...
Golbez Posted October 22, 2006 Share Posted October 22, 2006 (edited) run("C:\Program Files\Pegtop\PStart\PStart.exe") etc Edited October 22, 2006 by Golbez Link to comment Share on other sites More sharing options...
Lambort Posted October 22, 2006 Author Share Posted October 22, 2006 (edited) Maybe if I explain the use of the program people can get a better feel of what its fore (i thought it was a good idea so dont steal it! ). The log file is so when you open it after making the links the links are still there after it opens the next time. the use: if you have all these links in one program, you can just send a shortcut to the program an put it on your esktop, then, when you open the program, you have all of your exe shortcuts, meaning you only have ONE shortcut on your esktop an you just run it and you can get to everything else from the one program (my esktop gets junked up fast lol). Edited October 22, 2006 by Lambort Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 22, 2006 Moderators Share Posted October 22, 2006 Maybe if I explain the use of the program people can get a better feel of what its fore (i thought it was a good idea so dont steal it! ).The log file is so when you open it after making the links the links are still there after it opens the next time.the use: if you have all these links in one program, you can just send a shortcut to the program an put it on your esktop, then, when you open the program, you have all of your exe shortcuts, meaning you only have ONE shortcut on your esktop an you just run it and you can get to everything else from the one program (my esktop gets junked up fast lol).What's the difference from creating a folder with all your links in it and just using ShellExecute() to open the folder? I do this now with all my file extensions, all my exe's are in a EXE_Files, .txt are in TXT_Files, .lnk are in the LNK_Files etc... I made a script to do this many months ago here in the support forum. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Lambort Posted October 22, 2006 Author Share Posted October 22, 2006 What's the difference from creating a folder with all your links in it and just using ShellExecute() to open the folder? I do this now with all my file extensions, all my exe's are in a EXE_Files, .txt are in TXT_Files, .lnk are in the LNK_Files etc... I made a script to do this many months ago here in the support forum.More specifically I want it as a game menu for myself, since i play around....10 different games, it would be very useful to me, and I don't know why it really matters what the use of it is, i'm halfway making this to clean up my desktop, halfway making it to learn more about autoit and coding in general.-Alyssa Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 22, 2006 Moderators Share Posted October 22, 2006 More specifically I want it as a game menu for myself, since i play around....10 different games, it would be very useful to me, and I don't know why it really matters what the use of it is, i'm halfway making this to clean up my desktop, halfway making it to learn more about autoit and coding in general.-AlyssaI've already given you the things you'll need to accomplish what you've asked.Any code you have to show what you've done so far? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Lambort Posted October 22, 2006 Author Share Posted October 22, 2006 (edited) I've already given you the things you'll need to accomplish what you've asked. Any code you have to show what you've done so far? I had a GUI but then I figured I should do the GUI last and work on specific parts of it then impliment them in. So no, at this point I don't really. Except for: FileOpenDialog( "File", "c:\windows", "Exe (*.exe)", 1) Which is nothing really. The reason the default is windows is because I was just testing it. Now I have to get it so when you select the .exe it embeds a button or link (button would be better) into the GUI. Edited October 22, 2006 by Lambort Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 22, 2006 Moderators Share Posted October 22, 2006 I had a GUI but then I figured I should do the GUI last and work on specific parts of it then impliment them in. So no, at this point I don't really. Except for: FileOpenDialog( "File", "c:\windows", "Exe (*.exe)", 1) Which is nothing really. The reason the default is windows is because I was just testing it. Now I have to get it so when you select the .exe it embeds a button or link (button would be better) into the GUI.Before I do a typical me with my comments. How much do you know about programming? Do you know what Variables are and how they are used? Do you know what loops are and how they are used? Do you know what Arrays are and how they are used? If you don't know the answer to at least the first 2 questions, I'd suggest you play with this first: http://www.autoitscript.com/forum/index.php?showtopic=21048 Then you'll see just how easy it is what you are wanting to accomplish. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Lambort Posted October 22, 2006 Author Share Posted October 22, 2006 Before I do a typical me with my comments.How much do you know about programming?Do you know what Variables are and how they are used? Do you know what loops are and how they are used? Do you know what Arrays are and how they are used?If you don't know the answer to at least the first 2 questions, I'd suggest you play with this first: http://www.autoitscript.com/forum/index.php?showtopic=21048Then you'll see just how easy it is what you are wanting to accomplish.I messed around with that, however it didn't help me with what I wish to accomplish, I suppose I can just keep stabbing in the dark with the knowledge I have/the help file and see if I can get anything done. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 22, 2006 Moderators Share Posted October 22, 2006 I messed around with that, however it didn't help me with what I wish to accomplish, I suppose I can just keep stabbing in the dark with the knowledge I have/the help file and see if I can get anything done.I don't get it... what do you mean stab around? I gave you specifics to look at. The program I sent you to wasn't for "your" specific needs, it's to teach you how to use autoit and many of its functions so you at least have a basic understanding. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Lambort Posted October 22, 2006 Author Share Posted October 22, 2006 I don't get it... what do you mean stab around? I gave you specifics to look at. The program I sent you to wasn't for "your" specific needs, it's to teach you how to use autoit and many of its functions so you at least have a basic understanding.I don't know much about coding, however this should be a relatively simple program to make."Array + Loop + FileOpenDialog() + ShellExecute() (latest Beta) or Run()"I don't understand that. All I want is a button to activate the fileopendialog box, select an exe, and it embed a button into the gui that has the button for fileopendialog that someone can click to run the .exe. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 22, 2006 Moderators Share Posted October 22, 2006 I don't know much about coding, however this should be a relatively simple program to make."Array + Loop + FileOpenDialog() + ShellExecute() (latest Beta) or Run()"I don't understand that. All I want is a button to activate the fileopendialog box, select an exe, and it embed a button into the gui that has the button for fileopendialog that someone can click to run the .exe.All of that is in the help file.Are you asking someone to write it for you is that what I'm missing here? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
smashly Posted October 22, 2006 Share Posted October 22, 2006 Small example of input box , browse button , and run button...expandcollapse popup; Script generated by AutoBuilder 0.6 Prototype #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 60,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Group_1 = GuiCtrlCreateGroup("Browse For Program To Run", 10, 0, 310, 50) $ProgramToRun = GuiCtrlCreateInput("", 20, 20, 220, 20) $BrowseButton = GuiCtrlCreateButton("Browse", 250, 20, 60, 20) $RunButton = GuiCtrlCreateButton("Run", 330, 10, 50, 40) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $BrowseButton _browse() Case $msg = $RunButton _run() EndSelect WEnd Exit Func _browse() $selectProgramToRun = FileOpenDialog("Browse for a exe to run...", "","Executable (*.exe)", 1) If Not @error Then GUICtrlSetData($ProgramToRun, $selectProgramToRun) EndIf EndFunc Func _run() $ReadProgramToRun = GUICtrlRead($ProgramToRun) If $ReadProgramToRun <> "" And FileExists($ReadProgramToRun) Then Run($ReadProgramToRun,"",@SW_SHOW) EndIf EndFunc cheers Link to comment Share on other sites More sharing options...
Lambort Posted October 22, 2006 Author Share Posted October 22, 2006 All of that is in the help file.Are you asking someone to write it for you is that what I'm missing here?Why would I want someone to write it for me? that's lame and you must have totally over read where I stated this is half for the learning experience. Link to comment Share on other sites More sharing options...
ame1011 Posted October 22, 2006 Share Posted October 22, 2006 Lambort, he gave you specific functions to look at in the helpfile and he gave you a sample program that uses some of the functions that you need. There is no reason to be asking for anything else.... [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
dabus Posted October 22, 2006 Share Posted October 22, 2006 ... I hope you can find out how to add iniread/write or regread/write. Always select your programs befor running them is not what seems to fit for a program-launcher... If you want to clean up your desktop, I'd use hotkeys --- you don't even have to develop anything. *duck* Link to comment Share on other sites More sharing options...
Lambort Posted October 22, 2006 Author Share Posted October 22, 2006 ... I hope you can find out how to add iniread/write or regread/write. Always select your programs befor running them is not what seems to fit for a program-launcher... If you want to clean up your desktop, I'd use hotkeys --- you don't even have to develop anything. *duck*Exactly what i'm working on now, a save button for each of the exe's you select so they will be there by default when you open it up the next time.ps: thanks a load Smashly, that script helped out a whole whole whole lot. 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