autonew Posted August 29, 2010 Share Posted August 29, 2010 (edited) Hi everyone, I'm an experienced developper in other languages, so i thought i willl not have many difficulties with autoit.. But .. for others languages i nearly always know which api to use, wich keywords to google etc.. and it seems that i loose the used to dont know how to search. So i'd like few orientations for my first program. By orientation, i mean just a bunch of keywords that i should search in documentation to initiate and finish my first program. Also dont think that i'm laisy, i just want to learn fast, and while waiting for u guys to advise me here, i'm reading generalistics tutorials about autoits (history etc.. ) Here is what i want to be able to do soon : - Schedule an action - Start a graphical program ( like word, excel, etc.. anything ) - Click in a particular area of the program ( a cell, a form field, etc.. ) - Send a confirmation email "action done" + report of any form ( screenshot, or maybe just the raw text resultst if the confirmation message is a network stream, or maybe more clever : select and copy paste the main window text ) If it was for a web application i know that i can do sucks things "easily" with Java + Junit + selenium Remote Control, but i think what seems pretty cool with autoit is that it works for everything, so please, dont ask me to use something else than autoit, but just write me what i should look for for every steps i need. Thanks in advance for your wise and valuables advices Edited August 29, 2010 by autonew Link to comment Share on other sites More sharing options...
JohnOne Posted August 29, 2010 Share Posted August 29, 2010 - Schedule an action -- There are tons of ways to do this, timers, Timerinit() TimerDiff(), infinite loop checking the time/date @DAY @HOUR etc.. and more - Start a graphical program ( like word, excel, etc.. anything ) -- Run(), ShellExecute() - Click in a particular area of the program ( a cell, a form field, etc.. ) -- Again plenty of ways, most application specific. - Send a confirmation email -- Use one of the many examples on the forum, or help file, _INetSmtpMail() being one of them. For the record, Yes I think you are lazy 100%, its that or simple, take your pick. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
autonew Posted August 29, 2010 Author Share Posted August 29, 2010 (edited) Hello thanks for your answer. About the @ things like @DAY @HOUR etc.. in an infinite loop, it's an easy idea, and i like it, thanks ! I tried the following, just to check that the values of @ variables can change during execution and i found something strange : $h1 = @MSEC sleep(400) $h2 = @MSEC MsgBox(0, "test","H1 = " & $h1 & " H2 = " & $h2) Never give $h1+400 but nearly always h1+600. Anyway, it seems to work with @SEC / HOUR / MIN, wich is precise enought for me. About : "- Click in a particular area of the program ( a cell, a form field, etc.. ) -- Again plenty of ways, most application specific." So there is no generic way to do this ? I know that's what u wrote, but i think it's "too bad" and probably not that complicated with a screenshot (and i suppose there is hight level wrappers to do that without being obliged to use pixels). Last questions about how to extract data informations : - is acting like a proxy or network sniffer possible ? - can we select and copy paste the main window text ? Thanks anyway for the answer to the others things. Edited August 29, 2010 by autonew Link to comment Share on other sites More sharing options...
Tvern Posted August 29, 2010 Share Posted August 29, 2010 (edited) Never give $h1+400 but nearly always h1+600. Actually if you run enough tests you'll find that it's about 40%-60% which is what I'd expect. Local $i = 0, $nPos = 0, $nNeg = 0 Local $h1, $h2 While 1 $i += 1 $h1 = @MSEC sleep(400) $h2 = @MSEC If $h2 - $h1 > 0 Then $nPos += 1 Else $nNeg += 1 EndIf ConsoleWrite(@CRLF & @CRLF & @CRLF & @CRLF) ConsoleWrite("Result has been positive " & $nPos & " times. (" & Round(($nPos/$i)*100,2) & "%)" & @CRLF) ConsoleWrite("Result has been negative " & $nNeg & " times. (" & Round(($nNeg/$i)*100,2) & "%)" & @CRLF) WEnd edit: missed a bracket Edited August 29, 2010 by Tvern Link to comment Share on other sites More sharing options...
autonew Posted August 29, 2010 Author Share Posted August 29, 2010 (edited) Nice, it's pretty cool having so few lines of codes to have something working I hope it will be the same for my program (but i really doubt ) Edit: Questions still active if some can answer : Is there a generic way to locate an area of an application ? ( essentialy form fields ) Is it possible to capture network informations like a sniffer ? Can we select and copy paste the main window text ? Edited August 29, 2010 by autonew Link to comment Share on other sites More sharing options...
somdcomputerguy Posted August 29, 2010 Share Posted August 29, 2010 Read the Help file, then re-read the Help file, it's a pretty specific 'generalistic tutorial'; see what AutoIt can do; that should answer lots of questions.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
autonew Posted August 29, 2010 Author Share Posted August 29, 2010 yes i know and that's what i was doing, i was reading tutorials & things. Helps forums are pretty useless if it is only to say "RTFM" because i dont need anybody for that, nor i need you to explain me what i read in those documentations, so except for really stupid guys wich will never be able to do anything with computer, help forums should be used to save time to each others. if i asked it's because i thought you can save me some time. "it's somewhere in the internet RTFM.", nobody needs you to say that (even if you did with poitness), just buy a parrot. Feel free to not answer anything and to ban me as well, as you were right, i can do everything by myself I'm still curious about what kind of help people can request in this forum section as everything is on the internet or in the source code, except brain deficients wich needs help to debug. Link to comment Share on other sites More sharing options...
targeter Posted August 29, 2010 Share Posted August 29, 2010 So..... what are you getting at? Your grammar is taking me some time to decode. You want us to save you time by providing code? Instead of pointing you in the right direction? For an experienced developer in other languages, you are asking questions that would be all answered if you read about 2 pages of autoit capabilities. The function wiki is a goldmine for learning. You say you want to learn fast and are competent to self-code, yet also ask for chunks of code? The Forums have a search function... Link to comment Share on other sites More sharing options...
JohnOne Posted August 29, 2010 Share Posted August 29, 2010 yes i know and that's what i was doing, i was reading tutorials & things.Helps forums are pretty useless if it is only to say "RTFM" because i dont need anybody for that, nor i need you to explain me what i read in those documentations, so except for really stupid guys wich will never be able to do anything with computer, help forums should be used to save time to each others. if i asked it's because i thought you can save me some time."it's somewhere in the internet RTFM.", nobody needs you to say that (even if you did with poitness), just buy a parrot.Feel free to not answer anything and to ban me as well, as you were right, i can do everything by myself I'm still curious about what kind of help people can request in this forum section as everything is on the internet or in the source code, except brain deficients wich needs help to debug. I knew you were an arse, you did not disappoint.Thanks sweetheart. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
czardas Posted August 30, 2010 Share Posted August 30, 2010 I'm an experienced developperHere is what i want to be able to do soon :- Schedule an action- Start a graphical program ( like word, excel, etc.. anything )- Click in a particular area of the program ( a cell, a form field, etc.. )- Send a confirmation email "action done" + report of any form ( screenshot, or maybe just the raw text resultst if the confirmation message is a network stream, or maybe more clever : select and copy paste the main window text )Now what is that all about? operator64 ArrayWorkshop 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