Jump to content

Need help Guys


Samir90
 Share

Recommended Posts

I just made a GUI opening youtube

I want to make clicks only inside GUI(let's say if i have a photo on full screen and the GUI is behind that photo I still want a video from GUI browser to be clicked without clicking the photo)

Hope you guys will understand because I cant explain so good....

Here is the code:

HotKeySet("{ESC}", "Quit")

Example()

Func Example()

    $oIE = ObjCreate("Shell.Explorer.2")
    GUICreate("",800, 600, 0 , 0)
    $GUIActiveX = GUICtrlCreateObj ($oIE, 0, 0, 800, 600)
    $oIE.navigate("https://www.youtube.com")
    GUISetState()

    While 1
        sleep(1000)
    WEnd

    GUIDelete()

 EndFunc

Func Quit()
    Exit
EndFunc

 

Edited by JLogan3o13
Link to comment
Share on other sites

  • Moderators

@Samir90 in the future please surround your code with code tags, I have done so for you this time. Also, please give thought to giving meaningful titles to your post, this is General Help and Support, everyone needs help.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Sorry was my first post.... and thank you JLogan3o13

Let's say i have a button on that GUI and I want that button to get clicked 

MouseClick dosen't work because it do a click on a specified location x and y 

If the GUI is behind a photo I don't want the photo to get clicked I still want the button to be clicked

Link to comment
Share on other sites

Open the help file, find the function, look at the example script in the help file to see how it is used.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I did that but i cant figure it out....

Ok lets say my code open a browser with a video and i want to click that video 5000 times(pause and unpause)(let's say it take 5 min(got a random number of min))

After I start the program I have a GUI and I want to still do the pause unpause... if I open a picture in full screen and the GUI is behind that photo

It is just an example I just want to find how to do this...

Link to comment
Share on other sites

You get the ID if the control you want to click, you can do that with window info tool.

Nine times out of ten, it does not matter if the window containing the control is behind another or even minimized, it will still click it.

You need to look at the example again and adapt it to your real life problem.

Posting that real life problem with links, names of applications etcetera, will get you better help that vague "let's says".

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

Thank you @JohnOne I did that but the Id is always random no? 

That make the program usable once

I updated the program for a real example and I want the program to do what this does behind a photo sorry but I did it with MouseClick : 

HotKeySet("{ESC}", "Quit")

Example()

Func Example()

    $oIE = ObjCreate("Shell.Explorer.2")
    GUICreate("ClickHere",800, 600, 0 , 0)
    $GUIActiveX = GUICtrlCreateObj ($oIE, 0, 0, 800, 600)
    $oIE.navigate("https://www.youtube.com/watch?v=uyCP2IfGTcY")
    GUISetState()
    Sleep(5000)
    MouseClick("left",200,200,12)
    While 1
        sleep(1000)
    WEnd

    GUIDelete()

 EndFunc

Func Quit()
    Exit
EndFunc

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...