Slym Posted January 24, 2010 Posted January 24, 2010 Hi there ! I'm looking for a way to have an application that would be both a GUI and a command line application. I found a way to do that but it's not very clean. This code would do the trick (use it only compiled or it will hide you Scite Editor !) #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** if $CmdLine[0]>0 then ConsoleWrite("test1" & @CRLF) Else WinSetState(@ScriptDir, "", @SW_HIDE) MsgBox(0,"mkklmklm","toubiou") EndIf Basically, my application would start as a GUI only if no parameters are passed. This would be very useful for blind people. Thank you in advance. --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] ---------------------
Slym Posted November 29, 2011 Author Posted November 29, 2011 Me again ... one year later doing the same research --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] ---------------------
Shaggi Posted November 29, 2011 Posted November 29, 2011 Checkout the console.au3 in my sig. Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG
Slym Posted November 29, 2011 Author Posted November 29, 2011 Thank you ... I did see your post but did not think it was able to do that. I will try your UDF. --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] ---------------------
Slym Posted November 29, 2011 Author Posted November 29, 2011 I tried it and it's great. Can it work without opening a new console when called from an existing one ? --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] ---------------------
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