SandraParis Posted January 16, 2005 Posted January 16, 2005 Hi everybody, Sorry to disturb you... I really tried to solve my problem alone, but it still is not working properly... and I really don't know why. It is the first time I do a script... I am a camgirl (really ;-) ) and I try to solve a problem which is that I cannot type on my keyboard at some moment, because I am too far away or either my hands are busy What I tryed to do is to automatize the "enter" (ok) in a pop up each time someone want to access my webcam on a certain site. The difficulty is that the pop ups are either IE windows, or another pop up coming from the software I use to stream my webcam. I have the name of the two windows, and I would like the script to clic on an area (I have the x,y) when each one of these windows prompt... What I did, as a newbie, is two scripts, one for each window with specific x,y each time and specific window name... I am sure there is a way to make only one script... but each one of the script is not working properly ... so I probably have a lot of work with this script... Can someone help me ? I copy you the script I made... but please, don't laugh While 1 = 1 ; when the "title" window appear, then move the mouse to (682,509) WinWaitActive ( "Microsoft Internet Explorer", "") MouseMove (682, 509, 10) MouseClick ("left") Sleep (2500) Wend the second script is: While 1 = 1 ; when the "title" window appear, then move the moUse to ( 1254, 286, 10) WinWaitActive ( "Microsoft Internet Explorer", "") MouseMove (1254, 286, 10) MouseClick ("left") Sleep (1500) Wend Thanks a lot for every help ! Sandra
SlimShady Posted January 16, 2005 Posted January 16, 2005 (edited) Welcome! I'm not sure if this works. While 1 ; when the 1st IE window appears, then click the mouse at (682,509) WinWait("Microsoft Internet Explorer", "") WinActivate("last") MouseClick("left", 1254, 286, 1, 10) If WinExists("last") Then WinWaitClose("last") ; when the 2nd window appears, then click the mouse at (1254, 286) WinWait("Microsoft Internet Explorer", "") WinActivate("last") MouseClick ("left", 682, 509, 1, 10) If WinExists("last") Then WinWaitClose("last") Sleep (500) Wend Edit: - Optimized it a bit Happy scripting! Edited January 16, 2005 by SlimShady
MHz Posted January 16, 2005 Posted January 16, 2005 I would also try Opt("WinTitleMatchMode", 2) with SlimShady's script. The allows "Microsoft Internet Explorer" to be any part of the title, rather from the beginning, where it will not be. And have the browser window maximized, for good positioning?
ezzetabi Posted January 16, 2005 Posted January 16, 2005 (edited) I am pretty sure Opt("WinTitleMatchMode", 2) and WinActivate("last") can't work. While 1 ; when the 1st IE window appears, then click the mouse at (682,509) WinWait("Microsoft Internet Explorer", "") WinActivate("last") MouseClick("left", 1254, 286, 1, 10) If WinExists("last") Then WinWaitClose("last") ; when the 2nd window appears, then click the mouse at (1254, 286) WinWait("Microsoft Internet Explorer", "") WinActivate("last") MouseClick ("left", 682, 509, 1, 10) If WinExists("last") Then WinWaitClose("last") Wend Toke Slimshady code and remove the Sleep(500), the first command of the loop is a WAIT, so it was totally useless. Btw, welcome in the forums. You are most probably the first and only girl around here. A little advice for future posts, put your code inside [ code ] and [ /code ] tags (no spaces, of course) so it will be more readable and all your spaces will be kept. Edited January 16, 2005 by ezzetabi
MHz Posted January 16, 2005 Posted January 16, 2005 (edited) I am pretty sureOpt("WinTitleMatchMode", 2) and WinActivate("last") can't work.I think your right, ezzetabi. Don't you need Opt("WinTitleMatchMode", 4) to use WinActivate("last") ?And Microsoft Internet Explorer, are not the first words in the title bar?So my variation is:Opt("WinTitleMatchMode", 4) While 1 ; when the 1st IE window appears, then click the mouse at (682,509) WinWait("classname=IEFrame", "") WinActivate("last") MouseClick("left", 1254, 286, 1, 10) If WinExists("last") Then WinWaitClose("last") ; when the 2nd window appears, then click the mouse at (1254, 286) WinWait("classname=IEFrame", "") WinActivate("last") MouseClick ("left", 682, 509, 1, 10) If WinExists("last") Then WinWaitClose("last") Wend Edited January 16, 2005 by MHz
ezzetabi Posted January 16, 2005 Posted January 16, 2005 (edited) Ok, so my own version too... $i1 = 'classname=IEFrame';Title of the first window $i2 = 'classname=IEFrame';Title of the second window Opt("WinTitleMatchMode", 4) HotKeySet('^!x','_Terminate');Use CTRL+ALT+X to terminate this script. Do ; when the 1st IE window appears, then click the mouse at (682,509) WinWait($i1) WinActivate($i1) MouseClick("left", 1254, 286, 1, 1) WinWaitClose($i1) ; when the 2nd window appears, then click the mouse at (1254, 286) WinWait($i2, "") WinActivate($i2) MouseClick ("left", 682, 509, 1, 1) WinWaitClose($i2) Until 0 Exit Func _Terminate() Exit EndFunc Added a Hotkey to leave and removed that IF unneeded, finally set the variant for a easier modification. Edited January 16, 2005 by ezzetabi
SandraParis Posted January 16, 2005 Author Posted January 16, 2005 Thanks a lot everybody for al your help !! Sorry for the "code" quote... I will know it for the next time :"> A lot of subtilities are new for me... I hope I will understand them but I will read the help file again for the functions... I will let you know about it... I just have to verify that the 2 windows are spelling the same... (I have a doubt about it)... And also, I could have other questions after using it... But once again, thanks a lot everybody for your kindness ;-) Who said the "galanterie" was dead ?
Nova Posted January 16, 2005 Posted January 16, 2005 Welcome to the forum SandraParis, By the way your probly the only active Girl on the forums, so ull allways have your questions answered with the swiftst of haste Happy scripting, Nova
SandraParis Posted January 16, 2005 Author Posted January 16, 2005 why do you think I mention it in the topic of my post ? No, seriously, I am not lying, I am realy a woman... and also really a woman doing camshows ;-) Probably the only one around here ! Happy new year to everybody, by the way Sandra
Matt @ MPCS Posted January 16, 2005 Posted January 16, 2005 Call me nutty but I assumed Angel was a chick too. Matt
MHz Posted January 16, 2005 Posted January 16, 2005 Welcome and Happy New Year SandraParis. Did that code help you at all?
sugi Posted January 16, 2005 Posted January 16, 2005 No, seriously, I am not lying, I am realy a woman... and also really a woman doing camshows ;-) Probably the only one around here !Pretty sure you're the only one doing cam shows, that's right. But you're not the only female here.
DirtyBanditos Posted January 16, 2005 Posted January 16, 2005 Pretty sure you're the only one doing cam shows, that's right. But you're not the only female here.<{POST_SNAPBACK}> Löl Hello SandraParis Happy New Year
blakel Posted January 16, 2005 Posted January 16, 2005 Sandra, just out of interest, how many PMs did you get saying, "I will write all the code / scripts you ever need for .....".
blakel Posted January 16, 2005 Posted January 16, 2005 Call me nutty but I assumed Angel was a chick too.Matt<{POST_SNAPBACK}>Angel is a very popular spanish male name.
Administrators Jon Posted January 16, 2005 Administrators Posted January 16, 2005 Pretty sure you're the only one doing cam shows, that's right. But you're not the only female here.http://www.autoitscript.com/joncam/ Deployment Blog:Â https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Â https://www.autoitconsulting.com/site/sccm-sdk/
DirtyBanditos Posted January 16, 2005 Posted January 16, 2005 Angel is a very popular spanish male name.<{POST_SNAPBACK}> Yea funny I Think i he is not not A Woman Mail a Great pick from you to his forum))
Nova Posted January 16, 2005 Posted January 16, 2005 http://www.autoitscript.com/joncam/Im afraid to click the link
sugi Posted January 16, 2005 Posted January 16, 2005 Angel is a very popular spanish male name.Wasn't that Angelo, or is that a different name?
Insolence Posted January 17, 2005 Posted January 17, 2005 Awkward. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Recommended Posts