Zompy Posted March 21, 2009 Posted March 21, 2009 My first real script, though, i think it's nice HotKeySet("{F1}", "Mail") HotKeySet("{F2}", "Pass") Func Mail() ;Enter your mail under this Send(" XX@XX.XX") EndFunc Func Pass() ;Enter your password under this Send("XXXXXX") EndFunc Run ("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") Winwaitactive ("Windows Live Messenger") Send ("{F1}") Sleep ("10") Send ("{TAB}") Sleep ("10") Send ("{F2}") Sleep ("10") Send ("{ENTER}") Winwaitactive ("Windows Live Messenger")
Developers Jos Posted March 21, 2009 Developers Posted March 21, 2009 What should this do in your oppinion ? sleep("10") Also why set hotkeys and use a Send() in stead of sending the needed info directly? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Zompy Posted March 21, 2009 Author Posted March 21, 2009 My first real script, though, i think it's niceHotKeySet("{F1}", "Mail")HotKeySet("{F2}", "Pass")Func Mail();Enter your mail under this Send(" XX@XX.XX")EndFuncFunc Pass();Enter your password under this Send("XXXXXX")EndFuncRun ("C:\Program Files\Windows Live\Messenger\msnmsgr.exe")Winwaitactive ("Windows Live Messenger")Send ("{F1}")Sleep ("10")Send ("{TAB}")Sleep ("10")Send ("{F2}")Sleep ("10")Send ("{ENTER}")Winwaitactive ("Windows Live Messenger")It didn't work good without the sleep, so i give it a little sleep so it could TAB better.The hotkeys, well, thats actually for when your using lonegr scripts, if i want to imporve this script later onand it is getting better, it's more Handy to use that then to edit all the script.Also if you use that multiple times you've got toe dit it multiple tims, now only Once.
Developers Jos Posted March 21, 2009 Developers Posted March 21, 2009 (edited) It didn't work good without the sleep, so i give it a little sleep so it could TAB better. The hotkeys, well, thats actually for when your using lonegr scripts, if i want to imporve this script later on and it is getting better, it's more Handy to use that then to edit all the script. Also if you use that multiple times you've got toe dit it multiple tims, now only Once.Sleep() takes a number as parameter not a string. So you probably want to do something like Sleep(50) As far as the HotKeys. I don't really understand what your explanation has to do with using hotkeys. Just put the Emailaddress and password in a variable at the start of the script and use these variables in the Send() command further on in your script. $Email = "XX@XX.XX" $password = "XXXXXX" ; Run ("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") Winwaitactive ("Windows Live Messenger") Send ($Email) Sleep (50) Send ("{TAB}") Sleep (50) Send ($password) Sleep (50) Send ("{ENTER}") ; Ideally you would use Control() commands to enter the information in the login screen. Jos Edited March 21, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Zompy Posted March 21, 2009 Author Posted March 21, 2009 When i did that, it tried logging on with the mail $email So then i came up with this idea...
CodyBarrett Posted March 21, 2009 Posted March 21, 2009 (edited) just a hint for future reference YOU MIGHT get a better and nicer response to your scripts if you used Example for your code.... and nice manipulation, but where is the WHILE WEND..... and good luck making it better! EDIT saw your winwait() sorry never mind the while wend! Edited March 21, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size]
Developers Jos Posted March 21, 2009 Developers Posted March 21, 2009 (edited) just a hint for future reference YOU MIGHT get a better and nicer response to your scripts if you used .... ... are you telling me I wasn't nice enough in my responses or they were not good? Edited March 21, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
CodyBarrett Posted March 21, 2009 Posted March 21, 2009 haha nope.. just that sometimes people get annoyed with the lack of proper code brackets.. there are quit afew posts where ive seen people yelling at the new scripters... i thought i would give a hint [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size]
Zompy Posted March 22, 2009 Author Posted March 22, 2009 Ok, thanks, i might be looking into GUI now, heared what it is aan seemed intresting
corgano Posted March 23, 2009 Posted March 23, 2009 heres an idea use controlclick(). it helps reduse problems. its simple enought to get the control ID useing "autoit window info.exe" also included the hotkey, don't really need it tho. F2 hotkeyset("{F2}","imafoo") Global $Email = "XX@XX.XX" Global $password = "XXXXXX" func imafoo() Run ("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") Winwaitactive ("Windows Live Messenger") controlclick("","",<ID NUMBER>);get id of email box Send ($Email) Sleep (50) controlclick("","",<ID NUMBER>);get id of password box Send ($password) Sleep (50) controlclick("","",<ID NUMBER>);get id of login button exit endfunc 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e
BinaryBrother Posted March 23, 2009 Posted March 23, 2009 No offense, but there's nothing simple about WLM controls... There a few object oriented functions that could do the job better though, I've been doing a little testing myself... 99% of your control classes are going to return "DirectUIHWND" with an irrelevant ControlID... I say Irrelevant because the "DirectUIHWND" isn't going to give you anything better than a Control that covers the entire Messenger window... . Making a specific controlclick() or other control related task somewhat difficult... http://www.autoitscript.com/forum/index.php?showtopic=10339Some work for WLM, and some don't... After looking at MSDN for literally hours, among other resources, I did manage to find an 'AutoSignin' function, as well as a 'Signin', but I've not had the chance to test them... SIGNATURE_0X800007D NOT FOUND
Zompy Posted March 23, 2009 Author Posted March 23, 2009 How does this controlclick work? and the script you posted doesn't work for me
Zompy Posted March 24, 2009 Author Posted March 24, 2009 How does this controlclick work? and the script you posted doesn't work for me
BinaryBrother Posted March 24, 2009 Posted March 24, 2009 (edited) As shown in your first post you are using "Windows Live Messenger". As I stated above, control clicks aren't going to help you with WLM unless you use coordinates, if your going to use Coordinates you might as well use 'MouseClick()' because your not going to be able to set the text using Control Commands. If your doing this on a personal level, you can try something like this... ControlClick("Windows Live Messenger","","[CLASS:DirectUIHWND]","Primary",1,247,240)oÝ÷ Ù8Z· +Çè¬Æ¢ÝvzÆî·¥j+zØZX¤z§¢Ü(®Gè¯*.jÂ7ök.ì«Þv'ßz·§¶Ç+yéëzÊ%ºØ¨Æ§uØ}êÞÚÞ«b½ç(¢·b«^±Û¶b}÷«zw²)躹²Ç§êìþØ^ë?z×¢¹¶¡×nÞrXËazë®v¦yøÚ'1ë,zx6¤x*+©èßÛvø¬y©Ý$jÚ®¢Ð.¶-Z)Ý£'~®¢Ûh¢[ajܲ)Üç^Â+aÊ«ëh"ا²Ö¥«b¢r-Â)emæ æéijëh×6ShellExecute(@ProgramFilesDir & "\AutoIt3\AutoIt3.chm") Run(@ProgramFilesDir & "\AutoIt3\Au3Info.exe") This is some powerful code, try running it if you get into any trouble... Edited March 24, 2009 by BinaryBrother SIGNATURE_0X800007D NOT FOUND
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