Sign in to follow this  
Followers 0
Samir90

Help Click only inside GUI

2 posts in this topic

#1 ·  Posted (edited)

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 Samir90

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

@Samir90, please do not post in more than one forum. Thread locked, as it is basically the exact same as your other post (to which you're already receiving answers!)

In the future, if you feel you accidentally posted in the wrong forum, please MP a member of the Mod team and ask that it be moved.

Edited by JLogan3o13
1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


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

  • Similar Content

    • jannikrendl
      By jannikrendl
      Hey guys,
      I was trying to create a script with a GUI but when I start the script via pressing the startbutton in my GUI and then trying to stop the script it won't close/stop.
      Here is the script:
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= Global $GUI = GUICreate("AlphaAgility", 218, 65, 1147, 123) Global $StartButton = GUICtrlCreateButton("Start", 24, 16, 75, 25) Global $StopButton = GUICtrlCreateButton("Stop", 120, 16, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $StartButton while(1) Agility() WEnd Case $StopButton Exit EndSwitch WEnd Global $agility = False Func Agility() MouseClick("Left",random(466,500),random(634,669),1,random(10,20));Balancier-Stamm If Not(@error) Then $agility = True sleep(random(0,200)) MouseMove(random(408,661),random(632,749),random(10,20));random Mousemovement Balancier-Stamm Else EndIf sleep(5500) MouseClick("Left",448,820,1,random(10,20));Netz If Not(@error) Then $agility = True sleep(random(0,200)) MouseMove(random(334,557),random(774,876),random(10,20));random Mousemovement Netz Else $agility = False EndIf sleep(3750) MouseClick("Left",480,706,1,random(10,20));Ast If Not(@error) Then $agility = True ;sleep(random(0,200)) ;MouseMove(random(95,953),random(117,1067),random(10,20)) -> kein random Mousemovement nötig Else $agility = False EndIf sleep(2750) MouseClick("Left",727,608,1,random(10,20));Balancier-Seil If Not(@error) Then $agility = True sleep(random(0,200)) MouseMove(random(723,891),random(572,676),random(10,20));random Mousemovement Balancier-Seil Else $agility = False EndIf sleep(6750) MouseClick("Left",698,633,1,random(10,20));Ast If Not(@error) Then $agility = True ;sleep(random(0,200)) ;MouseMove(random(95,953),random(117,1067),random(10,20)) -> kein random Mousemovement nötig Else $agility = False EndIf sleep(4000) MouseClick("Left",random(372,459),random(136,202),1,random(10,20));Netz If Not(@error) Then $agility = True sleep(random(0,200)) MouseMove(random(388,510),random(140,212),random(10,20));random Mousemovement Netz Else $agility = False EndIf sleep(6250) MouseClick("Left",random(362,401),random(363,409),1,random(10,20));Röhre If Not(@error) Then $agility = True ;sleep(random(0,200)) ;MouseMove(random(95,953),random(117,1067),random(10,20)) -> kein random Mousemovement nötig Else $agility = False EndIf sleep(7000) MouseClick("Left",14,654,1,random(10,20));Startposition If Not(@error) Then $agility = True ;sleep(random(0,200)) ;MouseMove(random(388,510),random(140,212),random(10,20)) -> kein random Mousemovement nötig Else EndIf sleep(4000) EndFunc Thanks in advance
      Jannik Rendl
    • nlta1992
      By nlta1992
      I want creat GUI, have button 1 to 10, but only use loop for ... to ... step ... next.
      Thanks.
    • ur
      By ur
      We are trying to automate the installation testing before sending to end users, our product.
      For Silent Installation, we have completed this part.
      But for GUI, the default installation is completed by sending the keys based on the window.
      But for GUI custom installation, we are struck.
      How to enable or disable features in the below screen using GUI automation.?

    • gononono64
      By gononono64
      Hey there,
      I'm having some issues quick-sorting my 2d array imported from a database. Im trying to sort the array based on the name that would be returned in $array[$n][2]. The code i posted works for smaller arrays but for some reason when i try to sort my imported array (around 9000 indexes), I get "Recursion level has been exceeded". I understand that this is maybe due to lack of returns but i couldn't find an ideal spot to stick em and again it seems to work with smaller bits of code. Could it be that 9000 is too much?
      I would normally just trial and error it until i figured it out but due to the length of time to load and buffer my array it's become too time consuming. Really I'm just hoping there is a quick fix that someone with more experience happens to know.
      Thank you
       
      ;;---------------------------------------------This Works---------------------------------------------------- Local $a[7][2] = [ _ ["1", "asdfashks"], _ ["2", "SubStrlkghjing1"], _ ["3", "jdfghjsergh"], _ ["4", "nertynert"], _ ["5", "cvbncvjkrt"], _ ["6", "avbncvjkrt"], _ ["7", "oytuoyuop"]] Quicksort($a,1,0,6) _ArrayDisplay($a) ;;------------------------------------------This Does Not--------------------------------------------------------- Quicksort($aLargeData, 1, 0, Ubound($aLargeData) - 1) _ArrayDisplay($aLargeData) ;;----------------------------------------Quicksort Function------------------------------------------------------ Func Quicksort(ByRef $Array, $secondIndex, $First, $Last) Local $pivot, $i, $j, $temp If $First < $Last Then $pivot = $First $i = $First $j = $Last While ($i < $j) While (StringCompare($Array[$i][$secondIndex], $Array[$pivot][$secondIndex]) <= 0) And ($i < $Last) $i += 1 WEnd While (StringCompare($Array[$j][$secondIndex], $Array[$pivot][$secondIndex]) > 0) $j -= 1 WEnd If ($i < $j) Then _ArraySwap($Array, $i, $j) _ArraySwap($Array,$pivot,$j) Quicksort($Array, $secondIndex, $First,$j-1) Quicksort($Array, $secondIndex, $j+1,$Last) WEnd EndIf EndFunc  
    • drapdv
      By drapdv
      I have a GUI with a parent window that has a menu and shortcut buttons at the top, and a child window which displays a list which is scrolled vertically.
      When the list is relatively small, like no more than 100 or so lines then it scrolls fine.  As the list gets larger, scrolling begins to slow, and if you start mixing up the scroll method (mousewheel, left-clicking the scrollbar box, etc) then it begins to hang.  When it hangs, dwm.exe CPU usage maxes out, and I can't even switch to another window.  Each line in the list is 1000px wide X 30px tall, and the lines alternate between a gray background and a white background, in case that matters.
      When a non-Aero theme is active, everything works fine.  So, I could disable DWM every time someone fires it up, but changing a client's color scheme is not ideal.
      I tried to utilize _WinAPI_DwmSetWindowAttribute($oGui_Parent,  $DWMWA_NCRENDERING_POLICY, $DWMNCRP_DISABLED), and although it succeeds in disabling DWM for that window, it doesn't seem to make any difference as far as the scrolling lag is concerned.
      The code is several thousand lines long and contains proprietary information, so I'm trying to avoid posting that, but these are the lines which are creating the GUIs.  Is there anything that anyone can think of off the top of their heads, or is there anything jumping out at you from this snippet of code?  Any help is appreciated!
      $oGui_Parent = GUICreate("Data Viewer", 700, 500, Default, Default, BitOR($WS_CAPTION, $WS_MINIMIZEBOX, $WS_POPUPWINDOW)) WinSetTrans($oGui_Parent, "", 255) _WinAPI_DwmSetWindowAttribute($oGui_Parent, $DWMWA_NCRENDERING_POLICY, $DWMNCRP_DISABLED) GUISetFont(9, 500, 0, "Calibri") GUISetBkColor(0xFFFFFF) $oGui_Child = GUICreate("", 700, 400, 0, 100, $WS_POPUP, $WS_EX_MDICHILD, $oGui_Parent) WinSetTrans($oGui_Child, "", 255) _WinAPI_DwmSetWindowAttribute($oGui_Child, $DWMWA_NCRENDERING_POLICY, $DWMNCRP_DISABLED) GUISetFont(9, 500, 0, "Calibri") GUISetBkColor(0xFFFFFF)