carfan Posted November 10, 2007 Share Posted November 10, 2007 Is there anyway to open an options box with autoit? To be more specific with a .cmd file you can open a command window and have choices of what to do next. Ex: 1. Run with runscanner 2. Run w/o runscanner 3. Download updates 4. Delete files from temp 5. Exit and by entering the appropriate number cary out that task. If so, please provide example. Thanks Carfan Link to comment Share on other sites More sharing options...
Blue_Drache Posted November 10, 2007 Share Posted November 10, 2007 www.rentacoder.com Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Developers Jos Posted November 10, 2007 Developers Share Posted November 10, 2007 Is there anyway to open an options box with autoit? To be more specific with a .cmd file you can open a command window and have choices of what to do next. Ex: 1. Run with runscanner2. Run w/o runscanner3. Download updates4. Delete files from temp5. Exitand by entering the appropriate number cary out that task.Sure... open the helpfile and read to see whats all possible ..If so, please provide example.ThanksCarfanYou're kidding? right ? There are a zillion examples in the forums and helpfile SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted November 10, 2007 Share Posted November 10, 2007 Indeed there are a lot of examples but i've created one for him/here .. so i can also help someone .. i think he/she needs it for BartPe .. because i see RunScanner which is made by ParaGlider expandcollapse popup#NoTrayIcon #include <GUIConstants.au3> #include <misc.au3> AutoItSetOption("TrayIconHide", 0) TraySetState(2) $parent = GUICreate("OptionGUI", 200, 150, -1, -1) GuiCtrlCreateLabel ("1. Run with runscanner", 20,20,160,20) GuiCtrlCreateLabel ("2. Run w/o runscanner", 20,40,160,20) GuiCtrlCreateLabel ("3. Download updates", 20,60,160,20) GuiCtrlCreateLabel ("4. Delete file from temp", 20,80,160,20) GuiCtrlCreateLabel ("5. Exit", 20,100,100,20) GUISetIcon("shell32.dll", -3) GUISetState(@SW_SHOW, $Parent) Func Program_1() ; your program EndFunc Func Program_2() ; your program EndFunc Func Program_3() ; your program EndFunc Func Program_4() ; your program EndFunc While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit If _IsPressed("31") And WinActive("OptionGUI") Then Program_1() If _IsPressed("32") And WinActive("OptionGUI") Then Program_2() If _IsPressed("33") And WinActive("OptionGUI") Then Program_3() If _IsPressed("34") And WinActive("OptionGUI") Then Program_4() If _IsPressed("35") And WinActive("OptionGUI") Then Exit WEnd Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
carfan Posted November 11, 2007 Author Share Posted November 11, 2007 Indeed there are a lot of examples but i've created one for him/here .. so i can also help someone .. i think he/she needs it for BartPe .. because i see RunScanner which is made by ParaGlider expandcollapse popup#NoTrayIcon #include <GUIConstants.au3> #include <misc.au3> AutoItSetOption("TrayIconHide", 0) TraySetState(2) $parent = GUICreate("OptionGUI", 200, 150, -1, -1) GuiCtrlCreateLabel ("1. Run with runscanner", 20,20,160,20) GuiCtrlCreateLabel ("2. Run w/o runscanner", 20,40,160,20) GuiCtrlCreateLabel ("3. Download updates", 20,60,160,20) GuiCtrlCreateLabel ("4. Delete file from temp", 20,80,160,20) GuiCtrlCreateLabel ("5. Exit", 20,100,100,20) GUISetIcon("shell32.dll", -3) GUISetState(@SW_SHOW, $Parent) Func Program_1() ; your program EndFunc Func Program_2() ; your program EndFunc Func Program_3() ; your program EndFunc Func Program_4() ; your program EndFunc While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit If _IsPressed("31") And WinActive("OptionGUI") Then Program_1() If _IsPressed("32") And WinActive("OptionGUI") Then Program_2() If _IsPressed("33") And WinActive("OptionGUI") Then Program_3() If _IsPressed("34") And WinActive("OptionGUI") Then Program_4() If _IsPressed("35") And WinActive("OptionGUI") Then Exit WEnd Thanks Emiel. I really appreciate your example. I've just started using autoit and have already succeeded in converting some of my old dos .cmd stuff. I'm glad you took the time to make an example for me. Your right, I use a form of bartpe in UBCD4Win and more often Reatogo. I've even been playing with Winbuilder scripts. That's actually where I was introduced to AutoIt. I must admit I'm a novice to script writing with no formal education but I am quit resourceful in once I have figured a basic setup I can adapt it to my individual needs. I'm a don't give up to I conquer a problem type of person. If I ask silly questions for a while, please bear with me till I get my feet wet. What I usually do when I build a plugin or a script is give choices of what to do with the program. Right now I'm mainly working on programs that are written to ram with choices to update, run with local or remote user profiles and to delete the program dir when done to save ram space for the next program. I specialize in lost data and operating system recovery due to virus or spyy-malware attacks. Thanks again for your help. A newby doesn't want to be shot down on the first post. Thanks Carfan Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted November 11, 2007 Share Posted November 11, 2007 Hi Carfan, I'm also a BartPe user and plugin creator.. and that's the reason i started with autoit .. because there are some limitations with cmd/batch files. I'm also a novice autoit user with no programming background .. The people in this forum are very NICE and always willing to help novice users like us.. but you asked the most basic thing of autoit.. and that the reason why you got (like you said) allmost shot down on your first post. I've made the script for you to point you into the right direction ... i also added _Ispressed and WinActive to give you a more advanced example of the more used HotKeySet (which allways works when program is run, even it's not the application in the foreground) glad i could help Emiel Wieldraaijer Best regards,Emiel Wieldraaijer 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