Jump to content

"hole" In The Gui


Rallert
 Share

Recommended Posts

As title says... Can you make a "hole" in the middle of the GUI? So that you can see the GUI, but still click on the game(yes, it's for a game) behind it? Would be cool. :think:

EDIT: Thanks... How do I know which object to make? Like Shell.Explorer.2. The game is Diablo II. It is running in window-mode in DirectDraw.

-Rallert

Edited by Rallert
Link to comment
Share on other sites

Lesson #7 from "Welcome to Autoit 1-2-3"

; This is a demonstration for Object Create, similar to Level I.
; Only the Challenge is the portions noted.

#include <GuiConstants.au3> 

opt("MouseCoordMode", 0)       ;set mouse coordinates, 1=absolute, 0=relative, 2=client.

GUICreate("Object - Mouse Challenge", 614, 370) 
GUISetFont(9, 400, -1, "MS Sans Serif") 
$B_oIE2 = ObjCreate("Shell.Explorer.2") 
$Breaktime = GUICtrlCreateObj($B_oIE2, -1, -40, 470, 435) 
$html2 = "about:----------------------------------------------------------------------------------------------------------------------CONGRADULATIONS!!!  -  You have passed, Level II Exam.........   To Show AutoIt is Chalenging Too!!!.....  Please Press *Enter Break*" & @CR
$B_oIE2.navigate ($html2) 
$Label_x=GUICtrlCreateLabel ("Mouse", 520, 30,50)
$Label_y=GUICtrlCreateLabel ("Position", 520, 50,50)
$MseStart = GUICtrlCreateButton("&Use Mouse", 505, 270, 80, 25)
GUICtrlSetState( -1, $GUI_HIDE); hide the button
$BrkStart = GUICtrlCreateButton("&Enter Break", 505, 300, 80, 25)
$BrkEnd = GUICtrlCreateButton("&Exit", 505, 330, 80, 25)
GUISetState() 

While 1 
    
    $msg = GUIGetMsg() 
    
    If $msg = $GUI_EVENT_CLOSE Or $msg = $BrkEnd Then 
        Exit
    EndIf
    
    If $msg = $BrkStart Then 
        $B_oIE2.navigate ("http://www.mtbireland.com/dodge.html")
        GUICtrlSetState( $MseStart, $GUI_SHOW); show the button.
        MsgBox(262208, "How to Play", "Move the Reb Box and Don't Touch Anything   " & @CRLF & "Or, Use the Mouse to Move for You   ")
    EndIf
    
    If $msg = $MseStart Then
        Mouse_Challenge()
    EndIf
    
WEnd 

Func Mouse_Challenge()

    MouseMove( 220, 210); move the mouse to the starting position.
    $a=MouseGetPos(); read the position.
    GUIctrlSetData($Label_x,"X = " &$a[0]) ; set the label x.
    GUIctrlSetData($Label_y,"Y = " &$a[1]); set the label y.
    
    MouseClickDrag ( "left", $a[0], $a[1], 100, $a[1]); click and drag the item.
    Sleep(2000); wait for next move.
    $b=MouseGetPos(); repeat as needed.
    GUIctrlSetData($Label_x, "X = " &$b[0]) 
    GUIctrlSetData($Label_y, "Y = " &$b[1]) 
    
    MouseClickDrag ( "left", $b[0], $b[1], $a[0], $a[1])
    Sleep(1000)
    $b=MouseGetPos()
    GUIctrlSetData($Label_x, "X = " &$b[0]) 
    GUIctrlSetData($Label_y, "Y = " &$b[1]) 
    
    MouseClickDrag ( "left", $b[0], $b[1], 80, 80)
    
    
; set the last position to the labels.
    $a=MouseGetPos()
    GUIctrlSetData($Label_x,"X = " &$a[0]) 
    GUIctrlSetData($Label_y,"Y = " &$a[1]) 
EndFunc



; to submit your Score, Please copy and post your.

; 1. Time Message.
; 2. Mouse Challenge Function.

; In the AutoIt 1-2-3 Thread. No Cheating.
; Your Mouse Challenge Function may be placed in the next updated Release of Welcome to AutoIt 1-2-3.

8)

NEWHeader1.png

Link to comment
Share on other sites

ObjCreate unknown fuction

Does autoit keep dropping functions or is it just me?

Cause everytime I try a test script from these forums that sounds cool I get an error saying this function or that one is unknown and I remember using a script with ObjCreate in it before.

?

Link to comment
Share on other sites

ObjCreate unknown fuction

Does autoit keep dropping functions or is it just me?

Cause everytime I try a test script from these forums that sounds cool I get an error saying this function or that one is unknown and I remember using a script with ObjCreate in it before.

?

I have the same problem :/

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...