Valik Posted June 21, 2009 Share Posted June 21, 2009 Hmm, sorry then, I thought that was about modularizing AutoIt's functions, not the include files(?)It is. But a lot of the same reasons apply to both. Link to comment Share on other sites More sharing options...
trancexx Posted June 21, 2009 Share Posted June 21, 2009 No, really. He is very likely misunderstood. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
ADS3 Posted June 21, 2009 Author Share Posted June 21, 2009 Congratulations, you now know how to write bad code. Thanks, at least works for me ^^, it's simple, the compiler when read an include just use all the code that is inside of the included au3, i could just past all that code myself instead, but i think in this way you have more organizated everything this is my code If $CmdLine[0] <> 0 Then Switch $CmdLine[1] Case "Nombres" #include "NombresCore.au3" Case "Contador" #include "ContadorCore.au3" EndSwitch Else If @Compiled = 0 Then ShellExecute(@AutoItExe, '"' & @ScriptFullPath & '" Nombres') ShellExecute(@AutoItExe, '"' & @ScriptFullPath & '" Contador') Else ShellExecute(@ScriptFullPath, "Nombres") ShellExecute(@ScriptFullPath, "Contador") EndIf EndIf so you have 2 process running the same EXE but with different purposes i will add the solution in the first post, so if anyway have the same problem that can help a little Link to comment Share on other sites More sharing options...
Valik Posted June 21, 2009 Share Posted June 21, 2009 But it's stupid. Put the code inside a function. Call the function inside the conditional statements. Duh. Very basic problem very basic solution. The code you have now is a disaster waiting to happen. Using an #include file as a block of code in this manner is flat out bad programming and I'm exceptionally disappointed that the numerous MVPs who've seen this thread haven't come down on you for it. Link to comment Share on other sites More sharing options...
ADS3 Posted June 21, 2009 Author Share Posted June 21, 2009 But it's stupid. Put the code inside a function. Call the function inside the conditional statements. Duh. Very basic problem very basic solution. The code you have now is a disaster waiting to happen. Using an #include file as a block of code in this manner is flat out bad programming and I'm exceptionally disappointed that the numerous MVPs who've seen this thread haven't come down on you for it.i'm limited on how much autoit can offer. well at least look pretty decent to mebtw the exes work together, i have a GUI with multiple tabs just like Chrome but way basic anyway i'm still waiting for a more professional way to do it without having to have multiple exes or a3x Link to comment Share on other sites More sharing options...
Valik Posted June 21, 2009 Share Posted June 21, 2009 anyway i'm still waiting for a more professional way to do it without having to have multiple exes or a3xI just told you. Link to comment Share on other sites More sharing options...
BrettF Posted June 21, 2009 Share Posted June 21, 2009 But it's stupid. Put the code inside a function. Call the function inside the conditional statements. Duh. Very basic problem very basic solution. The code you have now is a disaster waiting to happen. Using an #include file as a block of code in this manner is flat out bad programming and I'm exceptionally disappointed that the numerous MVPs who've seen this thread haven't come down on you for it.I was just leaving him to fail... And to have you come along and talk to him Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 22, 2009 Share Posted June 22, 2009 I was rather fond of how he said thanks when Valik congratulated him on bad code. 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