Mat Posted June 20, 2010 Author Share Posted June 20, 2010 NP. I'm gonna put it on my memory stick. It would be a nice shell for working with settings and stuff. Is there a feature to udfs into the program so I can call them from the prompt? Yes... Sort of... Wraithdu mentioned the same thing back here ← and gave a solution a few posts later which is now in the helpfile. If you open the helpfile or type "?" into the console then look under Au3Int -> AutoIt3 Interpreter -> Modifying -> Includes that gives detailed instructions, but since the latest release (1.0.2.3) you can run the interpreter without compiling, so adding includes is easy. Just make sure you don't get yourself caught in infinite loops by trying to use internal variables. Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
FuryCell Posted June 21, 2010 Share Posted June 21, 2010 Yes... Sort of... Wraithdu mentioned the same thing back here ← and gave a solution a few posts later which is now in the helpfile. If you open the helpfile or type "?" into the console then look under Au3Int -> AutoIt3 Interpreter -> Modifying -> Includes that gives detailed instructions, but since the latest release (1.0.2.3) you can run the interpreter without compiling, so adding includes is easy. Just make sure you don't get yourself caught in infinite loops by trying to use internal variables. Mat Thanks for the info. I'm gonna look into that. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
FuryCell Posted June 21, 2010 Share Posted June 21, 2010 (edited) Working on a very simple include to make it easier to use as a command prompt. Transparency would be cool. Theres a nice CMD prompt aero glass script somewhere in this forum. =) Func Dir($sArgs="") CMD('Dir '&$sArgs) EndFunc Func Color($sArgs="") CMD('Color '&$sArgs) EndFunc Func CD($sDir="") EndFunc Func CMD($sCMD) RunWait(@ComSpec&" /c " & $sCMD) EndFunc Edited June 21, 2010 by FuryCell HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Mat Posted June 21, 2010 Author Share Posted June 21, 2010 (edited) Working on a very simple include to make it easier to use as a command prompt. Transparency would be cool. Theres a nice CMD prompt aero glass script somewhere in this forum. =) Func Dir($sArgs="") CMD('Dir '&$sArgs) EndFunc Func Color($sArgs="") CMD('Color '&$sArgs) EndFunc Func CD($sDir="") EndFunc Func CMD($sCMD) RunWait(@ComSpec&" /c " & $sCMD) EndFunc Did you see the other example of modifying? Well that's exactly what I was thinking of commands like that However, you want args... If you look in the biggest switch (about line 110 think) you will see it is a list of commands as they appear before the first space. I will add one in there called "cmd" which does exactly what your last function does I was meaning to do that before anyway... Edit: Done. From 1.0.2.4 "cmd *" will run "cmd /c *". Edited June 21, 2010 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
FuryCell Posted June 21, 2010 Share Posted June 21, 2010 (edited) Did you see the other example of modifying? Well that's exactly what I was thinking of commands like that However, you want args... If you look in the biggest switch (about line 110 think) you will see it is a list of commands as they appear before the first space. I will add one in there called "cmd" which does exactly what your last function does I was meaning to do that before anyway...Edit: Done. From 1.0.2.4 "cmd *" will run "cmd /c *".Awesome. =) Now this is shaping up to beat powershell.Edit:BTW maybe a special charceter as an alias would be good instead of typing cmd everytime. For example to call dir you could do "cmd dir" or "!dir" Edited June 21, 2010 by FuryCell HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Mat Posted June 21, 2010 Author Share Posted June 21, 2010 Awesome. =) Now this is shaping up to beat powershell.Edit:BTW maybe a special charceter as an alias would be good instead of typing cmd everytime. For example to call dir you could do "cmd dir" or "!dir"Or just build dir in. Then it will be... "dir". I'll have a look. The one thing I'm forgetting is that this is an AutoIt Interpreter... at the rate we're going it will be a kickass-do-everything-provided-you-have-room-for-the-gigabyte-helpfile program Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
FuryCell Posted June 21, 2010 Share Posted June 21, 2010 Or just build dir in. Then it will be... "dir". I'll have a look. The one thing I'm forgetting is that this is an AutoIt Interpreter... at the rate we're going it will be a kickass-do-everything-provided-you-have-room-for-the-gigabyte-helpfile program MatIt's a matter of direction. Its up to you to decide weather you want to move this in the direction of a shell or just an interpreter. I personally like the idea of a shell because cmd prompt is lacking and AutoIt has commands very well suited for use as a shell. Plus Au3 users can get the usefulness of powershell without having to go all out and learn something new. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Mat Posted June 21, 2010 Author Share Posted June 21, 2010 It's a matter of direction. Its up to you to decide weather you want to move this in the direction of a shell or just an interpreter. I personally like the idea of a shell because cmd prompt is lacking and AutoIt has commands very well suited for use as a shell. Plus Au3 users can get the usefulness of powershell without having to go all out and learn something new.I agree, and I think that as long as there is no chance that a non-AutoIt command will be confused with an AutoIt one then I'm happy to carry on adding AutoIt Project Listing Link to comment Share on other sites More sharing options...
Mat Posted June 22, 2010 Author Share Posted June 22, 2010 (edited) Version 1.0.2.4 released.This version brings about lots of changes, thanks to Wraithdu and FuryCell.Wraithdu fixed more bugs than I can list off the top of my head, and also came up with a solution for array initialization which works brilliantly, and so completes the interpreters array support at long last, meaning I am now going to move to more things... Functions and objects.FuryCell added the "glass on" and "glass off" commands, as well as reporting his own list of bugs and requesting the "cmd" command.Oh... And I finally managed to tortoiseSVN working well so the project page now has the "source" tab, which can be used to see and comment on the source code without downloading the zip.Changes this version (1.0.2.4): [ see full changelog ]Added: Array initialization support (by Wraithdu)Fixed: General bug fix by Wraithdu: X64 registry paths incorrect.String loop starting at the wrong character offset.Embedded for loops using the same variable.Skipping a loop.( c ) changed to copyright symbol.Added: commands: "install" - Sets *.au3 files to run using the interpreter."uninstall" - Un-sets *.au3 files running with the interpreter."restart" - Restarts the interpreter."glass on" - Sets the consoles background to aero glass (Vista+) - FuryCell"glass off" - Sets the consoles background back to the default (usually black) after a previous call to "glass on" - FuryCell"cmd" - Runs a command prompt command.Added: SVN source repository on project page.DownloadProject pageChangelogBug trackerMat Edited June 22, 2010 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
wraithdu Posted June 22, 2010 Share Posted June 22, 2010 Nice release. Everything looks good Link to comment Share on other sites More sharing options...
Mat Posted June 22, 2010 Author Share Posted June 22, 2010 The only problem I have found is that even if you specify the /AutoIt3ExecuteScript (not sure if thats exact) the console still shows when running it using the command line app.I'm sure you'll be pleased to know that a lot of that array assigning etc. code will now need to be changed to add support for objects... I think we may be able to get away with it for the arrays, but the variable code? not so sure... AutoIt Project Listing Link to comment Share on other sites More sharing options...
wraithdu Posted June 22, 2010 Share Posted June 22, 2010 (edited) I think you'll be pleased to know, that to a GREAT extent, objects are already working: Au3Int -> $oW = ObjCreate("wscript.shell") => Au3Int -> IsObj($oW) => 1 Au3Int -> $oW.Popup("text", 0, "title", 0) => 1 Au3Int -> $ret = $oW.Popup("text", 0, "title", 52) => 6 Au3Int -> $ret => 6 Au3Int -> Dim $as1[1] = [$oW.Popup("text", 0, "title", 52)] => Array[1] [0] => 6 Au3Int -> ReDim $as1[2] => Array[2] [0] => 6 [1] => "" Au3Int -> $as1[1] = $oW.Popup("text", 0, "title", 52) Obscure instruction. Do you want to re-assign 'as1[1]'? y/n y => 7 Au3Int -> $as1 => Array[2] [0] => 6 [1] => 7 Obviously I can't test every object possibility, but the basics seem to be there. A sign of a well written parser Maybe just add a generic object notification in the PrintVar function, since there's no real data to display. Edited June 22, 2010 by wraithdu Link to comment Share on other sites More sharing options...
Mat Posted June 22, 2010 Author Share Posted June 22, 2010 Hmmm... Is there any time you will need to set an object property in AutoIt e.g. "$o.Prop = 42" Becouse thats what I was concerned about. I'm assuming that you can't just use assign on it, and I think I'll need to do a bit of research into how to do it. AutoIt Project Listing Link to comment Share on other sites More sharing options...
wraithdu Posted June 22, 2010 Share Posted June 22, 2010 (edited) Hmm, good point. I'm not a COM guru, so I can't even think of an object where that's necessary off the top of my head. But I see where that might be a problem. It might just be a functional limitation of the interpreter (even AutoIt has functional limitations). Edited June 22, 2010 by wraithdu Link to comment Share on other sites More sharing options...
Mat Posted June 22, 2010 Author Share Posted June 22, 2010 Hmm, good point. I'm not a COM guru, so I can't even think of an object where that's necessary off the top of my head. But I see where that might be a problem. It might just be a functional limitation of the interpreter (even AutoIt has functional limitations).I can't either I guess thats a good thing.Would the AutoIt object UDF do it? I will have a look... AutoIt Project Listing Link to comment Share on other sites More sharing options...
wraithdu Posted June 22, 2010 Share Posted June 22, 2010 AIO uses the same subsystem for objects as AutoIt. Basically it creates custom objects that AutoIt understands, so it's syntactically the same. Link to comment Share on other sites More sharing options...
Mat Posted June 22, 2010 Author Share Posted June 22, 2010 AIO uses the same subsystem for objects as AutoIt. Basically it creates custom objects that AutoIt understands, so it's syntactically the same.Ah right... Never used it But you can make property's with it right? Then surely that means there could be propertys in other objects...the IE com has lots of them $oIE.document.body.innerHTML = $s_html AutoIt Project Listing Link to comment Share on other sites More sharing options...
wraithdu Posted June 22, 2010 Share Posted June 22, 2010 Yep, sure can. Same problem (maybe) with the interpreter remains. But it means we could use the AIO UDF in the interpreter to test it though. Later Time for father's day dinner with dad. Link to comment Share on other sites More sharing options...
Mat Posted June 23, 2010 Author Share Posted June 23, 2010 Yep, sure can. Same problem (maybe) with the interpreter remains. But it means we could use the AIO UDF in the interpreter to test it though. Later Time for father's day dinner with dad.I think the IE com in particular could be useful, and so to have some of the key things missing would not be good... AutoIt Project Listing Link to comment Share on other sites More sharing options...
wraithdu Posted June 23, 2010 Share Posted June 23, 2010 I did some testing, and there is no way that I can come up with to assign a value to an object property. You're best bet would be to add an AutoIt feature request to have Assign() work with object properties, ie Assign("oObj.prop", "data"). 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