345138 Posted September 3, 2008 Posted September 3, 2008 cls title 345138 compiler. goto cjc :c2 if exist src (goto cl) else (goto c3) :c3 if exist *.java (goto cl2) else (goto ce) :c4 %javac% -cp . *.java echo - Completed - pause cls goto menu :c5 %javac% -cp . .\src\*.java echo - Completed - pause move .\src\*.class .\classes\ cls goto menu :ce cls echo You need to have Java files for this Compiler to Compile. pause cls Thats the code. How would i implant it into a autoit 3 code.
enaiman Posted September 3, 2008 Posted September 3, 2008 Have you searched the forums yet? Do a search for "bat" in "Example Script" forum. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
enaiman Posted September 4, 2008 Posted September 4, 2008 i have, nada came up... no kidding ?What about this thread? http://www.autoitscript.com/forum/index.ph...7975&hl=bat... kinda hard to find it ... took an eternity to configure the search and browse the results ... SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
345138 Posted September 4, 2008 Author Posted September 4, 2008 I know. but im gonna substitute au3 code for that.
345138 Posted September 4, 2008 Author Posted September 4, 2008 I dont want to have it read the .bat file i need the code to be in the .au code.
345138 Posted September 4, 2008 Author Posted September 4, 2008 I know how to do everything else now, i just need the code translated.
LongBowNZ Posted September 4, 2008 Posted September 4, 2008 Post the full .bat code and someone might translate it for you if they are bored. But don't expect anyone to write something for you, they don't have to, you are not paying for our help
345138 Posted September 5, 2008 Author Posted September 5, 2008 Im ten, what do you want me to pay with Virtual Dollars?
LongBowNZ Posted September 5, 2008 Posted September 5, 2008 Im ten, what do you want me to pay with Virtual Dollars?You could start learning how to do it yourself or do what I said in the first place and post the full bat code and someone might translate it for you.
LongBowNZ Posted September 5, 2008 Posted September 5, 2008 You're not listening to anyone here. IT WOULD BE A HELL OF A LOT EASIER TO TRANSLATE THAT .BAT CODE TO .AU3 IF WE HAD THE WHOLE .BAT. Get it now?
345138 Posted September 7, 2008 Author Posted September 7, 2008 if ur so good at translating than why cant you just translate this part/
bogQ Posted September 7, 2008 Posted September 7, 2008 (edited) if ur so good at translating than why cant you just translate this part/ from help file Func...Return...EndFunc you cant geave whall code, so i think that only thing left is to show you how func() work, I know how to do everything else now, i just need the code translated. hah if you know everuthing that you dont need someone else to translate it 4 y. ; Sample script with three user-defined functions ; Notice the use of variables, ByRef, and Return $foo = 2 $bar = 5 msgBox(0,"Today is " & today(), "$foo equals " & $foo) swap($foo, $bar) msgBox(0,"After swapping $foo and $bar", "$foo now contains " & $foo) msgBox(0,"Finally", "The larger of 3 and 4 is " & max(3,4)) Exit Func swap(ByRef $a, ByRef $b);swap the contents of two variables Local $t $t = $a $a = $b $b = $t EndFunc Func today();Return the current date in mm/dd/yyyy form return (@MON & "/" & @MDAY & "/" & @YEAR) EndFunc Func max($x, $y);Return the larger of two numbers If $x > $y Then return $x Else return $y EndIf EndFunc ;End of sample script so now you know how to use func (replacement 4 goto command) i hope that youl successfully thanslate your .bat with help of help file Edited September 7, 2008 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Â
enaiman Posted September 7, 2008 Posted September 7, 2008 if ur so good at translating than why cant you just translate this part/I guess this last remark just shut the door for any helper - you're not only lazy and ignorant, you're rude too. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
LongBowNZ Posted September 7, 2008 Posted September 7, 2008 if ur so good at translating than why cant you just translate this part/Because parts that are needed aren't included in the bat code you posted smart-arse.So post the full code and I might translate it for you.OR If you want to continue being a smart-arse then post another "I just need this part translated" or similar and that's when I will stop posting in this thread.
rudi Posted September 8, 2008 Posted September 8, 2008 (edited) Hi. First of all: I'n note bored, as someone might assume The way CMD scripts and the way autoit work is pretty different. So you will have to forget about your batch file :LABELS, they simply do not exist in autoit at all. expandcollapse popup; ";" starts comment lines Dim $Java = "C:\Where\THis\Prog-is.exe" Func c2() If FileExists("src") Then ; you will have to use fileexist also for DIRs, see helpfile. cl() Else c3() EndIf EndFunc ;==>c2 Func c3() If FileExists("*.java") Then cl2() Else ce() EndIf EndFunc ;==>c3 Func c4() RunWait($Java & " -cp . *.java") MsgBox(64, "Done", " Completed") ; pause -> not needed, the Message Box will give you the "Wait" eqiv. ; cls ; goto menu EndFunc ;==>c4 Func c5() RunWait($Java & " -cp . .\src\*.java") ; echo - Completed - MsgBox(64, "Done", " Completed") ; pause FileMove(".\src\*.class", ".\classes\") ; cls ; goto menu EndFunc ;==>c5 Func ce() ; cls MsgBox(48, "Info", "You need to have Java files for this Compiler to Compile.") ; pause ; cls EndFunc ;==>ce This is a "freehand" QND "transform" of the batch file part you gave to us. To get started with autoit, go to the download page. - get the latest version of autoit - get the latest version of the autoit customized scite editor - install both of them - start scite editor. Press <F1> to open the Autoit Help File - read through the documentation. For a ten year old this might be somehow hard, but the big bunch of examples will teach you much more then such a "BAT-Transform" I've given to you. Read, try, read, try, -- have FUN Enjoy, Rudi. Edited September 8, 2008 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE!
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