Jump to content
Sign in to follow this  
SandraParis

Girl needs help with her script :-)

Recommended Posts

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 :idiot:

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 :D

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

Share this post


Link to post
Share on other sites

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 by SlimShady

Share this post


Link to post
Share on other sites

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?

:idiot:

Share this post


Link to post
Share on other sites

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 by ezzetabi

Share this post


Link to post
Share on other sites

I am pretty sure

Opt("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 by MHz

Share this post


Link to post
Share on other sites

Ok, so my own version too... :idiot:

$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 by ezzetabi

Share this post


Link to post
Share on other sites

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 ?

:idiot::D

Share this post


Link to post
Share on other sites

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 :idiot:

Happy scripting,

Nova

Share this post


Link to post
Share on other sites

why do you think I mention it in the topic of my post ? :idiot:

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 :D

Sandra

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Sandra, just out of interest, how many PMs did you get saying, "I will write all the code / scripts you ever need for .....".

Share this post


Link to post
Share on other sites

Call me nutty but I assumed Angel was a chick too.

Matt

<{POST_SNAPBACK}>

Angel is a very popular spanish male name.

Share this post


Link to post
Share on other sites

Angel is a very popular spanish male name.

Wasn't that Angelo, or is that a different name?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...